Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> HBase client


Reply inline

> -----Original Message-----
> From: Mohit Anchlia [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 09, 2012 10:10 AM
> To: [EMAIL PROTECTED]
> 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.

Regards
Ram
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB