hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12614) FSPermissionChecker#getINodeAttrs() throws NPE when INodeAttributesProvider configured
Date Tue, 17 Oct 2017 01:00:43 GMT

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

Hudson commented on HDFS-12614:
-------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #13096 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/13096/])
HDFS-12614. FSPermissionChecker#getINodeAttrs() throws NPE when (manojpec: rev b406d8e3755d24ce72c443fd893a5672fd56babc)
* (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeAttributeProvider.java
* (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java


> FSPermissionChecker#getINodeAttrs() throws NPE when INodeAttributesProvider configured
> --------------------------------------------------------------------------------------
>
>                 Key: HDFS-12614
>                 URL: https://issues.apache.org/jira/browse/HDFS-12614
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.0.0-beta1
>            Reporter: Manoj Govindassamy
>            Assignee: Manoj Govindassamy
>             Fix For: 3.0.0
>
>         Attachments: HDFS-12614.01.patch, HDFS-12614.02.patch, HDFS-12614.03.patch, HDFS-12614.04.patch,
HDFS-12614.test.01.patch
>
>
> When INodeAttributesProvider is configured, and when resolving path (like "/") and checking
for permission, the following code when working on {{pathByNameArr}} throws NullPointerException.

> {noformat}
>   private INodeAttributes getINodeAttrs(byte[][] pathByNameArr, int pathIdx,
>       INode inode, int snapshotId) {
>     INodeAttributes inodeAttrs = inode.getSnapshotINode(snapshotId);
>     if (getAttributesProvider() != null) {
>       String[] elements = new String[pathIdx + 1];
>       for (int i = 0; i < elements.length; i++) {
>         elements[i] = DFSUtil.bytes2String(pathByNameArr[i]);  <===
>       }
>       inodeAttrs = getAttributesProvider().getAttributes(elements, inodeAttrs);
>     }
>     return inodeAttrs;
>   }
> {noformat}
> Looks like for paths like "/" where the split components based on delimiter "/" can be
null, the pathByNameArr array can have null elements and can throw NPE.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message