You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by NNever <nn...@gmail.com> on 2012/04/06 03:32:47 UTC
determine whole-row delete in Coprocessor.preDelete
Dear all,
when trigger a preDelete in Coprocessor, is there any possible to determine
this Delete is going to remove a row ( not just a family or qualifier, but
the whole row)?
Thanks so much!
Best regards,
nn
Re: determine whole-row delete in Coprocessor.preDelete
Posted by Stack <st...@duboce.net>.
On Thu, Apr 5, 2012 at 6:32 PM, NNever <nn...@gmail.com> wrote:
> Dear all,
>
> when trigger a preDelete in Coprocessor, is there any possible to determine
> this Delete is going to remove a row ( not just a family or qualifier, but
> the whole row)?
>
> Thanks so much!
>
I'd doubt it, not w/o holding a row lock and doing a Get and
compare.... even then, row could change after you come out of the
preDelete (unless row lock is help while we go into preDelete... I
haven't checked).
St.Ack
Re: determine whole-row delete in Coprocessor.preDelete
Posted by NNever <nn...@gmail.com>.
Thanks J-D,
but i check the source, in HRegion.delete, there are some codes like this:
public void delete(){
...
prepareDelete(delete); // here will check if Delete has no columnfamily,
it will reset it's all columnFamilies.
internalDelete(...); // Coprocessor.preDelete triggered here
...
}
As the codes shows here, the 'no columns are specified' Delete will be
modifid to 'full columns specified' Delete before Cp.preDelete triggered.
So i stll get no way to find out if a Delete is going to delete a full
row...
2012/4/7 Jean-Daniel Cryans <jd...@apache.org>
> The same way you tell HBase to delete a whole row, no columns are
> specified.
>
> J-D
>
> On Thu, Apr 5, 2012 at 6:32 PM, NNever <nn...@gmail.com> wrote:
> > Dear all,
> >
> > when trigger a preDelete in Coprocessor, is there any possible to
> determine
> > this Delete is going to remove a row ( not just a family or qualifier,
> but
> > the whole row)?
> >
> > Thanks so much!
> >
> > Best regards,
> > nn
>
Re: determine whole-row delete in Coprocessor.preDelete
Posted by Jean-Daniel Cryans <jd...@apache.org>.
The same way you tell HBase to delete a whole row, no columns are specified.
J-D
On Thu, Apr 5, 2012 at 6:32 PM, NNever <nn...@gmail.com> wrote:
> Dear all,
>
> when trigger a preDelete in Coprocessor, is there any possible to determine
> this Delete is going to remove a row ( not just a family or qualifier, but
> the whole row)?
>
> Thanks so much!
>
> Best regards,
> nn