Repository: hbase
Updated Branches:
  refs/heads/branch-1 e1eaf612f -> 02d9bf0c5


HBASE-17803 PE always re-creates table when we specify the split policy


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

Branch: refs/heads/branch-1
Commit: 02d9bf0c57b447ab0f4fa93a3858bd27c43e0cf9
Parents: e1eaf61
Author: Chia-Ping Tsai <[email protected]>
Authored: Sun Mar 19 19:10:24 2017 +0800
Committer: Chia-Ping Tsai <[email protected]>
Committed: Sun Mar 19 19:10:24 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/02d9bf0c/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
index fe3c5e8..e66e133 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
@@ -46,6 +46,7 @@ import java.util.concurrent.Future;
 import com.google.common.base.Objects;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -327,7 +328,8 @@ public class PerformanceEvaluation extends Configured 
implements Tool {
     // recreate the table when user has requested presplit or when existing
     // {RegionSplitPolicy,replica count} does not match requested.
     if ((exists && opts.presplitRegions != DEFAULT_OPTS.presplitRegions)
-      || (!isReadCmd && desc != null && desc.getRegionSplitPolicyClassName() 
!= opts.splitPolicy)
+      || (!isReadCmd && desc != null &&
+          !StringUtils.equals(desc.getRegionSplitPolicyClassName(), 
opts.splitPolicy))
       || (!isReadCmd && desc != null && desc.getRegionReplication() != 
opts.replicas)) {
       needsDelete = true;
       // wait, why did it delete my table?!?

Reply via email to