tanishq-chugh commented on code in PR #6137:
URL: https://github.com/apache/hive/pull/6137#discussion_r2438624398


##########
jdbc/src/java/org/apache/hive/jdbc/Utils.java:
##########
@@ -890,4 +885,18 @@ public static String getPassword(Map<String, String> 
confMap, String key) {
     }
     return password;
   }
+
+  /**
+   * Method to get the default port based on the transport mode
+   * @param connectionParams JDBC connection parameters
+   * @return defaultPort
+   */
+  public static String getDefaultPort(JdbcConnectionParams connectionParams) {
+    String port = "10000";
+    String transportMode = 
connectionParams.getSessionVars().get(JdbcConnectionParams.TRANSPORT_MODE);
+    if (transportMode != null && transportMode.equalsIgnoreCase("http")) {
+      port = "10001";

Review Comment:
   Hi @okumin , Thanks for checking this.
   Yes, i have updated this utility function to fetch default values instead of 
hardcoding in 
[b4b55fb](https://github.com/apache/hive/pull/6137/commits/b4b55fb6a9f02a9c1f346875e01f456f1fb9f3a2)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to