You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2018/09/21 22:53:09 UTC

[7/8] hbase git commit: HBASE-21203 TestZKMainServer#testCommandLineWorks won't pass with default 4lw whitelist

HBASE-21203 TestZKMainServer#testCommandLineWorks won't pass with default 4lw whitelist

Recent versions of ZooKeeper whitelist the so-called 4-letter word admin
commands, and 'stat' is not in the default whitelist. Set system property
zookeeper.4lw.commands.whitelist=* in MiniZooKeeperCluster#setupTestEnv
as we do not need to whitelist 4-letter commands for unit tests.


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

Branch: refs/heads/branch-1.3
Commit: 508b1451d472947e7c59ad944ce2c69719f9ddbc
Parents: 3679b40
Author: Andrew Purtell <ap...@apache.org>
Authored: Mon Sep 17 14:49:31 2018 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Sep 21 15:37:49 2018 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/508b1451/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
index 6cd5a28..bd0eadc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
@@ -178,6 +178,8 @@ public class MiniZooKeeperCluster {
     // set env and directly in order to handle static init/gc issues
     System.setProperty("zookeeper.preAllocSize", "100");
     FileTxnLog.setPreallocSize(100 * 1024);
+    // allow all 4 letter words
+    System.setProperty("zookeeper.4lw.commands.whitelist","*");
   }
 
   public int startup(File baseDir) throws IOException, InterruptedException {