hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Phelps <...@opendns.com>
Subject Modifying existing table entries
Date Mon, 13 Dec 2010 19:11:28 GMT
Does anyone have suggestions regarding the best way to modify existing 
entries in a table?

We have our tables set up such that when we create an entry we set its 
timestamp such that the entry has a rough expiration time, ie we have a 
TTL on the table as a whole and then adjust the time stamp so that HBase 
will clean up the entry approximately when we wish.

However there are some rare situations where we would like to change 
that expiration time on a subset of the entries (typically either to 
have them expire immediately or to extend their life).

My current thought is to use TableMapReduceUtil to run a MR job against 
a table, filter out just the keys I need to change, create copies of the 
KeyValue's for that key with a new timestamp, and write them back out 
using the existing keys.  Would something along these lines work?

Alternately is there some better way to do this that I haven't seen yet?

- Adam

View raw message