|
Jean-Marc Spaggiari
2012-10-13, 23:26
yuzhihong@...
2012-10-14, 00:13
Jean-Marc Spaggiari
2012-10-14, 00:30
Ted Yu
2012-10-14, 02:33
Ramkrishna.S.Vasudevan
2012-10-15, 04:55
Jean-Marc Spaggiari
2012-10-15, 14:04
Ted Yu
2012-10-15, 15:07
Jean-Marc Spaggiari
2012-10-25, 13:51
Ted Yu
2012-10-25, 13:58
|
-
Delete by timestamp?Jean-Marc Spaggiari 2012-10-13, 23:26
Hi,
Is there a way to delete all rows older than a certain date? In the delete object we can specify a timestamp but we have to specify a row too. I can still do a MR job and delete all row older than the given date, but is there another option? Thanks, JM
-
Re: Delete by timestamp?yuzhihong@... 2012-10-14, 00:13
Please take a look at HBASE-6942 where you can achieve the following using an endpoint.
Cheers On Oct 13, 2012, at 4:26 PM, Jean-Marc Spaggiari <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to delete all rows older than a certain date? > > In the delete object we can specify a timestamp but we have to specify > a row too. > > I can still do a MR job and delete all row older than the given date, > but is there another option? > > Thanks, > > JM
-
Re: Delete by timestamp?Jean-Marc Spaggiari 2012-10-14, 00:30
Wow. Seems it's coming right on time ;)
Is there any code example on the way to call an endpoint? Thanks, JM 2012/10/13 <[EMAIL PROTECTED]>: > Please take a look at HBASE-6942 where you can achieve the following using an endpoint. > > Cheers > > > > On Oct 13, 2012, at 4:26 PM, Jean-Marc Spaggiari <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Is there a way to delete all rows older than a certain date? >> >> In the delete object we can specify a timestamp but we have to specify >> a row too. >> >> I can still do a MR job and delete all row older than the given date, >> but is there another option? >> >> Thanks, >> >> JM
-
Re: Delete by timestamp?Ted Yu 2012-10-14, 02:33
In the latest patch, you should see this class which can be used as example
for client: src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestBulkDeleteProtocol.java Cheers On Sat, Oct 13, 2012 at 5:30 PM, Jean-Marc Spaggiari < [EMAIL PROTECTED]> wrote: > Wow. Seems it's coming right on time ;) > > Is there any code example on the way to call an endpoint? > > Thanks, > > JM > > 2012/10/13 <[EMAIL PROTECTED]>: > > Please take a look at HBASE-6942 where you can achieve the following > using an endpoint. > > > > Cheers > > > > > > > > On Oct 13, 2012, at 4:26 PM, Jean-Marc Spaggiari < > [EMAIL PROTECTED]> wrote: > > > >> Hi, > >> > >> Is there a way to delete all rows older than a certain date? > >> > >> In the delete object we can specify a timestamp but we have to specify > >> a row too. > >> > >> I can still do a MR job and delete all row older than the given date, > >> but is there another option? > >> > >> Thanks, > >> > >> JM >
-
RE: Delete by timestamp?Ramkrishna.S.Vasudevan 2012-10-15, 04:55
Also just see the discussions over the JIRA which will help you to come out
with more specific usecases that you want to implement. The example over there will surely help you out. Regards Ram > -----Original Message----- > From: Ted Yu [mailto:[EMAIL PROTECTED]] > Sent: Sunday, October 14, 2012 8:03 AM > To: [EMAIL PROTECTED] > Subject: Re: Delete by timestamp? > > In the latest patch, you should see this class which can be used as > example > for client: > src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestBulkDelet > eProtocol.java > > Cheers > > On Sat, Oct 13, 2012 at 5:30 PM, Jean-Marc Spaggiari < > [EMAIL PROTECTED]> wrote: > > > Wow. Seems it's coming right on time ;) > > > > Is there any code example on the way to call an endpoint? > > > > Thanks, > > > > JM > > > > 2012/10/13 <[EMAIL PROTECTED]>: > > > Please take a look at HBASE-6942 where you can achieve the > following > > using an endpoint. > > > > > > Cheers > > > > > > > > > > > > On Oct 13, 2012, at 4:26 PM, Jean-Marc Spaggiari < > > [EMAIL PROTECTED]> wrote: > > > > > >> Hi, > > >> > > >> Is there a way to delete all rows older than a certain date? > > >> > > >> In the delete object we can specify a timestamp but we have to > specify > > >> a row too. > > >> > > >> I can still do a MR job and delete all row older than the given > date, > > >> but is there another option? > > >> > > >> Thanks, > > >> > > >> JM > >
-
Re: Delete by timestamp?Jean-Marc Spaggiari 2012-10-15, 14:04
I found that: https://blogs.apache.org/hbase/entry/coprocessor_introduction
which is, I think, giving all the details to call the end point... So I will give a try to all of that. JM 2012/10/13, Jean-Marc Spaggiari <[EMAIL PROTECTED]>: > Wow. Seems it's coming right on time ;) > > Is there any code example on the way to call an endpoint? > > Thanks, > > JM > > 2012/10/13 <[EMAIL PROTECTED]>: >> Please take a look at HBASE-6942 where you can achieve the following using >> an endpoint. >> >> Cheers >> >> >> >> On Oct 13, 2012, at 4:26 PM, Jean-Marc Spaggiari <[EMAIL PROTECTED]> >> wrote: >> >>> Hi, >>> >>> Is there a way to delete all rows older than a certain date? >>> >>> In the delete object we can specify a timestamp but we have to specify >>> a row too. >>> >>> I can still do a MR job and delete all row older than the given date, >>> but is there another option? >>> >>> Thanks, >>> >>> JM >
-
Re: Delete by timestamp?Ted Yu 2012-10-15, 15:07
Jean-Marc:
What do you think of the approach in patch v5 from HBASE-6942 ? Here is the sample from patch v5: + private long invokeBulkDeleteProtocol(byte[] tableName, final Scan scan, + final int rowBatchSize, DeleteType deleteType, Long timeStamp) throws Throwable { + HTable ht = new HTable(TEST_UTIL.getConfiguration(), tableName); + long noOfDeletedRows = 0L; + scan.setAttribute(BulkDeleteEndpoint.DELETE_ROW_BATCH_SIZE, Bytes.toBytes(rowBatchSize)); + scan.setAttribute(BulkDeleteEndpoint.DELETE_TYPE, deleteType.getBytes()); + if (timeStamp != null) { + scan.setAttribute(BulkDeleteEndpoint.DELETE_TIME_STAMP, Bytes.toBytes(timeStamp)); + } Cheers On Mon, Oct 15, 2012 at 7:04 AM, Jean-Marc Spaggiari < [EMAIL PROTECTED]> wrote: > I found that: > https://blogs.apache.org/hbase/entry/coprocessor_introduction > which is, I think, giving all the details to call the end point... So > I will give a try to all of that. > > JM > > 2012/10/13, Jean-Marc Spaggiari <[EMAIL PROTECTED]>: > > Wow. Seems it's coming right on time ;) > > > > Is there any code example on the way to call an endpoint? > > > > Thanks, > > > > JM > > > > 2012/10/13 <[EMAIL PROTECTED]>: > >> Please take a look at HBASE-6942 where you can achieve the following > using > >> an endpoint. > >> > >> Cheers > >> > >> > >> > >> On Oct 13, 2012, at 4:26 PM, Jean-Marc Spaggiari < > [EMAIL PROTECTED]> > >> wrote: > >> > >>> Hi, > >>> > >>> Is there a way to delete all rows older than a certain date? > >>> > >>> In the delete object we can specify a timestamp but we have to specify > >>> a row too. > >>> > >>> I can still do a MR job and delete all row older than the given date, > >>> but is there another option? > >>> > >>> Thanks, > >>> > >>> JM > > >
-
Re: Delete by timestamp?Jean-Marc Spaggiari 2012-10-25, 13:51
Hi Ted,
Sorry, I totally missed this email too :( Many of my HBase list emails went into the junk folder those last few weeks and just figured that yesterday. So I have a LOT of reading to do. I looked at all the HBASE-6942 thread and seems it's now commited in 0.94.3. I will wait for this version to be available to test it, but I really like the approach already. JM 2012/10/15, Ted Yu <[EMAIL PROTECTED]>: > Jean-Marc: > What do you think of the approach in patch v5 from HBASE-6942 ? > Here is the sample from patch v5: > > + private long invokeBulkDeleteProtocol(byte[] tableName, final Scan scan, > + final int rowBatchSize, DeleteType deleteType, Long timeStamp) > throws Throwable { > + HTable ht = new HTable(TEST_UTIL.getConfiguration(), tableName); > + long noOfDeletedRows = 0L; > + scan.setAttribute(BulkDeleteEndpoint.DELETE_ROW_BATCH_SIZE, > Bytes.toBytes(rowBatchSize)); > + scan.setAttribute(BulkDeleteEndpoint.DELETE_TYPE, > deleteType.getBytes()); > + if (timeStamp != null) { > + scan.setAttribute(BulkDeleteEndpoint.DELETE_TIME_STAMP, > Bytes.toBytes(timeStamp)); > + } > > Cheers > > On Mon, Oct 15, 2012 at 7:04 AM, Jean-Marc Spaggiari < > [EMAIL PROTECTED]> wrote: > >> I found that: >> https://blogs.apache.org/hbase/entry/coprocessor_introduction >> which is, I think, giving all the details to call the end point... So >> I will give a try to all of that. >> >> JM >> >> 2012/10/13, Jean-Marc Spaggiari <[EMAIL PROTECTED]>: >> > Wow. Seems it's coming right on time ;) >> > >> > Is there any code example on the way to call an endpoint? >> > >> > Thanks, >> > >> > JM >> > >> > 2012/10/13 <[EMAIL PROTECTED]>: >> >> Please take a look at HBASE-6942 where you can achieve the following >> using >> >> an endpoint. >> >> >> >> Cheers >> >> >> >> >> >> >> >> On Oct 13, 2012, at 4:26 PM, Jean-Marc Spaggiari < >> [EMAIL PROTECTED]> >> >> wrote: >> >> >> >>> Hi, >> >>> >> >>> Is there a way to delete all rows older than a certain date? >> >>> >> >>> In the delete object we can specify a timestamp but we have to >> >>> specify >> >>> a row too. >> >>> >> >>> I can still do a MR job and delete all row older than the given date, >> >>> but is there another option? >> >>> >> >>> Thanks, >> >>> >> >>> JM >> > >> >
-
Re: Delete by timestamp?Ted Yu 2012-10-25, 13:58
Glad that you like the approach, Jean-Marc.
Tell us your experience when 0.94.3 comes out next month. On Thu, Oct 25, 2012 at 6:51 AM, Jean-Marc Spaggiari < [EMAIL PROTECTED]> wrote: > Hi Ted, > > Sorry, I totally missed this email too :( Many of my HBase list emails > went into the junk folder those last few weeks and just figured that > yesterday. So I have a LOT of reading to do. > > I looked at all the HBASE-6942 thread and seems it's now commited in > 0.94.3. I will wait for this version to be available to test it, but I > really like the approach already. > > JM > > 2012/10/15, Ted Yu <[EMAIL PROTECTED]>: > > Jean-Marc: > > What do you think of the approach in patch v5 from HBASE-6942 ? > > Here is the sample from patch v5: > > > > + private long invokeBulkDeleteProtocol(byte[] tableName, final Scan > scan, > > + final int rowBatchSize, DeleteType deleteType, Long timeStamp) > > throws Throwable { > > + HTable ht = new HTable(TEST_UTIL.getConfiguration(), tableName); > > + long noOfDeletedRows = 0L; > > + scan.setAttribute(BulkDeleteEndpoint.DELETE_ROW_BATCH_SIZE, > > Bytes.toBytes(rowBatchSize)); > > + scan.setAttribute(BulkDeleteEndpoint.DELETE_TYPE, > > deleteType.getBytes()); > > + if (timeStamp != null) { > > + scan.setAttribute(BulkDeleteEndpoint.DELETE_TIME_STAMP, > > Bytes.toBytes(timeStamp)); > > + } > > > > Cheers > > > > On Mon, Oct 15, 2012 at 7:04 AM, Jean-Marc Spaggiari < > > [EMAIL PROTECTED]> wrote: > > > >> I found that: > >> https://blogs.apache.org/hbase/entry/coprocessor_introduction > >> which is, I think, giving all the details to call the end point... So > >> I will give a try to all of that. > >> > >> JM > >> > >> 2012/10/13, Jean-Marc Spaggiari <[EMAIL PROTECTED]>: > >> > Wow. Seems it's coming right on time ;) > >> > > >> > Is there any code example on the way to call an endpoint? > >> > > >> > Thanks, > >> > > >> > JM > >> > > >> > 2012/10/13 <[EMAIL PROTECTED]>: > >> >> Please take a look at HBASE-6942 where you can achieve the following > >> using > >> >> an endpoint. > >> >> > >> >> Cheers > >> >> > >> >> > >> >> > >> >> On Oct 13, 2012, at 4:26 PM, Jean-Marc Spaggiari < > >> [EMAIL PROTECTED]> > >> >> wrote: > >> >> > >> >>> Hi, > >> >>> > >> >>> Is there a way to delete all rows older than a certain date? > >> >>> > >> >>> In the delete object we can specify a timestamp but we have to > >> >>> specify > >> >>> a row too. > >> >>> > >> >>> I can still do a MR job and delete all row older than the given > date, > >> >>> but is there another option? > >> >>> > >> >>> Thanks, > >> >>> > >> >>> JM > >> > > >> > > > |