hbase-commits mailing list archives

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

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

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

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1334477&r1=1334476&r2=1334477&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Sat May  5 20:03:31 2012
@@ -28,6 +28,7 @@ Release 0.90.7 - Unreleased
    HBASE-5883  Backup master is going down due to connection refused exception (Jieshan)
    HBASE-5911  hbck need an option -help to printout usage
                (Jimmy Xiang)
+   HBASE-5894  Table deletion failed but HBaseAdmin#deletetable reports it as success (Xufeng)
 
   IMPROVEMENT
    HBASE-5588  Deprecate/remove AssignmentManager#clearRegionFromTransition

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1334477&r1=1334476&r2=1334477&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java Sat May
 5 20:03:31 2012
@@ -423,6 +423,7 @@ public class HBaseAdmin implements Abort
     isMasterRunning();
     HTableDescriptor.isLegalTableName(tableName);
     HRegionLocation firstMetaServer = getFirstMetaServerForTable(tableName);
+    Result values = null;
     try {
       getMaster().deleteTable(tableName);
     } catch (RemoteException e) {
@@ -441,7 +442,7 @@ public class HBaseAdmin implements Abort
         scannerId = server.openScanner(
           firstMetaServer.getRegionInfo().getRegionName(), scan);
         // Get a batch at a time.
-        Result values = server.next(scannerId);
+        values = server.next(scannerId);
         if (values == null) {
           break;
         }
@@ -467,6 +468,11 @@ public class HBaseAdmin implements Abort
         // continue
       }
     }
+    
+    if (values != null) {
+      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