You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Rahul Bhattacharjee <ra...@gmail.com> on 2013/07/03 18:46:49 UTC

Deleting range of rows from Hbase.

Hi,

Like scan with range. I would like to delete rows with range.Is this
supported from hbase shell ?

Lets say I have a table with keys like

A-34335
A-34353535
A-335353232
B-33435
B-4343
C-5353533

I want to delete all rows with prefix A using hbase shell.

Thanks,
Rahul

Re: Deleting range of rows from Hbase.

Posted by shashwat shriparv <dw...@gmail.com>.
Sure you can do it but not using hbase shell directly but writing a hbase
shell script either a shell script python script or  rubi script

read about hbase shell scripts for basic reference.

http://hbase.apache.org/shell.html


*Thanks & Regards    *

∞
Shashwat Shriparv



On Thu, Jul 4, 2013 at 9:07 PM, ramkrishna vasudevan <
ramkrishna.s.vasudevan@gmail.com> wrote:

> Coprocessors and endpoints are slighlty different but the
> BulkDeleteEndpoint gives you the provision to do the functionality that you
> need.  Basically the code gets executed in all the regions and the result
> is returned back to the client.
>
> Coprocessors allow you to control the execution on the server side by
> providing hooks to the server side flows.
>
> Regards
> Ram
>
>
> On Thu, Jul 4, 2013 at 5:05 PM, yonghu <yo...@gmail.com> wrote:
>
> > So, I can understand it as a predefined coprocessor. :)
> >
> > regards!
> >
> > Yong
> >
> >
> > On Thu, Jul 4, 2013 at 1:12 PM, Anoop John <an...@gmail.com>
> wrote:
> >
> > > BulkDeleteEndpoint  is a coprocessor endpoint impl.  For the usage pls
> > > refer TestBulkDeleteProtocol.
> > > You will be able to call the API at client side and the actual
> execution
> > > will happen at server side.. (This is what will happen with Endpoints
> :)
> >  )
> > >
> > > -Anoop-
> > >
> > > On Thu, Jul 4, 2013 at 4:29 PM, yonghu <yo...@gmail.com> wrote:
> > >
> > > > Hi Anoop
> > > > one more question. Can I use BulkDeleteEndpoint at the client side or
> > > > should I use it like coprocessor which deployed in the server side?
> > > >
> > > > Thanks!
> > > >
> > > > Yong
> > > >
> > > >
> > > > On Thu, Jul 4, 2013 at 12:50 PM, Anoop John <an...@gmail.com>
> > > wrote:
> > > >
> > > > > It is not supported from shell.  Not directly from delete API
> also..
> > > > >
> > > > > You can have a look at BulkDeleteEndpoint which can do what you
> want
> > to
> > > > >
> > > > > -Anoop-
> > > > >
> > > > > On Thu, Jul 4, 2013 at 4:09 PM, yonghu <yo...@gmail.com>
> > wrote:
> > > > >
> > > > > > I check the latest api of Delete class. I am afraid you have to
> do
> > it
> > > > by
> > > > > > yourself.
> > > > > >
> > > > > > regards!
> > > > > >
> > > > > > Yong
> > > > > >
> > > > > >
> > > > > > On Wed, Jul 3, 2013 at 6:46 PM, Rahul Bhattacharjee <
> > > > > > rahul.rec.dgp@gmail.com
> > > > > > > wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > Like scan with range. I would like to delete rows with range.Is
> > > this
> > > > > > > supported from hbase shell ?
> > > > > > >
> > > > > > > Lets say I have a table with keys like
> > > > > > >
> > > > > > > A-34335
> > > > > > > A-34353535
> > > > > > > A-335353232
> > > > > > > B-33435
> > > > > > > B-4343
> > > > > > > C-5353533
> > > > > > >
> > > > > > > I want to delete all rows with prefix A using hbase shell.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Rahul
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Deleting range of rows from Hbase.

Posted by ramkrishna vasudevan <ra...@gmail.com>.
Coprocessors and endpoints are slighlty different but the
BulkDeleteEndpoint gives you the provision to do the functionality that you
need.  Basically the code gets executed in all the regions and the result
is returned back to the client.

Coprocessors allow you to control the execution on the server side by
providing hooks to the server side flows.

Regards
Ram


On Thu, Jul 4, 2013 at 5:05 PM, yonghu <yo...@gmail.com> wrote:

