deniskuzZ commented on code in PR #6002:
URL: https://github.com/apache/hive/pull/6002#discussion_r2273177304


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ServletSecurity.java:
##########
@@ -314,13 +314,25 @@ static void loginServerPrincipal(Configuration conf) 
throws IOException {
   }
 
   /**
-   * Creates an SSL context factory if configuration states so.
+   * Creates an SSL context factory if the configuration states so.
    * @param conf the configuration
    * @return null if no ssl in config, an instance otherwise
    * @throws IOException if getting password fails
    */
   static SslContextFactory createSslContextFactory(Configuration conf) throws 
IOException {
-    final boolean useSsl  = MetastoreConf.getBoolVar(conf, 
MetastoreConf.ConfVars.USE_SSL);
+    return createSslContextFactoryIf(conf, MetastoreConf.ConfVars.USE_SSL);
+  }
+
+  /**
+   * Creates an SSL context factory if a configuration variable states so.
+   * @param conf the configuration
+   * @param condition the condition variable to check for SSL
+   * @return null if no ssl in config, an instance otherwise
+   * @throws IOException if getting password fails
+   */
+  static SslContextFactory createSslContextFactoryIf(Configuration conf, 
MetastoreConf.ConfVars condition)
+          throws IOException {
+    final boolean useSsl = MetastoreConf.getBoolVar(conf, condition);

Review Comment:
   could we drop this method and use MetastoreConf.ConfVars.USE_SSL directly?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to