Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase, mail # user - Delete by timestamp?


+
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
Copy link to this message
-
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
>> >
>>
>
+
Ted Yu 2012-10-25, 13:58