> So, I can understand it as a predefined coprocessor. :)
>
> regards!
>
> Yong
>
>
> On Thu, Jul 4, 2013 at 1:12 PM, Anoop John <an...@gmail.com> wrote:
>
> > BulkDeleteEndpoint  is a coprocessor endpoint impl.  For the usage pls
> > refer TestBulkDeleteProtocol.
> > You will be able to call the API at client side and the actual execution
> > will happen at server side.. (This is what will happen with Endpoints :)
>  )
> >
> > -Anoop-
> >
> > On Thu, Jul 4, 2013 at 4:29 PM, yonghu <yo...@gmail.com> wrote:
> >
> > > Hi Anoop
> > > one more question. Can I use BulkDeleteEndpoint at the client side or
> > > should I use it like coprocessor which deployed in the server side?
> > >
> > > Thanks!
> > >
> > > Yong
> > >
> > >
> > > On Thu, Jul 4, 2013 at 12:50 PM, Anoop John <an...@gmail.com>
> > wrote:
> > >
> > > > It is not supported from shell.  Not directly from delete API also..
> > > >
> > > > You can have a look at BulkDeleteEndpoint which can do what you want
> to
> > > >
> > > > -Anoop-
> > > >
> > > > On Thu, Jul 4, 2013 at 4:09 PM, yonghu <yo...@gmail.com>
> wrote:
> > > >
> > > > > I check the latest api of Delete class. I am afraid you have to do
> it
> > > by
> > > > > yourself.
> > > > >
> > > > > regards!
> > > > >
> > > > > Yong
> > > > >
> > > > >
> > > > > On Wed, Jul 3, 2013 at 6:46 PM, Rahul Bhattacharjee <
> > > > > rahul.rec.dgp@gmail.com
> > > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Like scan with range. I would like to delete rows with range.Is
> > this
> > > > > > supported from hbase shell ?
> > > > > >
> > > > > > Lets say I have a table with keys like
> > > > > >
> > > > > > A-34335
> > > > > > A-34353535
> > > > > > A-335353232
> > > > > > B-33435
> > > > > > B-4343
> > > > > > C-5353533
> > > > > >
> > > > > > I want to delete all rows with prefix A using hbase shell.
> > > > > >
> > > > > > Thanks,
> > > > > > Rahul
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Deleting range of rows from Hbase.

Posted by yonghu <yo...@gmail.com>.
So, I can understand it as a predefined coprocessor. :)

regards!

Yong


On Thu, Jul 4, 2013 at 1:12 PM, Anoop John <an...@gmail.com> wrote:

> BulkDeleteEndpoint  is a coprocessor endpoint impl.  For the usage pls
> refer TestBulkDeleteProtocol.
> You will be able to call the API at client side and the actual execution
> will happen at server side.. (This is what will happen with Endpoints :)  )
>
> -Anoop-
>
> On Thu, Jul 4, 2013 at 4:29 PM, yonghu <yo...@gmail.com> wrote:
>
> > Hi Anoop
> > one more question. Can I use BulkDeleteEndpoint at the client side or
> > should I use it like coprocessor which deployed in the server side?
> >
> > Thanks!
> >
> > Yong
> >
> >
> > On Thu, Jul 4, 2013 at 12:50 PM, Anoop John <an...@gmail.com>
> wrote:
> >
> > > It is not supported from shell.  Not directly from delete API also..
> > >
> > > You can have a look at BulkDeleteEndpoint which can do what you want to
> > >
> > > -Anoop-
> > >
> > > On Thu, Jul 4, 2013 at 4:09 PM, yonghu <yo...@gmail.com> wrote:
> > >
> > > > I check the latest api of Delete class. I am afraid you have to do it
> > by
> > > > yourself.
> > > >
> > > > regards!
> > > >
> > > > Yong
> > > >
> > > >
> > > > On Wed, Jul 3, 2013 at 6:46 PM, Rahul Bhattacharjee <
> > > > rahul.rec.dgp@gmail.com
> > > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Like scan with range. I would like to delete rows with range.Is
> this
> > > > > supported from hbase shell ?
> > > > >
> > > > > Lets say I have a table with keys like
> > > > >
> > > > > A-34335
> > > > > A-34353535
> > > > > A-335353232
> > > > > B-33435
> > > > > B-4343
> > > > > C-5353533
> > > > >
> > > > > I want to delete all rows with prefix A using hbase shell.
> > > > >
> > > > > Thanks,
> > > > > Rahul
> > > > >
> > > >
> > >
> >
>

Re: Deleting range of rows from Hbase.

Posted by Anoop John <an...@gmail.com>.
BulkDeleteEndpoint  is a coprocessor endpoint impl.  For the usage pls
refer TestBulkDeleteProtocol.
You will be able to call the API at client side and the actual execution
will happen at server side.. (This is what will happen with Endpoints :)  )

-Anoop-

