HBase write: which one better on performance, batch or put(List<Put>)?

爱⌒轻易说出口 提交于 2019-12-04 12:04:58

They're essentially the same: batch(List<? extends Row> actions, Object[] results) allows not only puts but also gets, deletes, increments... put(List<Put> puts) just do a batch of puts (it also validates them client-side).

You can also perform batches by disabling table.setAutoFlush(false), issuing standard puts to the table and flushing the buffer afterwards with table.flushCommits().

I don't know the size of your rows but unless they're huge it seems you have some sort of problem with your configuration (network latency maybe?), even performing 500 puts row by row should be performed a lot faster.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!