HIVE-27172: (2.3) Add the HMS client connection timeout config #5115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Backport HIVE-27172 to branch-2.3
Why are the changes needed?
Hive 2.3 is used in Apache Spark to communicate with HMS, while making the socket connect timeout configurable and independent with socket timeout is extremely useful.
In practice, we deploy multi HMS instances to achieve load balance and disaster recovery, we expect a short connect timeout in case the target HMS instance is under high load or has network issues, so that the HMS client could quickly failover to another one. While we expect a little bit longer socket timeout in cases some thrift invocations take a long time, e.g. a HMS may take a dozen minutes to handle a table/partition request if the table is large or has million partitions.
Does this PR introduce any user-facing change?
Add a new configuration while the default value keeps the existing behavior.
Is the change a dependency upgrade?
No
How was this patch tested?
New tests are added.