On Thu, Jul 4, 2013 at 4:29 PM, yonghu <yo...@gmail.com> wrote:

> Hi Anoop
> one more question. Can I use BulkDeleteEndpoint at the client side or
> should I use it like coprocessor which deployed in the server side?
>
> Thanks!
>
> Yong
>
>
> On Thu, Jul 4, 2013 at 12:50 PM, Anoop John <an...@gmail.com> wrote:
>
> > It is not supported from shell.  Not directly from delete API also..
> >
> > You can have a look at BulkDeleteEndpoint which can do what you want to
> >
> > -Anoop-
> >
> > On Thu, Jul 4, 2013 at 4:09 PM, yonghu <yo...@gmail.com> wrote:
> >
> > > I check the latest api of Delete class. I am afraid you have to do it
> by
> > > yourself.
> > >
> > > regards!
> > >
> > > Yong
> > >
> > >
> > > On Wed, Jul 3, 2013 at 6:46 PM, Rahul Bhattacharjee <
> > > rahul.rec.dgp@gmail.com
> > > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Like scan with range. I would like to delete rows with range.Is this
> > > > supported from hbase shell ?
> > > >
> > > > Lets say I have a table with keys like
> > > >
> > > > A-34335
> > > > A-34353535
> > > > A-335353232
> > > > B-33435
> > > > B-4343
> > > > C-5353533
> > > >
> > > > I want to delete all rows with prefix A using hbase shell.
> > > >
> > > > Thanks,
> > > > Rahul
> > > >
> > >
> >
>

Re: Deleting range of rows from Hbase.

Posted by yonghu <yo...@gmail.com>.
Hi Anoop
one more question. Can I use BulkDeleteEndpoint at the client side or
should I use it like coprocessor which deployed in the server side?

Thanks!

Yong


On Thu, Jul 4, 2013 at 12:50 PM, Anoop John <an...@gmail.com> wrote:

> It is not supported from shell.  Not directly from delete API also..
>
> You can have a look at BulkDeleteEndpoint which can do what you want to
>
> -Anoop-
>
> On Thu, Jul 4, 2013 at 4:09 PM, yonghu <yo...@gmail.com> wrote:
>
> > I check the latest api of Delete class. I am afraid you have to do it by
> > yourself.
> >
> > regards!
> >
> > Yong
> >
> >
> > On Wed, Jul 3, 2013 at 6:46 PM, Rahul Bhattacharjee <
> > rahul.rec.dgp@gmail.com
> > > wrote:
> >
> > > Hi,
> > >
> > > Like scan with range. I would like to delete rows with range.Is this
> > > supported from hbase shell ?
> > >
> > > Lets say I have a table with keys like
> > >
> > > A-34335
> > > A-34353535
> > > A-335353232
> > > B-33435
> > > B-4343
> > > C-5353533
> > >
> > > I want to delete all rows with prefix A using hbase shell.
> > >
> > > Thanks,
> > > Rahul
> > >
> >
>

Re: Deleting range of rows from Hbase.

Posted by Anoop John <an...@gmail.com>.
It is not supported from shell.  Not directly from delete API also..

You can have a look at BulkDeleteEndpoint which can do what you want to

-Anoop-

On Thu, Jul 4, 2013 at 4:09 PM, yonghu <yo...@gmail.com> wrote:

> I check the latest api of Delete class. I am afraid you have to do it by
> yourself.
>
> regards!
>
> Yong
>
>
> On Wed, Jul 3, 2013 at 6:46 PM, Rahul Bhattacharjee <
> rahul.rec.dgp@gmail.com
> > wrote:
>
> > Hi,
> >
> > Like scan with range. I would like to delete rows with range.Is this
> > supported from hbase shell ?
> >
> > Lets say I have a table with keys like
> >
> > A-34335
> > A-34353535
> > A-335353232
> > B-33435
> > B-4343
> > C-5353533
> >
> > I want to delete all rows with prefix A using hbase shell.
> >
> > Thanks,
> > Rahul
> >
>

Re: Deleting range of rows from Hbase.

Posted by yonghu <yo...@gmail.com>.
I check the latest api of Delete class. I am afraid you have to do it by
yourself.

regards!

Yong


On Wed, Jul 3, 2013 at 6:46 PM, Rahul Bhattacharjee <rahul.rec.dgp@gmail.com
> wrote:

> Hi,
>
> Like scan with range. I would like to delete rows with range.Is this
> supported from hbase shell ?
>
> Lets say I have a table with keys like
>
> A-34335
> A-34353535
> A-335353232
> B-33435
> B-4343
> C-5353533
>
> I want to delete all rows with prefix A using hbase shell.
>
> Thanks,
> Rahul
>