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

2014-05-22 Thread Jean-Marc Spaggiari
Hi Vinay, But regarding my earlier concern, calling get in case of delete request, in order to check the time stamp, can we not query hbase directly using the scanner avoiding the CP hooks..?? If you configure a CP to be called, HBase will call it. There isn't really any way to avoid that. You

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

2014-05-22 Thread ramkrishna vasudevan
Because internally deleteColumn with LATEST_TIMESTAMP does a get to find the exact latest version on which the delete applies we do a get. User perspective it may not be needed but since a read happens on those blocks where the latest version of the cell resides we have to know the metric. Even

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

2014-05-20 Thread Vinay Kashyap
Hi Jean, Thanks for your detailed info. Now I understand the trace from where the CP hook is getting called. But with this behavior of the delete request, don't you think there is a kind of restriction to the delete request by the client.?? By restriction I meant, for an application which

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

2014-05-20 Thread Jean-Marc Spaggiari
Hi Vinay, Coprocessors promess is to be called whenever there is a get, a delete, a put, etc. So since deleteColumn do a get and a delete, I thinks it's normal to get the 2 methods called. If you can not change deleteColumn by deleteColumns, what you can do is, on the delete hook, you can check

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

2014-05-20 Thread Jean-Marc Spaggiari
Hi Vinay, I don't see anything wrong in the code which will not trigger the preDelete hook when you do a delete with only the row key. It should be identical as adding all the families. Server side, this is the piece of code called when you are doing a Delete(rowkey) with nothing else: void

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

2014-05-20 Thread Vinay Kashyap
Hi Jean, I rechecked the logic regarding delete with specifying only 'key', there was a small mistake in the condition, I have corrected the same and now getting the CP hook. Thanks for that. But regarding my earlier concern, calling get in case of delete request, in order to check the time

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

2014-05-19 Thread Vinay Kashyap
Hi Jean, Thanks for your information. I am using deleteColumn in my application. I will check the behavior once by changing it to use deleteColumns as you suggested.  But is there any difference in the CP hooks for a delete request.?? Because, in my CP I have implemented preDelete() and in

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

2014-05-19 Thread Jean-Marc Spaggiari
Hi Vinay, In 0.94. When you call the deleteColumn: public Delete deleteColumn(byte [] family, byte [] qualifier) { this.deleteColumn(family, qualifier, HConstants.LATEST_TIMESTAMP); return this; } You set the timestamp to LATEST_TIMESTAMP. Then on the server side, in

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

2014-05-17 Thread Jean-Marc Spaggiari
Thanks for the confirmatoin Ted ;) I figured that afterward that some emails are not coming in the right order. Vinay, can you please confirm the client call you are doing? Thanks, JM 2014-05-16 19:19 GMT-04:00 Ted Yu yuzhih...@gmail.com: JMS: I saw your earlier email. There are some

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

2014-05-16 Thread Jean-Marc Spaggiari
Did anyone received the email I sent below? Based on the other emails, seems not. So just re-sending. JM 2014-05-15 8:24 GMT-04:00 Jean-Marc Spaggiari jean-m...@spaggiari.org: Hi Vinay, If you use deleteColumn (with no S), HBase need to first to a get to find the last timeStamp, then do

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

2014-05-16 Thread Jean-Marc Spaggiari
Hi Vinay, If you use deleteColumn (with no S), HBase need to first to a get to find the last timeStamp, then do the delete. If you goal is to remove all the versions of the specific column, you should use deleteColumns, which will not all get. JM 2014-05-13 10:16 GMT-04:00 Vinay Kashyap

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

2014-05-16 Thread Vinay Kashyap
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

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

2014-05-16 Thread Anoop John
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

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

2014-05-16 Thread Anoop John
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 anoop.hb...@gmail.com wrote: You are doing a latest version delete? When such a delete comes, (TS= LATEST_TS) internally there

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

2014-05-16 Thread Ted Yu
JMS: I saw your earlier email. There are some emails in ASF queue being processed (backlog). FYI On Fri, May 16, 2014 at 5:05 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Did anyone received the email I sent below? Based on the other emails, seems not. So just re-sending. JM

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

2014-05-15 Thread Ted Yu
Looking at RegionCoprocessorHost.java, preGetOp() is called in: public boolean preGet(final Get get, final ListCell 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 vinay_kash...@ymail.comwrote:

preGetOp being called on the Coprocessor when issued with delete request

2014-05-13 Thread Vinay Kashyap
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

preGetOp being called on the Coprocessor when issued with delete request

2014-05-13 Thread Vinay Kashyap
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