ayushtkn commented on code in PR #4704:
URL: https://github.com/apache/hive/pull/4704#discussion_r1347840499
##########
service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java:
##########
@@ -310,8 +310,8 @@ protected synchronized TTransport connect(HiveConf conf)
throws HiveSQLException
String host = conf.getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_BIND_HOST);
int port = conf.getIntVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_PORT);
- int maxThriftMessageSize = (int)
conf.getSizeVar(HiveConf.ConfVars.HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE);
- LOG.info("Connecting to " + host + ":" + port);
+ int maxThriftMessageSize = (int)
Math.min(conf.getSizeVar(HiveConf.ConfVars.HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE),Integer.MAX_VALUE);
Review Comment:
Do we need ``Math.min()`` here, the size validator wont let you set a value
greater then that right?
nit
line length should be less than 120 in hive & space after comma
##########
service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java:
##########
@@ -310,8 +310,8 @@ protected synchronized TTransport connect(HiveConf conf)
throws HiveSQLException
String host = conf.getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_BIND_HOST);
int port = conf.getIntVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_PORT);
- int maxThriftMessageSize = (int)
conf.getSizeVar(HiveConf.ConfVars.HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE);
- LOG.info("Connecting to " + host + ":" + port);
+ int maxThriftMessageSize = (int)
Math.min(conf.getSizeVar(HiveConf.ConfVars.HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE),Integer.MAX_VALUE);
+ LOG.info("Connecting to " + host + ":" + port+ " using a thrift max
message of size: "+ maxThriftMessageSize);
Review Comment:
use logger format rather than concat
##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java:
##########
@@ -610,7 +610,8 @@ public void renamePartition(String catName, String dbname,
String tableName, Lis
}
private <T extends TTransport> T configureThriftMaxMessageSize(T transport) {
- int maxThriftMessageSize = (int) MetastoreConf.getSizeVar(conf,
ConfVars.THRIFT_METASTORE_CLIENT_MAX_MESSAGE_SIZE);
+ int maxThriftMessageSize = (int) Math.min(MetastoreConf.getSizeVar(
+ conf,
ConfVars.THRIFT_METASTORE_CLIENT_MAX_MESSAGE_SIZE),Integer.MAX_VALUE);
Review Comment:
same why math.min is required?
--
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]