YARN-11509. Fix CheckStyle.

This commit is contained in:
slfan1989 2023-06-10 15:28:02 +08:00
parent 385babc077
commit e7a432bf4f
1 changed files with 16 additions and 9 deletions

View File

@ -1242,14 +1242,22 @@ public class FederationInterceptor extends AbstractRequestInterceptor {
}
class TokenAndRegisterResponse {
Token<AMRMTokenIdentifier> token;
RegisterApplicationMasterResponse response;
private Token<AMRMTokenIdentifier> token;
private RegisterApplicationMasterResponse response;
TokenAndRegisterResponse(Token<AMRMTokenIdentifier> pToken,
RegisterApplicationMasterResponse pResponse) {
this.token = pToken;
this.response = pResponse;
}
public Token<AMRMTokenIdentifier> getToken() {
return token;
}
public RegisterApplicationMasterResponse getResponse() {
return response;
}
}
/**
@ -1263,16 +1271,15 @@ public class FederationInterceptor extends AbstractRequestInterceptor {
// Check to see if there are any new sub-clusters in this request
// list and create and register Unmanaged AM instance for the new ones
List<SubClusterId> newSubClusters = new ArrayList<>();
for (SubClusterId subClusterId : requests.keySet()) {
if (!subClusterId.equals(this.homeSubClusterId)
&& !this.uamPool.hasUAMId(subClusterId.getId())) {
newSubClusters.add(subClusterId);
requests.keySet().stream().forEach(subClusterId -> {
String id = subClusterId.getId();
if (!subClusterId.equals(this.homeSubClusterId) && !this.uamPool.hasUAMId(id)) {
newSubClusters.add(subClusterId);
// Set sub-cluster to be timed out initially
lastSCResponseTime.put(subClusterId,
clock.getTime() - subClusterTimeOut);
lastSCResponseTime.put(subClusterId, clock.getTime() - subClusterTimeOut);
}
}
});
this.uamRegisterFutures.clear();