Hbase 批量寫入操作

Code 

Nmr

List List Size Code

Avarage Elapsed Time

(sec)

1 List<Put>
batchAllRows;
250.000

table.setAutoFlush(false);


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

27
2 List<Put> batchAllRows; 250.000 table.setAutoFlush(false);
table.put(batchAllRows);
table.flushCommits();
103
3 List<Row> batchAllRows; 250.000 table.setAutoFlush(false);
Object[] results = new Object[batchAllRows.size()];
table.batch(batchAllRows, results);
//table.batch(batchAllRows) ; /* already tried */
table.flushCommits();
105
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章