deniskuzZ commented on code in PR #5683: URL: https://github.com/apache/hive/pull/5683#discussion_r2009070144
########## common/src/java/org/apache/hadoop/hive/common/auth/HiveAuthUtils.java: ########## @@ -73,67 +73,61 @@ public static <T extends TTransport> T configureThriftMaxMessageSize(T transport * will default to Thrift library default. * @param host Host to connect to. * @param port Port to connect to. - * @param loginTimeout Socket timeout (0 means no timeout). + * @param socketTimeout Socket timeout (0 means no timeout). + * @param connectTimeout Connection timeout (0 means no timeout). * @return TTransport TSocket for host/port. */ - public static TTransport getSocketTransport(String host, int port, int loginTimeout) throws TTransportException { - return getSocketTransport(host, port, loginTimeout, /* maxMessageSize */ -1); + public static TTransport getSocketTransport(String host, int port, int socketTimeout, int connectTimeout) throws TTransportException { + return getSocketTransport(host, port, socketTimeout, connectTimeout, /* maxMessageSize */ -1); } /** * Create a TSocket for the provided host and port with specified loginTimeout and maxMessageSize. * will default to Thrift library default. * @param host Host to connect to. * @param port Port to connect to. - * @param loginTimeout Socket timeout (0 means no timeout). + * @param socketTimeout Socket timeout (0 means no timeout). + * @param connectTimeout Connection timeout (0 means no timeout). * @param maxMessageSize Size in bytes for max allowable Thrift message size, less than or equal to 0 * results in using the Thrift library default. * @return TTransport TSocket for host/port */ - public static TTransport getSocketTransport(String host, int port, int loginTimeout, int maxMessageSize) - throws TTransportException { - TSocket tSocket = new TSocket(host, port, loginTimeout); + public static TTransport getSocketTransport(String host, int port, int socketTimeout, int connectTimeout, int maxMessageSize) + throws TTransportException { + TSocket tSocket = new TSocket(host, port, socketTimeout); + tSocket.setConnectTimeout(connectTimeout); return configureThriftMaxMessageSize(tSocket, maxMessageSize); } - public static TTransport getSSLSocket(String host, int port, int loginTimeout, TSSLTransportParameters params, + public static TTransport getSSLSocket(String host, int port, int socketTimeout, int connectTimeout, TSSLTransportParameters params, Review Comment: should we change the order of params? -- 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