hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1136125 - /hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Date Wed, 15 Jun 2011 17:18:13 GMT
Author: stack
Date: Wed Jun 15 17:18:13 2011
New Revision: 1136125

URL: http://svn.apache.org/viewvc?rev=1136125&view=rev
Log:
HBASE-451   Remove HTableDescriptor from HRegionInfo -- fix for TestAdmin

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

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=1136125&r1=1136124&r2=1136125&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 Wed Jun 15 17:18:13
2011
@@ -901,16 +901,10 @@ implements HMasterInterface, HMasterRegi
     if (!isMasterRunning()) {
       throw new MasterNotRunningException();
     }
-    String tableName = hTableDescriptor.getNameAsString();
-    if(MetaReader.tableExists(catalogTracker, tableName)) {
-      throw new TableExistsException(tableName);
-    }
-
     if (cpHost != null) {
       cpHost.preCreateTable(hTableDescriptor, splitKeys);
     }
     HRegionInfo [] newRegions = getHRegionInfos(hTableDescriptor, splitKeys);
-    storeTableDescriptor(hTableDescriptor);
     int timeout = conf.getInt("hbase.client.catalog.timeout", 10000);
     // Need META availability to create a table
     try {
@@ -945,9 +939,9 @@ implements HMasterInterface, HMasterRegi
   return hRegionInfos;
 }
 
-  private void storeTableDescriptor(HTableDescriptor hTableDescriptor) {
+  private void storeTableDescriptor(HTableDescriptor hTableDescriptor)
+      throws IOException {
     FSUtils.createTableDescriptor(hTableDescriptor, conf);
-    //fileSystemManager.createTableDescriptor(hTableDescriptor);
   }
 
   private synchronized void createTable(final HTableDescriptor hTableDescriptor,
@@ -958,6 +952,8 @@ implements HMasterInterface, HMasterRegi
     if(MetaReader.tableExists(catalogTracker, tableName)) {
       throw new TableExistsException(tableName);
     }
+    storeTableDescriptor(hTableDescriptor);
+
     for (HRegionInfo newRegion : newRegions) {
       // 1. Set table enabling flag up in zk.
       try {



Mime
View raw message