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.
This commit is contained in:
Andrew Purtell 2018-09-17 14:49:31 -07:00
parent 5a73a1ab25
commit 1e05c9f3b5
No known key found for this signature in database
GPG Key ID: 8597754DD5365CCD
1 changed files with 2 additions and 0 deletions

View File

@ -176,6 +176,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 {