hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: How to merge regions?
Date Wed, 18 Jul 2012 13:49:48 GMT
On Tue, Jul 17, 2012 at 7:08 PM, Ionut Ignatescu
<ionut.ignatescu@gmail.com> wrote:
> - Let's say I have more consecutive empty regions. I'm considering 2 options
> in this situation: merge empty partitions in a bigger one or
> stick them to the first non-empty region. I think for the second approach I
> have to disable the table, but I don't see any other problem. Is this right?

If you do the former, you do not have to take any "data" offline.  You
can remove from .META. (and the region dir in hdfs) all empty regions
and then when done, make a new empty region that spans the gap of all
regions just removed.

For the later, you will need to take the table off line or just close
the region being operated on while you do your operation.  Changing
the metadata on a region such as its start keys, changes its hash
which means that the region's dir name changes in HDFS (the name in
hdfs is hash of the regions meta data).  Because of this, you will
have to move content of current region into the new region (You'll
have to then close and reopen the region so we open the files that
were just moved into the new location).

Are you doing scans across the whole table?  If so, while you operate
on .META., there will be times when there are holes across which scan
cannot cross.  So, can you disable these while you are doing your
table ops?


View raw message