You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by rb...@apache.org on 2019/11/09 06:07:57 UTC

[hive] branch master updated: HIVE-22465: Add ssl conf in TezConfigurationFactory (Rajesh Balamohan, reviewed by Prasanth Jayachandran)

This is an automated email from the ASF dual-hosted git repository.

rbalamohan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 469ef5c  HIVE-22465: Add ssl conf in TezConfigurationFactory (Rajesh Balamohan, reviewed by Prasanth Jayachandran)
469ef5c is described below

commit 469ef5cc10a7bb97d783e40ea610e43328468cbd
Author: Rajesh Balamohan <rb...@apache.org>
AuthorDate: Sat Nov 9 11:36:25 2019 +0530

    HIVE-22465: Add ssl conf in TezConfigurationFactory (Rajesh Balamohan, reviewed by Prasanth Jayachandran)
---
 .../hadoop/hive/ql/exec/tez/TezConfigurationFactory.java    | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezConfigurationFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezConfigurationFactory.java
index 9bdb1a7..a0da0ad 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezConfigurationFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezConfigurationFactory.java
@@ -26,10 +26,23 @@ import java.util.function.Predicate;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.tez.dag.api.TezConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.hadoop.security.ssl.SSLFactory.SSL_CLIENT_CONF_KEY;
 
 public class TezConfigurationFactory {
   private static TezConfiguration defaultConf = new TezConfiguration();
 
+  private static final Logger LOG = LoggerFactory.getLogger(TezConfigurationFactory.class.getName());
+
+  static {
+    //SSL configs are added as needed
+    String sslConf = defaultConf.get(SSL_CLIENT_CONF_KEY, "ssl-client.xml");
+    defaultConf.addResource(sslConf);
+    LOG.info("SSL conf : " + sslConf);
+  }
+
   public static Configuration copyInto(Configuration target, Configuration src,
       Predicate<String> sourceFilter) {
     Iterator<Map.Entry<String, String>> iter = src.iterator();