goiri commented on a change in pull request #2082:
URL: https://github.com/apache/hadoop/pull/2082#discussion_r442468351
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java
##########
@@ -172,6 +176,12 @@ public RouterRpcClient(Configuration conf, Router router,
this.retryPolicy = RetryPolicies.failoverOnNetworkException(
RetryPolicies.TRY_ONCE_THEN_FAIL, maxFailoverAttempts,
maxRetryAttempts,
failoverSleepBaseMillis, failoverSleepMaxMillis);
+ this.retryTimeInterval = conf.getInt(
Review comment:
Use getTimeDuration()
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java
##########
@@ -557,6 +567,19 @@ private Object invoke(String nsId, int retryCount, final
Method method,
}
// retry
+ try {
Review comment:
The idea before was for us to surface the unavailability to the client
and then the client retry with the regular client logic.
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java
##########
@@ -172,6 +176,12 @@ public RouterRpcClient(Configuration conf, Router router,
this.retryPolicy = RetryPolicies.failoverOnNetworkException(
RetryPolicies.TRY_ONCE_THEN_FAIL, maxFailoverAttempts,
maxRetryAttempts,
failoverSleepBaseMillis, failoverSleepMaxMillis);
+ this.retryTimeInterval = conf.getInt(
+ HdfsClientConfigKeys.DFS_ROUTER_RPC_RETRY_INTERVAL_KEY,
Review comment:
Fix indentation
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java
##########
@@ -357,7 +367,7 @@ private RetryDecision shouldRetry(final IOException ioe,
final int retryCount,
// check for the case of cluster unavailable state
if (isClusterUnAvailable(nsId)) {
// we allow to retry once if cluster is unavailable
- if (retryCount == 0) {
Review comment:
This logic starts with this counter at a value and then decreases, it
makes sense to keep it as such.
----------------------------------------------------------------
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]