{"record":{"id":"218d2cebc9b54a4e","repo":"apache/hadoop","slug":"invalid-inode-path-path","errorCode":null,"errorMessage":"Invalid inode path: <path>","messagePattern":"Invalid inode path: <path>","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java","lineNumber":1766,"sourceCode":"          /* It's /.reserved/raw/.reserved so don't strip */\n        } else {\n          pathComponents = constructRemainingPath(\n              new byte[][]{INodeDirectory.ROOT_NAME}, pathComponents, 3);\n        }\n      }\n    }\n    return pathComponents;\n  }\n\n  private static byte[][] resolveDotInodesPath(\n      byte[][] pathComponents, FSDirectory fsd)\n      throws FileNotFoundException {\n    final String inodeId = DFSUtil.bytes2String(pathComponents[3]);\n    final long id;\n    try {\n      id = Long.parseLong(inodeId);\n    } catch (NumberFormatException e) {\n      throw new FileNotFoundException(\"Invalid inode path: \" +\n          DFSUtil.byteArray2PathString(pathComponents));\n    }\n    if (id == INodeId.ROOT_INODE_ID && pathComponents.length == 4) {\n      return new byte[][]{INodeDirectory.ROOT_NAME};\n    }\n    INode inode = fsd.getInode(id);\n    if (inode == null) {\n      throw new FileNotFoundException(\n          \"File for given inode path does not exist: \" +\n              DFSUtil.byteArray2PathString(pathComponents));\n    }\n\n    // Handle single \"..\" for NFS lookup support.\n    if ((pathComponents.length > 4)\n        && Arrays.equals(pathComponents[4], DOT_DOT)) {\n      INode parent = inode.getParent();\n      if (parent == null || parent.getId() == INodeId.ROOT_INODE_ID) {\n        // inode is root, or its parent is root.","sourceCodeStart":1748,"sourceCodeEnd":1784,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java#L1748-L1784","documentation":"resolveDotInodesPath: the <inodeid> component of a /.reserved/inodes/... path is not a parseable long (NumberFormatException), so the path is rejected as an invalid inode reference via FileNotFoundException.","triggerScenarios":"Resolving an /.reserved/.inodes/<inodeId> style path whose inode id is invalid or path format is wrong.","commonSituations":"See trigger scenarios.","solutions":["Pass a well-formed inode path of the form '/.reserved/.inodes/<inodeId>'."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}