hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoy Antony (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2527) NPE in ApplicationACLsManager
Date Wed, 01 Oct 2014 22:34:34 GMT

    [ https://issues.apache.org/jira/browse/YARN-2527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155679#comment-14155679
] 

Benoy Antony commented on YARN-2527:
------------------------------------

Thanks for the review [~zjshen]. 
Do you mean to change as below ?
{code}
 if (acls.get(applicationAccessType) != null) {
      applicationACL = acls.get(applicationAccessType) ; 
else { 
        if (LOG.isDebugEnabled()) {
          LOG.debug("ACL not found for access-type " + applicationAccessType
              + " for application " + applicationId + " owned by "
              + applicationOwner + ". Using default ["
              + YarnConfiguration.DEFAULT_YARN_APP_ACL + "]");
        }
        applicationACL = DEFAULT_YARN_APP_ACL;
      }

{code}
The only downside to suggested approach is that it will involve two lookups in _acls_  _HashMap_
whereas the current apprach in the above comment involves only one lookup.

> NPE in ApplicationACLsManager
> -----------------------------
>
>                 Key: YARN-2527
>                 URL: https://issues.apache.org/jira/browse/YARN-2527
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>    Affects Versions: 2.5.0
>            Reporter: Benoy Antony
>            Assignee: Benoy Antony
>         Attachments: YARN-2527.patch, YARN-2527.patch
>
>
> NPE in _ApplicationACLsManager_ can result in 500 Internal Server Error.
> The relevant stacktrace snippet from the ResourceManager logs is as below
> {code}
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.yarn.server.security.ApplicationACLsManager.checkAccess(ApplicationACLsManager.java:104)
>         at org.apache.hadoop.yarn.server.resourcemanager.webapp.AppBlock.render(AppBlock.java:101)
>         at org.apache.hadoop.yarn.webapp.view.HtmlBlock.render(HtmlBlock.java:66)
>         at org.apache.hadoop.yarn.webapp.view.HtmlBlock.renderPartial(HtmlBlock.java:76)
>         at org.apache.hadoop.yarn.webapp.View.render(View.java:235)
> {code}
> This issue was reported by [~miguenther].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message