hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1334476 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Date Sat, 05 May 2012 20:01:23 GMT
Author: tedyu
Date: Sat May  5 20:01:22 2012
New Revision: 1334476

URL: http://svn.apache.org/viewvc?rev=1334476&view=rev
Log:
HBASE-5894  Table deletion failed but HBaseAdmin#deletetable reports it as success (Xufeng)

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1334476&r1=1334475&r2=1334476&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Sat May  5 20:01:22 2012
@@ -59,6 +59,7 @@ Release 0.92.2 - Unreleased
    HBASE-5897  prePut coprocessor hook causing substantial CPU usage (Todd)
    HBASE-5883  Backup master is going down due to connection refused exception (Jieshan)
    HBASE-5928  Hbck shouldn't npe when there are no tables (Elliott Clark)
+   HBASE-5894  Table deletion failed but HBaseAdmin#deletetable reports it as success (Xufeng)
 
   IMPROVEMENTS
    HBASE-5592  Make it easier to get a table from shell (Ben West)

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1334476&r1=1334475&r2=1334476&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java Sat May
 5 20:01:22 2012
@@ -478,6 +478,7 @@ public class HBaseAdmin implements Abort
     isMasterRunning();
     HTableDescriptor.isLegalTableName(tableName);
     HRegionLocation firstMetaServer = getFirstMetaServerForTable(tableName);
+    boolean tableExists = true;
     try {
       getMaster().deleteTable(tableName);
     } catch (RemoteException e) {
@@ -501,7 +502,7 @@ public class HBaseAdmin implements Abort
         // let us wait until .META. table is updated and
         // HMaster removes the table from its HTableDescriptors
         if (values == null) {
-          boolean tableExists = false;
+          tableExists = false;
           HTableDescriptor[] htds = getMaster().getHTableDescriptors();
           if (htds != null && htds.length > 0) {
             for (HTableDescriptor htd: htds) {
@@ -537,6 +538,11 @@ public class HBaseAdmin implements Abort
         // continue
       }
     }
+    
+    if (tableExists) {
+      throw new IOException("Retries exhausted, it took too long to wait"+
+        " for the table " + Bytes.toString(tableName) + " to be deleted.");
+    }
     // Delete cached information to prevent clients from using old locations
     this.connection.clearRegionCache(tableName);
     LOG.info("Deleted " + Bytes.toString(tableName));



Mime
View raw message