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:43:11 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 683a4be85 -> c746f1250


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/c746f125
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c746f125
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c746f125

Branch: refs/heads/branch-1.2
Commit: c746f1250d90b4386ec3d4db035fa741e845d093
Parents: 683a4be
Author: Apekshit <apeksharma@gmail.com>
Authored: Wed Feb 3 16:05:37 2016 -0800
Committer: stack <stack@apache.org>
Committed: Fri Feb 5 20:43:05 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/c746f125/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 a806127..e92e44d 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
@@ -2077,6 +2077,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 new HTable(getConfiguration(), tableName);
   }


Mime
View raw message