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 2f85c04678..bd2c428c4f 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 @@ -186,10 +186,17 @@ private void startTimelineReaderWebApp() { 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() + ";"