You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Navdeep Agrawal <Na...@symantec.com> on 2015/05/21 17:42:58 UTC

Coprocessor accessibility

Hi,

I have developed a baseRegionObserver coprocessor  overriding preGetop, preScan which will be returning a top elements of each cell. Now I want to enable this coprocessor only for myself or some certain users ,so that normal user will get normal result and some user who want to use it can enable it . is it possible or else how we can achieve this .


Thanks,
Navdeep

Re: Coprocessor accessibility

Posted by Ted Yu <yu...@gmail.com>.
In hbase shell, please use:
help 'get'

You will see how custom attribute can be passed. 

Cheers



> On May 22, 2015, at 3:07 AM, Navdeep Agrawal <Na...@symantec.com> wrote:
> 
> Nice  I was looking for something like this . thank you Ted
> just for curiosity can we set attribute through shell .or by default no attribute are set through shell's get .
> 
> -----Original Message-----
> From: Ted Yu [mailto:yuzhihong@gmail.com] 
> Sent: Thursday, May 21, 2015 9:29 PM
> To: user@hbase.apache.org
> Subject: Re: Coprocessor accessibility
> 
> Is your hbase deployed in a secure cluster ?
> Here is signature for preGetOp:
> 
>  public void preGetOp(final ObserverContext<RegionCoprocessorEnvironment>
> e,
> 
>      final Get get, final List<Cell> results) throws IOException {
> 
> User who wants this observer activated can pass attribute, with known name, through Get object.
> 
> The observer can try to retrieve this attribute:
> 
>  public byte[] getAttribute(String name) {
> 
> when attribute is present, do special handling.
> 
> FYI
> 
>> On Thu, May 21, 2015 at 8:42 AM, Navdeep Agrawal < Navdeep_Agrawal@symantec.com> wrote:
>> 
>> Hi,
>> 
>> I have developed a baseRegionObserver coprocessor  overriding 
>> preGetop, preScan which will be returning a top elements of each cell. 
>> Now I want to enable this coprocessor only for myself or some certain 
>> users ,so that normal user will get normal result and some user who 
>> want to use it can enable it . is it possible or else how we can achieve this .
>> 
>> 
>> Thanks,
>> Navdeep
>> 

RE: Coprocessor accessibility

Posted by Navdeep Agrawal <Na...@symantec.com>.
Nice  I was looking for something like this . thank you Ted
 just for curiosity can we set attribute through shell .or by default no attribute are set through shell's get .

-----Original Message-----
From: Ted Yu [mailto:yuzhihong@gmail.com] 
Sent: Thursday, May 21, 2015 9:29 PM
To: user@hbase.apache.org
Subject: Re: Coprocessor accessibility

Is your hbase deployed in a secure cluster ?
Here is signature for preGetOp:

  public void preGetOp(final ObserverContext<RegionCoprocessorEnvironment>
e,

      final Get get, final List<Cell> results) throws IOException {

User who wants this observer activated can pass attribute, with known name, through Get object.

The observer can try to retrieve this attribute:

  public byte[] getAttribute(String name) {

when attribute is present, do special handling.

FYI

On Thu, May 21, 2015 at 8:42 AM, Navdeep Agrawal < Navdeep_Agrawal@symantec.com> wrote:

> Hi,
>
> I have developed a baseRegionObserver coprocessor  overriding 
> preGetop, preScan which will be returning a top elements of each cell. 
> Now I want to enable this coprocessor only for myself or some certain 
> users ,so that normal user will get normal result and some user who 
> want to use it can enable it . is it possible or else how we can achieve this .
>
>
> Thanks,
> Navdeep
>

Re: Coprocessor accessibility

Posted by Ted Yu <yu...@gmail.com>.
Is your hbase deployed in a secure cluster ?
Here is signature for preGetOp:

  public void preGetOp(final ObserverContext<RegionCoprocessorEnvironment>
e,

      final Get get, final List<Cell> results) throws IOException {

User who wants this observer activated can pass attribute, with known name,
through Get object.

The observer can try to retrieve this attribute:

  public byte[] getAttribute(String name) {

when attribute is present, do special handling.

FYI

On Thu, May 21, 2015 at 8:42 AM, Navdeep Agrawal <
Navdeep_Agrawal@symantec.com> wrote:

> Hi,
>
> I have developed a baseRegionObserver coprocessor  overriding preGetop,
> preScan which will be returning a top elements of each cell. Now I want to
> enable this coprocessor only for myself or some certain users ,so that
> normal user will get normal result and some user who want to use it can
> enable it . is it possible or else how we can achieve this .
>
>
> Thanks,
> Navdeep
>

Re: Coprocessor accessibility

Posted by Andrew Purtell <ap...@apache.org>.
This is something you have to implement within your coprocessor itself.


On Thu, May 21, 2015 at 8:42 AM, Navdeep Agrawal <
Navdeep_Agrawal@symantec.com> wrote:

> Hi,
>
> I have developed a baseRegionObserver coprocessor  overriding preGetop,
> preScan which will be returning a top elements of each cell. Now I want to
> enable this coprocessor only for myself or some certain users ,so that
> normal user will get normal result and some user who want to use it can
> enable it . is it possible or else how we can achieve this .
>
>
> Thanks,
> Navdeep
>



-- 
Best regards,

   - Andy

Problems worthy of attack prove their worth by hitting back. - Piet Hein
(via Tom White)