hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1041569 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Date Thu, 02 Dec 2010 20:18:30 GMT
Author: jdcryans
Date: Thu Dec  2 20:18:29 2010
New Revision: 1041569

URL: http://svn.apache.org/viewvc?rev=1041569&view=rev
Log:
HBASE-3296  Newly created table ends up disabled instead of assigned

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1041569&r1=1041568&r2=1041569&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu Dec  2 20:18:29 2010
@@ -738,6 +738,7 @@ Release 0.90.0 - Unreleased
                and it's very confusing
    HBASE-3301  Treat java.net.SocketTimeoutException same as ConnectException
                assigning/unassigning regions
+   HBASE-3296  Newly created table ends up disabled instead of assigned
 
 
   IMPROVEMENTS

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1041569&r1=1041568&r2=1041569&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Thu Dec  2 20:18:29
2010
@@ -767,18 +767,27 @@ implements HMasterInterface, HMasterRegi
       throw new TableExistsException(tableName);
     }
     for(HRegionInfo newRegion : newRegions) {
-      // 1. Create HRegion
+
+      // 1. Set table enabling flag up in zk.
+      try {
+        assignmentManager.getZKTable().setEnabledTable(tableName);
+      } catch (KeeperException e) {
+        throw new IOException("Unable to ensure that the table will be" +
+            " enabled because of a ZooKeeper issue", e);
+      }
+
+      // 2. Create HRegion
       HRegion region = HRegion.createHRegion(newRegion,
           fileSystemManager.getRootDir(), conf);
 
-      // 2. Insert into META
+      // 3. Insert into META
       MetaEditor.addRegionToMeta(catalogTracker, region.getRegionInfo());
 
-      // 3. Close the new region to flush to disk.  Close log file too.
+      // 4. Close the new region to flush to disk.  Close log file too.
       region.close();
       region.getLog().closeAndDelete();
 
-      // 4. Trigger immediate assignment of this region
+      // 5. Trigger immediate assignment of this region
       assignmentManager.assign(region.getRegionInfo(), true);
     }
 



Mime
View raw message