hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1376680 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Date Thu, 23 Aug 2012 20:26:26 GMT
Author: jxiang
Date: Thu Aug 23 20:26:26 2012
New Revision: 1376680

URL: http://svn.apache.org/viewvc?rev=1376680&view=rev
Log:
HBASE-6644 HBaseAdmin.createTable should wait more till table is enabled.

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1376680&r1=1376679&r2=1376680&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Thu Aug 23 20:26:26 2012
@@ -451,10 +451,17 @@ public class HBaseAdmin implements Abort
           }
         } else {
           doneWithMetaScan = true;
+          tries = -1;
         }
-      }
-      if (doneWithMetaScan && isTableEnabled(desc.getName())) {
+      } else if (isTableEnabled(desc.getName())) {
         return;
+      } else {
+        try { // Sleep
+          Thread.sleep(getPauseTime(tries));
+        } catch (InterruptedException e) {
+          throw new InterruptedIOException("Interrupted when waiting" +
+            " for table to be enabled; meta scan was done");
+        }
       }
     }
     throw new TableNotEnabledException(



Mime
View raw message