hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1520425 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
Date Thu, 05 Sep 2013 21:05:47 GMT
Author: apurtell
Date: Thu Sep  5 21:05:47 2013
New Revision: 1520425

URL: http://svn.apache.org/r1520425
Log:
HBASE-9314. Dropping a table always prints a TableInfoMissingException in the master log

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java?rev=1520425&r1=1520424&r2=1520425&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
Thu Sep  5 21:05:47 2013
@@ -176,11 +176,7 @@ public class FSTableDescriptors implemen
           + tablename, ioe);
     }
     
-    if (tdmt == null) {
-      LOG.warn("The following folder is in HBase's root directory and " +
-        "doesn't contain a table descriptor, " +
-        "do consider deleting it: " + tablename);
-    } else {
+    if (tdmt != null) {
       this.cache.put(tablename, tdmt);
     }
     return tdmt == null ? null : tdmt.getTableDescriptor();
@@ -487,6 +483,11 @@ public class FSTableDescriptors implemen
     return readTableDescriptor(fs, status, false);
   }
   
+  /**
+   * @param tableName table name
+   * @return TableDescriptorAndModtime or null if no table descriptor was found
+   * @throws IOException
+   */
   private TableDescriptorAndModtime getTableDescriptorAndModtime(TableName tableName)
   throws IOException {
     // ignore both -ROOT- and .META. tables
@@ -496,11 +497,17 @@ public class FSTableDescriptors implemen
     return getTableDescriptorAndModtime(getTableDir(tableName));
   }
 
+  /**
+   * @param tableDir path to table directory
+   * @return TableDescriptorAndModtime or null if no table descriptor was found
+   * at the specified path
+   * @throws IOException
+   */
   private TableDescriptorAndModtime getTableDescriptorAndModtime(Path tableDir)
   throws IOException {
     FileStatus status = getTableInfoPath(tableDir);
     if (status == null) {
-      throw new TableInfoMissingException("No table descriptor file under " + tableDir);
+      return null;
     }
     HTableDescriptor htd = readTableDescriptor(fs, status, !fsreadonly);
     return new TableDescriptorAndModtime(status.getModificationTime(), htd);



Mime
View raw message