You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Anty <an...@gmail.com> on 2009/08/24 17:42:18 UTC

how to online the new created region

hi:
   all
      In the source code of hbase-0.20.0,we can create a table by calling
HBaseAdmin.createTable(HTableDescriptor desc) method,

   In the source code ,that method have completed the fellowing work:
    1.create a HRegionInfo for the first region of the table which we want
to create.
    2.check to see if table already exists.
    3.create a region accoriding to the HRegionInfo
    4.put a row for the created region into meta table.
    5.close the new region to flush it to disk,Close its log file too
    6.set the new created region unassigned.

       Then ,as far as i understand, the regionServer thread call the method
hbaseMaster.regionServerReport(....) to communicate with the master, and get
instructions from the master.the regionServer thread will process these
instructions(massages) ,
       I think the created region above is assigned to a regionServer
only after the regionServer  processing the massage MSG_REGION_OPEN.but what
confusing me most is when processing the massage MSG_REGION_OPEN, it create
a region again  according to the regionInfo which we have done that in step
3 above ......i can't understand this,maybe i am wrong.
       Expecting any reply.
       Thanks in advance!






-- 
Anty Rao