On Wed, Aug 17, 2011 at 9:54 AM, Geoff Hendrey <[email protected]> wrote: > So I take it the best approach is to: > 1) close the original region (the region whose .META.'s endkey we want to > repoint) > 2) delete the region's row from .META. > 3) Put a new row into .META., the new row's hregioninfo having the desired > endkey such that there is no more "hole" in .META. >
This looks good. > I'm trying to nail down exactly the sequence of steps we should take so that > we don't have to do scary manual surgery of -ROOT- and .META. like we did > yesterday. We we're pretty much fumbling around in the dark trying to figure > out the structure of -ROOT-'s HDFS files, and same for .META. after our first > failed attempt to update the endrow. We did figure it out, and removed the > files from .META. and -ROOT- that prevented hbase from coming up. Our error > was that instead of updating the endrow in .META. we inadvertently put a new > row into .META. with default timestamp, and that basically shot everything to > hell. I couldn't find docs on the structure of -ROOT- and .META. HDFS files, > but we sort of pieced it together and we're able to remove the newly created > files in -ROOT- and .META. based on the their creation times and grepping > their content, after which hbase was able to come back up without error. > > So, apologies for going slow on this, and really trying to exactly nail down > the set of steps we should proceed with in order to avoid another > self-inflicted corruption. > Ugh. You shouldn't have to do this. We owe better tools here. You figured flushing .META. and -ROOT- then copying them aside in case you make error next time around you could restart atop the copies? On the format of .meta. and -root- hfiles, they are same as any other hfiles. The format of the key though in these tables could do w/ some description in that the 'startrow' is a region name (in root the startrow is the meta region name which itself contains a startrow that is the name of a user-space region -- we should write this up). St.Ack
