hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohit Nigam" <rni...@decarta.com>
Subject RE: version mismatch exception
Date Thu, 18 Aug 2011 21:43:03 GMT
Thanks St.Ack
This really worked , was able to fix the hole .

-----Original Message-----
From: saint.ack@gmail.com [mailto:saint.ack@gmail.com] On Behalf Of Stack
Sent: Thursday, August 18, 2011 11:29 AM
To: Rohit Nigam
Cc: Geoff Hendrey; user@hbase.apache.org; Search
Subject: Re: version mismatch exception

On Wed, Aug 17, 2011 at 1:12 PM, Rohit Nigam <rnigam@decarta.com> wrote:
> Hi St.Ack
> The region in the file System are good, all I am looking is to change the end key of
that region in the .META. table so that chaining problem goes away .The way I am planning
to do is to get the HRegionInfo object for that existing region key from the .META. table
. Create a new HRegionInfo obj with the updated endkey , start key and regionid being the
same as from the result above and do a put in the .META. table. I think I just change the
endkey and nothing else it will not create  a new row in .META. table and would just update
the existing row. Please confirm if my theory is right.

1. Close the existing region if open.
2. Read the existing hregioninfo.
3. Use existing hregioninfo htabledescriptor and this construction,
byte[], byte[]), to  make a new hregioninfo.   It will have a
different encoding to the original.
4. Insert the new entry in .META. using new hregioninfo name as row
key and add an info:regioninfo whose contents is the serialized new
5. Delete the original row from .META.
6. Assign the new region.

If you want the data from the old region in the new region, then you
should copy any files in that are under the old entries directory into
the new region directory (find the regions by using the encoded name;
the encoded name is an attribute of hregioninfo).  After copying in
the data, you'll need to reassign the region.  The files are only
noticed on region open.


View raw message