Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public final class HttpServer2 implements FilterContainer {
static final String STATE_DESCRIPTION_ALIVE = " - alive";
static final String STATE_DESCRIPTION_NOT_LIVE = " - not live";
private final SignerSecretProvider secretProvider;
private final Optional<java.util.Timer> configurationChangeMonitor;
private Optional<java.util.Timer> configurationChangeMonitor = Optional.empty();
private XFrameOption xFrameOption;
private boolean xFrameOptionIsEnabled;
public static final String HTTP_HEADER_PREFIX = "hadoop.http.header.";
Expand Down Expand Up @@ -258,8 +258,6 @@ public static class Builder {

private boolean sniHostCheckEnabled;

private Optional<Timer> configurationChangeMonitor = Optional.empty();

public Builder setName(String name){
this.name = name;
return this;
Expand Down Expand Up @@ -547,7 +545,7 @@ public HttpServer2 build() throws IOException {
connector = createHttpChannelConnector(server.webServer,
httpConfig);
} else if (HTTPS_SCHEME.equals(scheme)) {
connector = createHttpsChannelConnector(server.webServer,
connector = createHttpsChannelConnector(server,
httpConfig);
} else {
throw new HadoopIllegalArgumentException(
Expand Down Expand Up @@ -581,11 +579,11 @@ private ServerConnector createHttpChannelConnector(
}

private ServerConnector createHttpsChannelConnector(
Server server, HttpConfiguration httpConfig) {
HttpServer2 server, HttpConfiguration httpConfig) {
httpConfig.setSecureScheme(HTTPS_SCHEME);
httpConfig.addCustomizer(
new SecureRequestCustomizer(sniHostCheckEnabled));
ServerConnector conn = createHttpChannelConnector(server, httpConfig);
ServerConnector conn = createHttpChannelConnector(server.webServer, httpConfig);

SslContextFactory.Server sslContextFactory =
new SslContextFactory.Server();
Expand Down Expand Up @@ -621,7 +619,7 @@ private ServerConnector createHttpsChannelConnector(

if (storesReloadInterval > 0 &&
(keyStore != null || trustStore != null)) {
this.configurationChangeMonitor = Optional.of(
server.configurationChangeMonitor = Optional.of(
this.makeConfigurationChangeMonitor(storesReloadInterval, sslContextFactory));
}

Expand Down Expand Up @@ -704,7 +702,6 @@ private HttpServer2(final Builder b) throws IOException {
this.webAppContext = createWebAppContext(b, adminsAcl, appDir);
this.xFrameOptionIsEnabled = b.xFrameEnabled;
this.xFrameOption = b.xFrameOption;
this.configurationChangeMonitor = b.configurationChangeMonitor;

try {
this.secretProvider =
Expand Down
Loading