Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Co-Processors in Hase 0.95.2 version

Copy link to this message
Re: Co-Processors in Hase 0.95.2 version
With 0.95.2 coprocessors use protocol instead of serializing Java objects, one would use protobuf.
Most of the tutorials on protobuf are mainly about the data structures and not much about the rpc mechanism, which is what we use in 0.95.2

The RPC is defined like this in a proto file -

service TermIdSearchService {
rpc getTermIdWithCount(TermList)
returns (TermIdCountList);

Then it is implemented like this (this is also what to install as coprocessor in the table)
public class TermIdSearchEndpointV2 extends
TermIdSearchProtocol.TermIdSearchService implements Coprocessor,
CoprocessorService  {

public void getTermIdWithCount(RpcController controller,
TermIdSearchProtocol.TermList termlist,
RpcCallback<TermIdSearchProtocol.TermIdCountList> callback) {

- kiru
Kiru Pakkirisamy | webcloudtech.wordpress.com
 From: yeshwanth kumar <[EMAIL PROTECTED]>
Sent: Sunday, September 22, 2013 10:14 PM
Subject: Co-Processors in Hase 0.95.2 version


facing some difficulty to write the co-processors in hbase 0.95.2 version,
looking for some tutorials and examples....

can anyone provide me some examples
how the co-processors are related with protobuffer's ..