Details
-
Bug
-
Status: In Progress
-
Major
-
Resolution: Unresolved
-
3.3.0
-
None
Description
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:
INodeDirectory root = new INodeDirectory(HdfsConstants.GRANDFATHER_INODE_ID, null, perm, 0L);
Some exceptions:
java.lang.NullPointerException at org.apache.hadoop.hdfs.server.namenode.INode.isRoot(INode.java:78)
Although these situations rarely occur in production environments, we should refine the implementation of isRoot() to avoid this exception. This can enhance system robustness.
Attachments
Issue Links
- links to