YARN-11509. Fix CheckStyle.
This commit is contained in:
parent
385babc077
commit
e7a432bf4f
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue