You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by George Forman <ge...@hotmail.com> on 2012/08/20 15:48:19 UTC
Base coprocessor arguments
Hi All,
I have extended BaseRegionObservers coprocessor. I want to know how to access the arguments specified with the associated table: alter 't1', METHOD => 'table_att',
'coprocessor'=>'hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2'
Are they available in postPut via ObserverContext<RegionCoprocessorEnvironment> ?
Thanks
George
Re: Base coprocessor arguments
Posted by Ben Kim <be...@gmail.com>.
thank you! that did the trick.
*Benjamin Kim*
*benkimkimben at gmail*
On Thu, Sep 12, 2013 at 8:23 AM, Gary Helmling <gh...@gmail.com> wrote:
> Ben & George,
>
> The arguments you provide when configuring the coprocessor should be
> present in the Configuration object exposed through
> CoprocessorEnvironment. So, for example, in your RegionObserver.start()
> method, you should be able to do:
>
> *public void start(CoprocessorEnvironment e) throws IOException {
> *
> * *e.getConfiguration().get("arg1"); // should be "1"*
> *
> *}
> *
>
>
> On Wed, Sep 11, 2013 at 2:25 AM, Ben Kim <be...@gmail.com> wrote:
>
> > Hello George
> >
> > Have you found a solution to your question?
> >
> > I can't seem to get the arguments anywhere :(
> >
> > Best,
> > Ben
> >
> > *Benjamin Kim*
> > *benkimkimben at gmail*
> >
> >
> > On Mon, Aug 20, 2012 at 10:48 PM, George Forman
> > <ge...@hotmail.com>wrote:
> >
> > >
> > >
> > > Hi All,
> > > I have extended BaseRegionObservers coprocessor. I want to know how to
> > > access the arguments specified with the associated table: alter 't1',
> > > METHOD => 'table_att',
> > >
> > >
> >
> 'coprocessor'=>'hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2'
> > > Are they available in postPut via
> > > ObserverContext<RegionCoprocessorEnvironment> ?
> > > Thanks
> > > George
> >
>
Re: Base coprocessor arguments
Posted by Gary Helmling <gh...@gmail.com>.
Ben & George,
The arguments you provide when configuring the coprocessor should be
present in the Configuration object exposed through
CoprocessorEnvironment. So, for example, in your RegionObserver.start()
method, you should be able to do:
*public void start(CoprocessorEnvironment e) throws IOException {
*
* *e.getConfiguration().get("arg1"); // should be "1"*
*
*}
*
On Wed, Sep 11, 2013 at 2:25 AM, Ben Kim <be...@gmail.com> wrote:
> Hello George
>
> Have you found a solution to your question?
>
> I can't seem to get the arguments anywhere :(
>
> Best,
> Ben
>
> *Benjamin Kim*
> *benkimkimben at gmail*
>
>
> On Mon, Aug 20, 2012 at 10:48 PM, George Forman
> <ge...@hotmail.com>wrote:
>
> >
> >
> > Hi All,
> > I have extended BaseRegionObservers coprocessor. I want to know how to
> > access the arguments specified with the associated table: alter 't1',
> > METHOD => 'table_att',
> >
> >
> 'coprocessor'=>'hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2'
> > Are they available in postPut via
> > ObserverContext<RegionCoprocessorEnvironment> ?
> > Thanks
> > George
>
Re: Base coprocessor arguments
Posted by Ben Kim <be...@gmail.com>.
Hello George
Have you found a solution to your question?
I can't seem to get the arguments anywhere :(
Best,
Ben
*Benjamin Kim*
*benkimkimben at gmail*
On Mon, Aug 20, 2012 at 10:48 PM, George Forman
<ge...@hotmail.com>wrote:
>
>
> Hi All,
> I have extended BaseRegionObservers coprocessor. I want to know how to
> access the arguments specified with the associated table: alter 't1',
> METHOD => 'table_att',
>
> 'coprocessor'=>'hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2'
> Are they available in postPut via
> ObserverContext<RegionCoprocessorEnvironment> ?
> Thanks
> George