瀏覽代碼

ZOOKEEPER-3590: Zookeeper is unable to set the zookeeper.sasl.client.canonicalize.hostname using system property

See https://issues.apache.org/jira/browse/ZOOKEEPER-3590

This is a very small patch that gives sets the option after reading it from the system.getProperty().

There should not be any side effects since this is mostly copy paste.

Author: aristotelhs <aristotelhs@lenses.io>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes #1124 from aristotelhs/ZOOKEEPER-3590
aristotelhs 5 年之前
父節點
當前提交
0b9d30faed
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      zookeeper-server/src/main/java/org/apache/zookeeper/client/ZKClientConfig.java

+ 1 - 0
zookeeper-server/src/main/java/org/apache/zookeeper/client/ZKClientConfig.java

@@ -99,6 +99,7 @@ public class ZKClientConfig extends ZKConfig {
          * backward compatibility for client specific properties
          */
         setProperty(ZK_SASL_CLIENT_USERNAME, System.getProperty(ZK_SASL_CLIENT_USERNAME));
+        setProperty(ZK_SASL_CLIENT_CANONICALIZE_HOSTNAME, System.getProperty(ZK_SASL_CLIENT_CANONICALIZE_HOSTNAME));
         setProperty(LOGIN_CONTEXT_NAME_KEY, System.getProperty(LOGIN_CONTEXT_NAME_KEY));
         setProperty(ENABLE_CLIENT_SASL_KEY, System.getProperty(ENABLE_CLIENT_SASL_KEY));
         setProperty(ZOOKEEPER_SERVER_REALM, System.getProperty(ZOOKEEPER_SERVER_REALM));