Skip to content

Commit 870d0a5

Browse files
author
slfan1989
committed
YARN-11442. Fix CheckStyle.
1 parent 1620923 commit 870d0a5

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,8 +2067,7 @@ private static Token<RMDelegationTokenIdentifier> getToken(GetDelegationTokenRes
20672067
byte[] password = token.getPassword().array();
20682068
Text kind = new Text(token.getKind());
20692069
Text service = new Text(token.getService());
2070-
Token<RMDelegationTokenIdentifier> tk = new Token<>(identifier, password, kind, service);
2071-
return tk;
2070+
return new Token<>(identifier, password, kind, service);
20722071
}
20732072

20742073
/**
@@ -2944,8 +2943,7 @@ private SubClusterInfo getHomeSubClusterInfoByAppId(String appId)
29442943
RouterServerUtil.logAndThrowException(null,
29452944
"Can't get HomeSubCluster by applicationId %s", applicationId);
29462945
}
2947-
SubClusterInfo subClusterInfo = federationFacade.getSubCluster(subClusterId);
2948-
return subClusterInfo;
2946+
return federationFacade.getSubCluster(subClusterId);
29492947
} catch (IllegalArgumentException e){
29502948
throw new IllegalArgumentException(e);
29512949
} catch (YarnException e) {
@@ -3000,8 +2998,6 @@ public Map<SubClusterInfo, NodesInfo> invokeConcurrentGetNodeLabel()
30002998
Class[] argsClasses = new Class[]{String.class};
30012999
Object[] args = new Object[]{null};
30023000
ClientMethod remoteMethod = new ClientMethod("getNodes", argsClasses, args);
3003-
Map<SubClusterInfo, NodesInfo> nodesMap =
3004-
invokeConcurrent(subClustersActive, remoteMethod, NodesInfo.class);
3005-
return nodesMap;
3001+
return invokeConcurrent(subClustersActive, remoteMethod, NodesInfo.class);
30063002
}
30073003
}

0 commit comments

Comments
 (0)