For 0.96+, you can refer
to 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java
as the java client example.

Cheers



On Fri, Apr 11, 2014 at 6:20 PM, Bogala, Chandra Reddy <
[email protected]> wrote:

> Thanks Yu. My understanding is, this coprocessor is available as part of
> Hbase server components. So I should be able to attach this coprocessor to
> any of my tables by using alter table command.
>
>
>
> alter 'demo-table','COPROCESSOR' =>'<XXXX.jar>|class|priority|args'
>
>
>
> Then from hbase shell, I should be able to call this coprocessor with
> command. Same like how we do scan and filter. Is there any command like
> below(filter command) calling a coprocessor. So that it will run in region
> server and return back results?.
>
>
>
> scan 'demo-table', {FILTER =>
> org.apache.hadoop.hbase.filter.RowFilter.new(CompareFilter::CompareOp.valueOf('EQUAL'),SubstringComparator.new("10001|1395309600"))}
>
>
>
> I am trying to figure out a simple call mechanism(client) of coprocessor.
> If by default those classes and calling mechanism not available from hbase
> shell. Then planning to use java client code to invoke coprocessor.
>
> Any pointers to java client to invoke aggregation<
> http://search-hadoop.com/c/HBase:hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java||Hbase+aggregation+endpoint>
> coprocessor will be helpful.
>
>
>
> Thanks,
>
> Chandra
>
>
>
> -----Original Message-----
> From: Ted Yu [mailto:[email protected]]
> Sent: Friday, April 11, 2014 10:42 PM
> To: [email protected]
> Subject: Re: endpoint coprocessor
>
>
>
> Please take a look at :
>
> hbase-shell/src/main/ruby/hbase/security.rb
>
>
>
> for example on how coprocessor is activated from shell.
>
>
>
> Cheers
>
>
>
>
>
> On Fri, Apr 11, 2014 at 11:06 AM, Bogala, Chandra Reddy <
> [email protected]<mailto:[email protected]>> wrote:
>
>
>
> > Thank you. I am aware of this challenge. How to call below coprocessor
>
> > from client. Can I call this coprocessor from hbase shell?.  I am new
>
> > to Hbase. So may be asking very dumb questions.
>
> >
>
> > Thanks,
>
> > Chandra
>
> >
>
> > -----Original Message-----
>
> > From: Asaf Mesika [mailto:[email protected]]
>
> > Sent: Friday, April 11, 2014 12:10 PM
>
> > To: [email protected]<mailto:[email protected]>
>
> > Subject: Re: endpoint coprocessor
>
> >
>
> > Bear in mind each region will return its top n, then you will have to
>
> > run another top n in your client code. This introduce a numerical
>
> > error : top on top.
>
> >
>
> > On Thursday, April 10, 2014, Bogala, Chandra Reddy
>
> > <[email protected]<mailto:[email protected]>>
>
> > wrote:
>
> >
>
> > > Hi,
>
> > > I am planning to write endpoint coprocessor to calculate TOP N
>
> > > results for my usecase.  I got confused with old apis and new apis.
>
> > > I followed below links and try to implement. But looks like api's
>
> > > changed a lot. I don't see many of these classes in hbase jars. We
>
> > > are using Hbase 0.96.
>
> > > Can anyone point to the latest document/apis?. And if possible
>
> > > sample code to calculate top N.
>
> > >
>
> > > https://blogs.apache.org/hbase/entry/coprocessor_introduction
>
> > > HBase Coprocessors - Deploy shared functionality directly on the
>
> > > cluster<https://www.youtube.com/watch?v=xHvJhuGGOKc>
>
> > >
>
> > > Thanks,
>
> > > Chandra
>
> > >
>
> > >
>
> > >
>
> >
>

Reply via email to