2016年5月11日10:08:29

hbase原本的put方式是一条一条的put,在客户端修改

AutoFlush
将HTable的setAutoFlush设为false,可以支持客户端批量更新。即当Put填满客户端flush缓存时,才发送到服务端。
默认是true。

例如:
HTable hTable = new HTable(conf, tableName);
hTable.setAutoFlush(false);

这样的效率会比AUTOFLUSH 设置为true提升300倍不止

 

相关文章: