richardantal commented on code in PR #2467:
URL: https://github.com/apache/phoenix/pull/2467#discussion_r3227103617


##########
bin/phoenix_utils.py:
##########
@@ -126,6 +127,21 @@ def setPath():
             # Try to provide something valid
             hbase_conf_dir = '.'
 
+    global zk_tls_args
+    root = ET.parse(os.path.join(hbase_conf_dir, "hbase-site.xml")).getroot()
+    zk_hbase_prefix = "hbase.zookeeper.property."
+    zkcfg = {
+        prop.find("name").text[len(zk_hbase_prefix):]: prop.find("value").text
+        for prop in root.findall("property")
+        if prop.find("name").text.startswith(zk_hbase_prefix)
+    }
+    if zkcfg.get('client.secure').lower() == 'true':
+        zk_tls_args = '-Dzookeeper.client.secure=true ' + \
+            '-Dzookeeper.clientCnxnSocket=' + zkcfg['clientCnxnSocket'] + ' ' 
+ \
+            '-Dzookeeper.ssl.trustStore.location=' + 
zkcfg['ssl.trustStore.location'] + ' ' + \
+            '-Dzookeeper.ssl.trustStore.type=' + zkcfg['ssl.trustStore.type'] 
+ ' ' + \
+            '-Dzookeeper.ssl.trustStore.password=' + 
zkcfg['ssl.trustStore.password'] + ' '
+

Review Comment:
   I think so, yes 
   There are much more thinks that could go wrong here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to