hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ionut Ignatescu" <ionut.ignate...@gmail.com>
Subject RE: How to merge regions?
Date Sat, 21 Jul 2012 05:18:32 GMT
Hi again,

Please provide me some extra-info:
- what I have to add in the new record added to .META.?
Basically, the region info has all info from HRegionInfo object created
using startKey,endKey and table + column descritpr. But how to set the other
columns?Or are them necceassry?
-Also in HDFS I have to create the folders for columns families?
Ex: /hbase/table/regionXX/colFam1
/hbase/table/regionXX/colFam2


Regards,
Ionut I.

-----Original Message-----
From: saint.ack@gmail.com [mailto:saint.ack@gmail.com] On Behalf Of Stack
Sent: Wednesday, July 18, 2012 4:50 PM
To: dev@hbase.apache.org
Subject: Re: How to merge regions?

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?

St.Ack


Mime
View raw message