SHARE
TWEET

Untitled

a guest Sep 28th, 2011 273 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     private void saveKeywords(String key, final List<String> keywords, final String columnName) {
  2.         this.hbaseTemplate.execute(TABLE_NAME, new TableCallback() {
  3.             @Override
  4.             public Object doWithTable(HTable hTable) throws Exception {
  5.                 try {
  6.                    
  7.                         Put put = new Put(toBytes(key));
  8.                         put.add(toBytes(COLUMN_FAMILY), toBytes(columnName), toBytes(join(keywords.iterator(), ",")));
  9.                         hTable.put(put);
  10.                     }
  11.                 } catch (Exception e) {
  12.                     LOGGER.error("Error occurred while saving " + columnName + " keywords", e);
  13.                 }
  14.                 return null;
  15.             }
  16.         });
  17.     }
  18.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top