hunshenshi opened a new pull request #908: YARN-9601:Potential NPE in ZookeeperFederationStateStore#getPoliciesC… URL: https://github.com/apache/hadoop/pull/908 Potential NPE in ZookeeperFederationStateStore#getPoliciesConfigurations The code of ZookeeperFederationStateStore#getPoliciesConfigurations ``` java for (String child : zkManager.getChildren(policiesZNode)) { SubClusterPolicyConfiguration policy = getPolicy(child); result.add(policy); } ``` The result of `getPolicy` may be null, so policy should be checked The new code ``` java for (String child : zkManager.getChildren(policiesZNode)) { SubClusterPolicyConfiguration policy = getPolicy(child); // policy maybe null, should check if (policy == null) { LOG.warn("Policy for queue: {} does not exist.", child); continue; } result.add(policy); } ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
