YARN-9601.Potential NPE in ZookeeperFederationStateStore#getPoliciesConfigurations (#908) Contributed by hunshenshi.

This commit is contained in:
hunshenshi 2019-08-08 12:26:14 +08:00 committed by Wei-Chiu Chuang
parent b0131bc265
commit 22d7d1f8bf
1 changed files with 4 additions and 0 deletions

View File

@ -422,6 +422,10 @@ public class ZookeeperFederationStateStore implements FederationStateStore {
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) {