Hbase 批量写入操作

阅读更多

Code 

Nmr

List List Size Code

Avarage Elapsed Time

(sec)

1 List
batchAllRows;
250.000

table.setAutoFlush(false);


for (Put mRow : batchAllRows) {
table.put(mRow);
}
table.flushCommits();

27
2 List batchAllRows; 250.000 table.setAutoFlush(false);
table.put(batchAllRows);
table.flushCommits();
103
3 List batchAllRows; 250.000 table.setAutoFlush(false);
Object[] results = new Object[batchAllRows.size()];
table.batch(batchAllRows, results);
//table.batch(batchAllRows) ; /* already tried */
table.flushCommits();
105

你可能感兴趣的:(Hbase,Htable,Put)