On Sat, Jul 21, 2012 at 7:18 AM, Ionut Ignatescu <[email protected]> wrote: > 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?
The .META. info:regioninfo column has a serialized HRegionInfo in it. To get the HRegionInfo serialized bytes, see line #284 in bin/region_mover.rb: e.g. #284 bytes = Writables.getBytes(r) See how at top of script it imports Writables. You can then put the above bytes into the meta table. Suggest you practise in a standalone instance rather than prod install. If you want to java it, check out HBaseFsck for how it does .META. edits. See also bin/copy_table.rb. See how it does .META. edits. > -Also in HDFS I have to create the folders for columns families? > Ex: /hbase/table/regionXX/colFam1 > /hbase/table/regionXX/colFam2 > > You don't need to. They'll be created if absent. You just need to get the .META. edits right. St.Ack
