functioner commented on a change in pull request #2727:
URL: https://github.com/apache/hadoop/pull/2727#discussion_r584426727
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
##########
@@ -542,8 +542,17 @@ protected PingInputStream(InputStream in) {
*/
private void handleTimeout(SocketTimeoutException e, int waiting)
throws IOException {
+ int timeout = 0;
+ if (rpcTimeout > 0) {
+ // effective rpc timeout is rounded up to multiple of pingInterval
+ // if pingInterval < rpcTimeout.
+ timeout = (doPing && pingInterval < rpcTimeout) ?
+ pingInterval : rpcTimeout;
+ } else {
+ timeout = pingInterval;
+ }
if (shouldCloseConnection.get() || !running.get() ||
- (0 < rpcTimeout && rpcTimeout <= waiting)) {
+ (timeout <= waiting)) {
Review comment:
Yes, now I just basically follow the usage of rpcTimeout in the
constructor of hadoop.ipc.Client$Connection class.
However, I think using soTimeout is not suitable (although the value is the
same for now), because they should have different meaning.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]