Want more features on Pastebin? Sign Up, it's FREE!
Guest

john

By: a guest on Oct 24th, 2013  |  syntax: Java  |  size: 0.50 KB  |  views: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. HTable hTable = new HTable(HBaseConnection.getConfiguration(),tablename);
  2.  
  3. Scan s = new Scan();
  4. s.setBatch(batchSize);
  5. s.setCaching(cachingSize);
  6. s.setCacheBlocks(true);
  7. s.addFamily(ColumnFamily1);
  8. s.addFamily(ColumnFamily2);
  9. // at this point I need something like s.addFilter(FilterBiggerThan25k) or something like that
  10.  
  11. ResultScanner scanner = hTable.getScanner(s);
  12. for (Result res = scanner.next(); res != null; res = scanner.next()) {
  13. // do something for rows where column amount > 25000
  14. ...
  15. }
clone this paste RAW Paste Data