[ 
https://issues.apache.org/jira/browse/HIVE-27113?focusedWorklogId=852080&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-852080
 ]

ASF GitHub Bot logged work on HIVE-27113:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Mar/23 18:06
            Start Date: 21/Mar/23 18:06
    Worklog Time Spent: 10m 
      Work Description: jfsii commented on code in PR #4137:
URL: https://github.com/apache/hive/pull/4137#discussion_r1143811416


##########
service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java:
##########
@@ -310,7 +310,7 @@ 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);
+    int maxThriftMessageSize = (int) 
Math.min(conf.getSizeVar(HiveConf.ConfVars.HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE),Integer.MAX_VALUE);

Review Comment:
   Maybe add a new method to HiveConf like getSizeVar that takes in a long min, 
and a long max.
   (It may even make sense to have it LOG.info when the gets clamped (orig val 
> max, orig val < min), but I am not sure if that would make logs too chatty).
   Something like:
   getSizeVarWithRange(HiveConf.ConfVars.HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE, 
Integer.MIN_VALUE, Integer.MAX_VALUE). I'm bad at naming methods, so pick 
something that makes sense (though maybe WithRange does?).





Issue Time Tracking
-------------------

    Worklog Id:     (was: 852080)
    Time Spent: 0.5h  (was: 20m)

> Increasing default for hive.thrift.client.max.message.size to 2 GB
> ------------------------------------------------------------------
>
>                 Key: HIVE-27113
>                 URL: https://issues.apache.org/jira/browse/HIVE-27113
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Riju Trivedi
>            Assignee: Riju Trivedi
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE("hive.thrift.client.max.message.size", 
> "1gb",
>         new SizeValidator(-1L, true, (long) Integer.MAX_VALUE, true),
>         "Thrift client configuration for max message size. 0 or -1 will use 
> the default defined in the Thrift " +
>         "library. The upper limit is 2147483648 bytes (or 2gb).")
> Documentation on the help suggests setting 2147483648 while Integer Max is 
> 2147483647. So, it actually becomes -1 and gets set to thrift default limit 
> (100 MB)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to