You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by yeshwanth kumar <ye...@gmail.com> on 2013/09/23 07:14:27 UTC

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

Re: Co-Processors in Hase 0.95.2 version

Posted by Kiru Pakkirisamy <ki...@yahoo.com>.
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 <ye...@gmail.com>
To: user@hbase.apache.org 
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

Re: Co-Processors in Hase 0.95.2 version

Posted by Ted Yu <yu...@gmail.com>.
Here is an example:
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.html

On Sep 22, 2013, at 10:14 PM, yeshwanth kumar <ye...@gmail.com> wrote:

> 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