我读过“hadoop设计模式”一书,“HBase支持批量查询,所以最好将我们想要执行的所有查询缓冲到某个预定大小。这个常数取决于你可以轻松存储多少条记录在查询HBase之前在内存中。“
我试图在网上搜索一些例子但找不到任何例子,有人能用java map reduce给我看看这个例子吗?
感谢。
丹
答案 0 :(得分:2)
Configuration conf = HBaseConfiguration.create();
pool = new HTablePool(conf, 5);
HTableInterface table = pool.getTable('table');
List<Get> gets = new ArrayList<Get>();
table.get(gets);