On Wed, Jul 6, 2011 at 5:37 AM, Xu-Feng Mao <m9s...@gmail.com> wrote: >> Can anyone give a detailed example, step by step instruction would be >> greatly appreciated. >> My understand is we should >> 1.Since we already has the lost region, we now have start and end keys. >> 2.generate the row represents the missing region. But how can I generate >> the encoded name?
Its generate for you when you create an HRegionInfo instance (See its constructors; it takes start and end keys as well as HTableDesc instance for your table). >> It looks like I need >> column=info:server,column=info:serverstartcode and column=info:regioninfo >> for the missing region. info:startcode and info:server will be added for you on assign. You just add the info:regioninfo. >> As for the name of row, it consists of tablename, startkey, encode, and >> one more long number, >> how to get this number? The row key is the region name. Region name is made up of the startkey, encode, and a hash of the startkey, encode..... Its made for you when you create the HRegionInfo instance. See below for more. >> 3.use assing command in the hbase shell >> >> We also tried check_meta.rb --fix, it reports >> ==== >> 11/07/06 00:09:08 WARN check_meta: hole after REGION => {NAME => >> 'STable,ztqdVD8fCMP-dDbXUAydankboD4=,1305619724446.c45191821053d03537596f4a2e759718.', >> STARTKEY => 'ztqdVD8fCMP-dDbXUAydankboD4=', ENDKEY => >> 'ztxrGmCwn-6BE32s3cX1TNeHU_I=', ENCODED => c45191821053d03537596f4a2e759718, >> TABLE => {{NAME => 'STable', FAMILIES => [{NAME => 'file', BLOOMFILTER => >> 'NONE', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '3', >> TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE >> => 'true'}, {NAME => 'filelength', BLOOMFILTER => 'NONE', REPLICATION_SCOPE >> => '0', COMPRESSION => 'NONE', VERSIONS => '3', TTL => '2147483647', >> BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}, {NAME => >> 'userbucket', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', COMPRESSION >> => 'NONE', VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', >> IN_MEMORY => 'false', BLOCKCACHE => 'true'}, {NAME => 'userpass', >> BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', >> VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => >> 'false', BLOCKCACHE => 'true'}]}} >> 11/07/06 00:28:40 WARN check_meta: Missing .regioninfo: >> hdfs://hd0013.c.gj.com:9000/hbase/STable/3e6faca40a7ccad7ed8c0b5848c0f945/.regioninfo >> ==== >> >> The problem is still there. BTW, what about the blue warning? Is this a >> serious issue? Yes. check_meta.rb can't find the missing region on the fs so it can't repair it. You'll need to hack check_meta.rb so it doesn't get the HRegionInfo to use by reading the filesystem. Instead create the instance to insert in your version of check_meta.rb. >> The situation is quite hard to us, it looks like even we can fill the hole >> in the meta, we would lost all the data in the hole region, right? >> If its the bug I cited in my previous message, yes. Its critical we fix it and roll out a 0.90.4. St.Ack