hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject svn commit: r1533216 - in /hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase: IntegrationTestLazyCfLoading.java test/IntegrationTestLoadAndVerify.java
Date Thu, 17 Oct 2013 19:11:15 GMT
Author: jeffreyz
Date: Thu Oct 17 19:11:15 2013
New Revision: 1533216

URL: http://svn.apache.org/r1533216
Log:
HBASE-9776: Test Load And Verify Fails with TableNotEnabledException

Modified:
    hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestLazyCfLoading.java
    hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java

Modified: hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestLazyCfLoading.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestLazyCfLoading.java?rev=1533216&r1=1533215&r2=1533216&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestLazyCfLoading.java
(original)
+++ hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestLazyCfLoading.java
Thu Oct 17 19:11:15 2013
@@ -191,10 +191,7 @@ public class IntegrationTestLazyCfLoadin
   private void deleteTable() throws Exception {
     if (util.getHBaseAdmin().tableExists(TABLE_NAME)) {
       LOG.info("Deleting table");
-      if (!util.getHBaseAdmin().isTableDisabled(TABLE_NAME)) {
-        util.getHBaseAdmin().disableTable(TABLE_NAME);
-      }
-      util.getHBaseAdmin().deleteTable(TABLE_NAME);
+      util.deleteTable(TABLE_NAME);
       LOG.info("Deleted table");
     }
   }

Modified: hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java?rev=1533216&r1=1533215&r2=1533216&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
(original)
+++ hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java
Thu Oct 17 19:11:15 2013
@@ -385,26 +385,7 @@ public class IntegrationTestLoadAndVerif
 
     // Only disable and drop if we succeeded to verify - otherwise it's useful
     // to leave it around for post-mortem
-    deleteTable(admin, htd);
-  }
-
-  private void deleteTable(HBaseAdmin admin, HTableDescriptor htd)
-    throws IOException, InterruptedException {
-    // Use disableTestAsync because disable can take a long time to complete
-    System.out.print("Disabling table " + htd.getTableName() +" ");
-    admin.disableTableAsync(htd.getTableName());
-
-    long start = System.currentTimeMillis();
-    // NOTE tables can be both admin.isTableEnabled=false and
-    // isTableDisabled=false, when disabling must use isTableDisabled!
-    while (!admin.isTableDisabled(htd.getTableName())) {
-      System.out.print(".");
-      Thread.sleep(1000);
-    }
-    long delta = System.currentTimeMillis() - start;
-    System.out.println(" " + delta +" ms");
-    System.out.println("Deleting table " + htd.getTableName() +" ");
-    admin.deleteTable(htd.getTableName());
+    getTestingUtil(getConf()).deleteTable(htd.getName());
   }
 
   public void usage() {
@@ -467,7 +448,7 @@ public class IntegrationTestLoadAndVerif
     if (doVerify) {
       doVerify(getConf(), htd);
       if (doDelete) {
-        deleteTable(admin, htd);
+        getTestingUtil(getConf()).deleteTable(htd.getName());
       }
     }
     return 0;



Mime
View raw message