hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-15209 (compatibility) Disable table in HBaseTestingUtility.truncateTable. (Apekshit)
Date Sat, 06 Feb 2016 04:41:46 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 81d81c983 -> 31f9f2fb6


HBASE-15209 (compatibility) Disable table in HBaseTestingUtility.truncateTable. (Apekshit)

Signed-off-by: stack <stack@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/31f9f2fb
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/31f9f2fb
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/31f9f2fb

Branch: refs/heads/master
Commit: 31f9f2fb67e4c83748d725947ed5eb2cd13df1ef
Parents: 81d81c9
Author: Apekshit <apeksharma@gmail.com>
Authored: Tue Feb 2 18:24:17 2016 -0800
Committer: stack <stack@apache.org>
Committed: Fri Feb 5 20:41:40 2016 -0800

----------------------------------------------------------------------
 .../test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/31f9f2fb/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 71a3344..4360e1e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -1874,6 +1874,9 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
    */
   public HTable truncateTable(final TableName tableName, final boolean preserveRegions) throws
IOException {
     Admin admin = getHBaseAdmin();
+    if (!admin.isTableDisabled(tableName)) {
+      admin.disableTable(tableName);
+    }
     admin.truncateTable(tableName, preserveRegions);
     return (HTable) getConnection().getTable(tableName);
   }


Mime
View raw message