hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramkrishna.S.Vasudevan" <ramkrishna.vasude...@huawei.com>
Subject RE: HBase client
Date Tue, 09 Oct 2012 04:49:54 GMT
Reply inline

> -----Original Message-----
> From: Mohit Anchlia [mailto:mohitanchlia@gmail.com]
> Sent: Tuesday, October 09, 2012 10:10 AM
> To: user@hbase.apache.org
> Subject: HBase client
> There is a suggestion on this URL
> http://hbase.apache.org/book/perf.writing.html#perf.hbase.client.autofl
> ush to
> set autoFlush to false. I have 2 questions:
> 1. By setting auto flush to false does it increase the chance of data
> loss
> since data is not writen until buffer is filed?
[Ram] Yes because till the buffer is flushed no data has reached the RS.
> 2. How to decide when to call flush?
[Ram] Generally the puts are clubbed together and a set of puts are pushed
into the RS.  
We can create puts and add it to a queue.  A set of n threads will consume
these puts.  Every thread will form a list of X puts.  So by default the
autoflush can be true.
This makes like every put(list of puts) is for sure going to the RS.
The HTable also provides an api getWriteBuffer().  If any put has failed
then the put will still be present in the writeBuffer.  The successful ones
are removed.


View raw message