goiri commented on code in PR #4658:
URL: https://github.com/apache/hadoop/pull/4658#discussion_r933372728
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RMProxy.java:
##########
@@ -99,7 +99,8 @@ protected static <T> T createRMProxy(final Configuration
configuration,
? (YarnConfiguration) configuration
: new YarnConfiguration(configuration);
RetryPolicy retryPolicy = createRetryPolicy(conf,
- (HAUtil.isHAEnabled(conf) ||
HAUtil.isFederationFailoverEnabled(conf)));
+ (HAUtil.isHAEnabled(conf) || (HAUtil.isFederationEnabled(conf)
Review Comment:
This boolean is not easy to read.
Can we extract with some nice comment and reuse it?
Something like:
```
/**
* Explain the logic
*/
private static boolean isFailoveEnabled(conf) {
if (HAUtil.isHAEnabled(conf)) {
// Comment explaining why
return true;
}
if (HAUtil.isFederationEnabled(conf) &&
HAUtil.isFederationFailoverEnabled(conf)) {
// Comment explaining why
return true;
}
return false;
}
```
--
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]