hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From junping...@apache.org
Subject hadoop git commit: YARN-6534. ResourceManager failed due to TimelineClient try to init SSLFactory even https is not enabled. Contributed by Rohith Sharma K S.
Date Thu, 27 Apr 2017 20:13:03 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk bbf8cac14 -> 94607214c


YARN-6534. ResourceManager failed due to TimelineClient try to init SSLFactory even https
is not enabled. Contributed by Rohith Sharma K S.

(cherry picked from commit 09e36ff59c05b8bd54d346d1103de0a7300875c6)


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

Branch: refs/heads/trunk
Commit: 94607214ce87af871b024b4047ae3aa82058f9eb
Parents: bbf8cac
Author: Junping Du <junping_du@apache.org>
Authored: Thu Apr 27 13:10:48 2017 -0700
Committer: Junping Du <junping_du@apache.org>
Committed: Thu Apr 27 13:11:32 2017 -0700

----------------------------------------------------------------------
 .../hadoop/yarn/client/api/impl/TimelineConnector.java      | 9 +++++++--
 .../hadoop/yarn/client/api/impl/TestTimelineClient.java     | 2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/94607214/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineConnector.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineConnector.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineConnector.java
index bb29d6c..9d084d7 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineConnector.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineConnector.java
@@ -103,8 +103,13 @@ public class TimelineConnector extends AbstractService {
     ClientConfig cc = new DefaultClientConfig();
     cc.getClasses().add(YarnJacksonJaxbJsonProvider.class);
 
-    sslFactory = getSSLFactory(conf);
-    connConfigurator = getConnConfigurator(sslFactory);
+    if (YarnConfiguration.useHttps(conf)) {
+      // If https is chosen, configures SSL client.
+      sslFactory = getSSLFactory(conf);
+      connConfigurator = getConnConfigurator(sslFactory);
+    } else {
+      connConfigurator = DEFAULT_TIMEOUT_CONN_CONFIGURATOR;
+    }
 
     if (UserGroupInformation.isSecurityEnabled()) {
       authenticator = new KerberosDelegationTokenAuthenticator();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/94607214/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java
index f42c078..503ef82 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java
@@ -34,6 +34,7 @@ import java.security.PrivilegedExceptionAction;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
+import org.apache.hadoop.http.HttpConfig.Policy;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.ssl.KeyStoreTestUtil;
@@ -451,6 +452,7 @@ public class TestTimelineClient {
     YarnConfiguration conf = new YarnConfiguration();
     conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
     conf.setInt(YarnConfiguration.TIMELINE_SERVICE_CLIENT_MAX_RETRIES, 0);
+    conf.set(YarnConfiguration.YARN_HTTP_POLICY_KEY, Policy.HTTPS_ONLY.name());
 
     File testDir = TestGenericTestUtils.getTestDir();
     String sslConfDir =


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message