[ 
https://issues.apache.org/jira/browse/HBASE-15712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936873#comment-15936873
 ] 

Nick Dimiduk commented on HBASE-15712:
--------------------------------------

Sorry for the long delay.

Here's the script we've been running in Prod for the last year or so. The 
use-case it supports is storage of write-once event log data in tables using 
Phoenix's [Row Timestamp|https://phoenix.apache.org/rowtimestamp.html] feature 
in combination with HBase's [TTL|http://hbase.apache.org/book.html#ttl] 
functionality. Because the timestamp is included in the rowkey, we end up with 
regions that contain no data after their expire period. This script is run 
periodically on those tables to prune off the empty region. It has similar 
issues as HBCK in that cluster topology can change between when it decides on 
an execution plan and execution of that plan, but multiple runs will converge.

https://gist.github.com/ndimiduk/6594d55a7a282c5d3378e65b9582deaa

> Tool for retiring empty regions
> -------------------------------
>
>                 Key: HBASE-15712
>                 URL: https://issues.apache.org/jira/browse/HBASE-15712
>             Project: HBase
>          Issue Type: Task
>          Components: scripts
>            Reporter: Nick Dimiduk
>            Priority: Minor
>
> For folks with rowkey design that includes timestamp, in combination with the 
> TTL feature, empty regions will accumulate. This includes folks making use of 
> Phoenix's [Row timestamps|https://phoenix.apache.org/rowtimestamp.html]. 
> Provide some scripts for cleaning up these empty regions.
> See conversation over on hbase-user: 
> http://mail-archives.apache.org/mod_mbox/hbase-user/201604.mbox/%3CCANZa=gtzgnpqeemvj5p8rjfv-x93vnragoymd1flyc1ahjz...@mail.gmail.com%3E



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to