SHARE
TWEET

john

a guest Oct 24th, 2013 44 Never
  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. }
RAW Paste Data
Top