YARN-8253. HTTPS Ats v2 api call fails with 'bad HTTP parsed'. Contributed by Charan Hebri.
(cherry picked from commit 7450583721
)
This commit is contained in:
parent
9355f56b36
commit
b69c65fc6b
|
@ -186,10 +186,17 @@ public class TimelineReaderServer extends CompositeService {
|
||||||
|
|
||||||
LOG.info("Instantiating TimelineReaderWebApp at " + bindAddress);
|
LOG.info("Instantiating TimelineReaderWebApp at " + bindAddress);
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
String httpScheme = WebAppUtils.getHttpSchemePrefix(conf);
|
||||||
|
|
||||||
HttpServer2.Builder builder = new HttpServer2.Builder()
|
HttpServer2.Builder builder = new HttpServer2.Builder()
|
||||||
.setName("timeline")
|
.setName("timeline")
|
||||||
.setConf(conf)
|
.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 = builder.build();
|
||||||
readerWebServer.addJerseyResourcePackage(
|
readerWebServer.addJerseyResourcePackage(
|
||||||
TimelineReaderWebServices.class.getPackage().getName() + ";"
|
TimelineReaderWebServices.class.getPackage().getName() + ";"
|
||||||
|
|
Loading…
Reference in New Issue