YARN-9601.Potential NPE in ZookeeperFederationStateStore#getPoliciesConfigurations (#908) Contributed by hunshenshi.
This commit is contained in:
parent
b0131bc265
commit
22d7d1f8bf
@ -422,6 +422,10 @@ public GetSubClusterPoliciesConfigurationsResponse getPoliciesConfigurations(
|
||||
try {
|
||||
for (String child : zkManager.getChildren(policiesZNode)) {
|
||||
SubClusterPolicyConfiguration policy = getPolicy(child);
|
||||
if (policy == null) {
|
||||
LOG.warn("Policy for queue: {} does not exist.", child);
|
||||
continue;
|
||||
}
|
||||
result.add(policy);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user