You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Vinay Kashyap <vi...@ymail.com> on 2014/05/13 06:31:43 UTC

preGetOp being called on the Coprocessor when issued with delete request

Dear all,

I am using HBase 0.96.1.1-hadoop2 with CDH-5.0.0.
I have an application where I have registered a coprocessor to my table to get few statistics on the read/write/delete requests.
I have implemented preGetOp, prePut and preDelete accordingly and it is working as expected in case of read/write requests.
But when I issue a delete request on the table, coprocessor's preGetOp is been called which is varying the read requests statistics.
I wanted to understand why is the preGetOp being called when delete request is issued.?



Thanks and regards
Vinay Kashyap

Re: preGetOp being called on the Coprocessor when issued with delete request

Posted by Ted Yu <yu...@gmail.com>.
Looking at RegionCoprocessorHost.java, preGetOp() is called in:
  public boolean preGet(final Get get, final List<Cell> results)

Do you have stack trace showing that preGetOp() is called for delete
request ?

Thanks


On Mon, May 12, 2014 at 9:31 PM, Vinay Kashyap <vi...@ymail.com>wrote:

> Dear all,
>
> I am using HBase 0.96.1.1-hadoop2 with CDH-5.0.0.
> I have an application where I have registered a coprocessor to my table to
> get few statistics on the read/write/delete requests.
> I have implemented preGetOp, prePut and preDelete accordingly and it is
> working as expected in case of read/write requests.
> But when I issue a delete request on the table, coprocessor's preGetOp is
> been called which is varying the read requests statistics.
> I wanted to understand why is the preGetOp being called when delete
> request is issued.?
>
>
>
> Thanks and regards
> Vinay Kashyap

Re: preGetOp being called on the Coprocessor when issued with delete request

Posted by Vinay Kashyap <vi...@ymail.com>.
Thanks for your reply Anoop,

In my application, I have only one version of a row. So requests are plain delete requests without any concern about versions of a record.

>> we already handle this internal get op call not to invoke the pre/post Get CP hook.  
        I am using 0.96.1.1 version of hbase. May be it is handled in the later versions. Can you tell me the exact class which has this code to invoke the Coprocessor hook..?? I could not obtain the exact stack trace in my application to trace the call.
We can file a JIRA about the same and discuss more on this to decide the behavior.


Regards,
Vinay Kashyap

Re: preGetOp being called on the Coprocessor when issued with delete request

Posted by Anoop John <an...@gmail.com>.
Checking the code in detail, we already handle this internal get op call
not to invoke the pre/post Get CP hook.

-Anoop-

On Fri, May 16, 2014 at 9:45 AM, Anoop John <an...@gmail.com> wrote:

> You are doing a latest version delete? When such a delete comes, (TS=
> LATEST_TS) internally there will be a Get operation happening to get the
> exact TS of the latest cell version.  As part of that the CP hook also
> getting called.  File a jira so that we can discuss there whether an
> internal call doing a CP callback is correct or not.
>
> -Anoop-
>
>  On Tue, May 13, 2014 at 10:01 AM, Vinay Kashyap <vi...@ymail.com>wrote:
>
>> Dear all,
>>
>> I am using HBase 0.96.1.1-hadoop2 with CDH-5.0.0.
>> I have an application where I have registered a coprocessor to my table
>> to get few statistics on the read/write/delete requests.
>> I have implemented preGetOp, prePut and preDelete accordingly and it is
>> working as expected in case of read/write requests.
>> But when I issue a delete request on the table, coprocessor's preGetOp is
>> been called which is varying the read requests statistics.
>> I wanted to understand why is the preGetOp being called when delete
>> request is issued.?
>>
>>
>>
>> Thanks and regards
>> Vinay Kashyap
>
>
>

Re: preGetOp being called on the Coprocessor when issued with delete request

Posted by Anoop John <an...@gmail.com>.
You are doing a latest version delete? When such a delete comes, (TS=
LATEST_TS) internally there will be a Get operation happening to get the
exact TS of the latest cell version.  As part of that the CP hook also
getting called.  File a jira so that we can discuss there whether an
internal call doing a CP callback is correct or not.

-Anoop-

On Tue, May 13, 2014 at 10:01 AM, Vinay Kashyap <vi...@ymail.com>wrote:

> Dear all,
>
> I am using HBase 0.96.1.1-hadoop2 with CDH-5.0.0.
> I have an application where I have registered a coprocessor to my table to
> get few statistics on the read/write/delete requests.
> I have implemented preGetOp, prePut and preDelete accordingly and it is
> working as expected in case of read/write requests.
> But when I issue a delete request on the table, coprocessor's preGetOp is
> been called which is varying the read requests statistics.
> I wanted to understand why is the preGetOp being called when delete
> request is issued.?
>
>
>
> Thanks and regards
> Vinay Kashyap