slfan1989 commented on code in PR #4618:
URL: https://github.com/apache/hadoop/pull/4618#discussion_r930063472
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java:
##########
@@ -227,35 +234,29 @@ protected ApplicationClientProtocol
getClientRMProxyForSubCluster(
ApplicationClientProtocol clientRMProxy = null;
try {
boolean serviceAuthEnabled = getConf().getBoolean(
- CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION, false);
+ CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION, false);
UserGroupInformation realUser = user;
if (serviceAuthEnabled) {
realUser = UserGroupInformation.createProxyUser(
- user.getShortUserName(), UserGroupInformation.getLoginUser());
+ user.getShortUserName(), UserGroupInformation.getLoginUser());
}
clientRMProxy = FederationProxyProviderUtil.createRMProxy(getConf(),
ApplicationClientProtocol.class, subClusterId, realUser);
} catch (Exception e) {
RouterServerUtil.logAndThrowException(
- "Unable to create the interface to reach the SubCluster "
- + subClusterId,
- e);
+ "Unable to create the interface to reach the SubCluster " +
subClusterId, e);
}
-
clientRMProxies.put(subClusterId, clientRMProxy);
return clientRMProxy;
}
private SubClusterId getRandomActiveSubCluster(
- Map<SubClusterId, SubClusterInfo> activeSubclusters)
- throws YarnException {
-
- if (activeSubclusters == null || activeSubclusters.size() < 1) {
+ Map<SubClusterId, SubClusterInfo> activeSubClusters) throws
YarnException {
+ if (activeSubClusters.isEmpty()) {
Review Comment:
I Will Fix it.
--
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]