Repository: hadoop
Updated Branches:
  refs/heads/branch-2.9 d8288414b -> d35351674


YARN-8253. HTTPS Ats v2 api call fails with 'bad HTTP parsed'. Contributed by 
Charan Hebri.

(cherry picked from commit 7450583721757b8af2945ebd9be1a9efed11444c)


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

Branch: refs/heads/branch-2.9
Commit: d353516748a6d791062dd636f341cf25c2692d3f
Parents: d828841
Author: Rohith Sharma K S <rohithsharm...@apache.org>
Authored: Tue May 8 12:28:54 2018 +0530
Committer: Rohith Sharma K S <rohithsharm...@apache.org>
Committed: Tue May 8 12:35:41 2018 +0530

----------------------------------------------------------------------
 .../server/timelineservice/reader/TimelineReaderServer.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d3535167/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderServer.java
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderServer.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderServer.java
index 5c049ea..2609393 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderServer.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderServer.java
@@ -175,10 +175,17 @@ public class TimelineReaderServer extends 
CompositeService {
         WebAppUtils.getTimelineReaderWebAppURL(conf));
     LOG.info("Instantiating TimelineReaderWebApp at " + bindAddress);
     try {
+
+      String httpScheme = WebAppUtils.getHttpSchemePrefix(conf);
+
       HttpServer2.Builder builder = new HttpServer2.Builder()
             .setName("timeline")
             .setConf(conf)
-            .addEndpoint(URI.create("http://"; + bindAddress));
+            .addEndpoint(URI.create(httpScheme + bindAddress));
+
+      if (httpScheme.equals(WebAppUtils.HTTPS_PREFIX)) {
+        WebAppUtils.loadSslConfiguration(builder, conf);
+      }
       readerWebServer = builder.build();
       readerWebServer.addJerseyResourcePackage(
           TimelineReaderWebServices.class.getPackage().getName() + ";"


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

Reply via email to