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 Plain View
HBase >> mail # user >> Is Put() operation a synchronous call on server side?


+
yun peng 2012-12-06, 13:02
+
Harsh J 2012-12-06, 14:06
+
yun peng 2012-12-06, 18:32
+
Jimmy Xiang 2012-12-06, 18:45
Copy link to this message
-
Re: Is Put() operation a synchronous call on server side?
2012/12/6 yun peng <[EMAIL PROTECTED]>

> Hi, since on client side HBase can immediately send Put() by turning off
> setAutoFlush(), I am wondering if Put() in HBase server side is executed in
> synchronous way? Be a bit more specific, given a Put() that already arrives
> at HRegion, will it wait (or be blocking) until all put-related operations
> are done, such as write to WAL and write to memstore, or even flush to disk
> (though may not on every time). Or it just triggers put-related operations
> and immediately returns....
>
>
> Besides, in research of this problem, I found it not very easy to find the
> code that perform RPC in HBase, for example, how does client-side
> HTable.put() invoke the server-side HRegion.put().... Can anyone points to
> me the related code path on this regards? Thanks...
> regards,
> Yun
>

I think the path should be like this:
put() -> flushCommits() -> processBatch() -> processBatchCallback() ->
submit() -> ExecutorService.submit()

The callback we submit contains a "connect" and "call" function, which
really
does the RPC stuff. See ProtobufUtil.java and its "multi" method. About the
question how
to get the ClientProtocol, you can see HConnectionManager.getProtocol()
method.

Hope it helps, and I also want somebody can give more inform about how
Protobuf and HBaseRPC work together. :)
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