Reputation: 375
I have a list of Put operations to write to HBase. I found two possible API calls in HTable class
batch(List) and put(List).
I am wondering what is the difference between these two functions in terms of writing performance?
Upvotes: 4
Views: 4919
Reputation: 5596
In put(List) there is no sequence defined in which puts will be inserted in DB...also it is asynchronous i.e. all Puts will be stored in client side write buffer first before actual insertion in DB. In batch(List) the puts are synchronous i.e. they are immediately inserted in DB.
Upvotes: 1
Reputation: 25909
put(list) does a little more processing (on the client side) as it validate the puts but eventually they both call the same processBatch code on the HConnectionImplementation class
Upvotes: 6