You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "hunshenshi (JIRA)" <ji...@apache.org> on 2019/07/02 02:33:00 UTC

[jira] [Assigned] (YARN-9601) Potential NPE in ZookeeperFederationStateStore#getPoliciesConfigurations

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

hunshenshi reassigned YARN-9601:
--------------------------------

    Assignee: hunshenshi

> 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
>
> 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.3#76005)

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