Index: src/main/java/org/apache/hadoop/hbase/master/HMaster.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/master/HMaster.java (revision e0fd38fd850cd61dc528125b2c69b4f427e21cb4) +++ src/main/java/org/apache/hadoop/hbase/master/HMaster.java (revision ) @@ -901,16 +901,10 @@ 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 @@ 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 @@ if(MetaReader.tableExists(catalogTracker, tableName)) { throw new TableExistsException(tableName); } + storeTableDescriptor(hTableDescriptor); + for (HRegionInfo newRegion : newRegions) { // 1. Set table enabling flag up in zk. try { Index: pom.xml =================================================================== --- pom.xml (revision e0fd38fd850cd61dc528125b2c69b4f427e21cb4) +++ pom.xml (revision ) @@ -416,15 +416,10 @@ **/*$* ${test.exclude.pattern} - - ${env.LD_LIBRARY_PATH}:${project.build.directory}/nativelib - ${env.DYLD_LIBRARY_PATH}:${project.build.directory}/nativelib - maven-antrun-plugin - 1.6 generate @@ -477,50 +472,12 @@ - - - - - run - - package - package - - - - - - - - - if [ `ls ${project.build.directory}/nativelib | wc -l` -ne 0 ]; then - cp -PR ${project.build.directory}/nativelib/lib* ${project.build.directory}/${project.artifactId}-${project.version}/${project.artifactId}-${project.version}/lib/native/${build.platform} - fi - - - - - - - - - - - - - - - - run - - @@ -630,7 +587,6 @@ 1.0.1 0.6.1 3.3.3 - 0.0.1-SNAPSHOT /usr /etc/hbase @@ -1022,78 +978,6 @@ - - - os.linux - - false - - Linux - - - - ${os.name}-${os.arch}-${sun.arch.data.model} - - - - os.mac - - - Mac - - - - Mac_OS_X-${sun.arch.data.model} - - - - - hadoop-snappy - - false - - snappy - - - - - org.apache.hadoop - hadoop-snappy - ${hadoop-snappy.version} - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - get-hadoop-snappy-native - generate-resources - - copy - - - - - org.apache.hadoop - hadoop-snappy - ${hadoop-snappy.version} - ${build.platform} - tar - false - ${project.build.directory}/nativelib - hadoop-snappy-nativelibs.tar - - - - - - - - -