[ 
https://issues.apache.org/jira/browse/YARN-9601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei-Chiu Chuang resolved YARN-9601.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.3.0

I reviewed and merged the PR. Close this patch. Thanks [~hunhun]!

> Potential NPE in ZookeeperFederationStateStore#getPoliciesConfigurations
> ------------------------------------------------------------------------
>
>                 Key: YARN-9601
>                 URL: https://issues.apache.org/jira/browse/YARN-9601
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: federation, yarn
>    Affects Versions: 3.2.0
>            Reporter: hunshenshi
>            Assignee: hunshenshi
>            Priority: Major
>             Fix For: 3.3.0
>
>
> Potential NPE in ZookeeperFederationStateStore#getPoliciesConfigurations
> The code of ZookeeperFederationStateStore#getPoliciesConfigurations
> {code:java}
> for (String child : zkManager.getChildren(policiesZNode)) {
>   SubClusterPolicyConfiguration policy = getPolicy(child);
>   result.add(policy);
> }
> {code}
> The result of `getPolicy` may be null, so policy should be checked 
> The new code 
> {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);
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to