Skip to content

Commit 62ca967

Browse files
committed
HIVE-29112: renamed conditional version of createSslContextFactory to createSslContextFactoryIf;
1 parent c678c11 commit 62ca967

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ServletSecurity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,23 +304,23 @@ static void loginServerPrincipal(Configuration conf) throws IOException {
304304
}
305305

306306
/**
307-
* Creates an SSL context factory if configuration states so.
307+
* Creates an SSL context factory if the configuration states so.
308308
* @param conf the configuration
309309
* @return null if no ssl in config, an instance otherwise
310310
* @throws IOException if getting password fails
311311
*/
312312
static SslContextFactory createSslContextFactory(Configuration conf) throws IOException {
313-
return createSslContextFactory(conf, MetastoreConf.ConfVars.USE_SSL);
313+
return createSslContextFactoryIf(conf, MetastoreConf.ConfVars.USE_SSL);
314314
}
315315

316316
/**
317-
* Creates an SSL context factory if configuration states so.
317+
* Creates an SSL context factory if a configuration variable states so.
318318
* @param conf the configuration
319319
* @param condition the condition variable to check for SSL
320320
* @return null if no ssl in config, an instance otherwise
321321
* @throws IOException if getting password fails
322322
*/
323-
static SslContextFactory createSslContextFactory(Configuration conf, MetastoreConf.ConfVars condition) throws IOException {
323+
static SslContextFactory createSslContextFactoryIf(Configuration conf, MetastoreConf.ConfVars condition) throws IOException {
324324
final boolean useSsl = MetastoreConf.getBoolVar(conf, condition);
325325
if (!useSsl) {
326326
return null;

standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ServletServerBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.eclipse.jetty.server.SecureRequestCustomizer;
2626
import org.eclipse.jetty.server.Server;
2727
import org.eclipse.jetty.server.ServerConnector;
28-
import org.eclipse.jetty.server.SslConnectionFactory;
2928
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
3029
import org.eclipse.jetty.server.handler.HandlerCollection;
3130
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
@@ -174,7 +173,7 @@ private Server createServer() {
174173
*/
175174
private static SslContextFactory createSslContextFactory(Configuration conf) {
176175
try {
177-
return ServletSecurity.createSslContextFactory(conf, MetastoreConf.ConfVars.HTTPSERVER_USE_HTTPS);
176+
return ServletSecurity.createSslContextFactoryIf(conf, MetastoreConf.ConfVars.HTTPSERVER_USE_HTTPS);
178177
} catch (IOException e) {
179178
LOGGER.error("Failed to create SSL context factory", e);
180179
return null;

0 commit comments

Comments
 (0)