Skip to content

Commit 22d7d1f

Browse files
hunshenshijojochuang
authored andcommitted
YARN-9601.Potential NPE in ZookeeperFederationStateStore#getPoliciesConfigurations (#908) Contributed by hunshenshi.
1 parent b0131bc commit 22d7d1f

File tree

1 file changed

+4
-0
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/impl

1 file changed

+4
-0
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/impl/ZookeeperFederationStateStore.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,10 @@ public GetSubClusterPoliciesConfigurationsResponse getPoliciesConfigurations(
422422
try {
423423
for (String child : zkManager.getChildren(policiesZNode)) {
424424
SubClusterPolicyConfiguration policy = getPolicy(child);
425+
if (policy == null) {
426+
LOG.warn("Policy for queue: {} does not exist.", child);
427+
continue;
428+
}
425429
result.add(policy);
426430
}
427431
} catch (Exception e) {

0 commit comments

Comments
 (0)