You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/11/05 00:25:00 UTC

[jira] [Commented] (HDFS-16733) Improve INode#isRoot()

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

ASF GitHub Bot commented on HDFS-16733:
---------------------------------------

github-actions[bot] commented on PR #4761:
URL: https://github.com/apache/hadoop/pull/4761#issuecomment-3488542886

   We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open it and ask for a committer to remove the stale tag and review again.
   Thanks all for your contribution.




> Improve INode#isRoot()
> ----------------------
>
>                 Key: HDFS-16733
>                 URL: https://issues.apache.org/jira/browse/HDFS-16733
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.3.0
>            Reporter: JiangHua Zhu
>            Assignee: JiangHua Zhu
>            Priority: Major
>              Labels: pull-request-available
>
> When constructing an INodeFile or INodeDirectory, it is usually necessary to give a name. For getLocalNameBytes, there are not many restrictions, such as null can be set. But an exception is thrown:
> {code:java}
> INodeDirectory root = new INodeDirectory(HdfsConstants.GRANDFATHER_INODE_ID, null, perm, 0L);
> {code}
> Some exceptions:
> {code:java}
> java.lang.NullPointerException
> 	at org.apache.hadoop.hdfs.server.namenode.INode.isRoot(INode.java:78)
> {code}
> Although these situations rarely occur in production environments, we should refine the implementation of isRoot() to avoid this exception. This can enhance system robustness.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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