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
Kiru Pakkirisamy 2013-09-23, 16:42
Yeshwanth,
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  {
.....

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

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

Hi,

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 ..

Thanks