{"record":{"id":"eb04e54590641577","repo":"apache/hadoop","slug":"file-does-not-exist-eb04e5","errorCode":null,"errorMessage":"File does not exist: {}","messagePattern":"File does not exist: (.+?)","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java","lineNumber":1608,"sourceCode":"      RetryCache.setState(cacheEntry, success);\n    }\n  }\n\n  @Override // ClientProtocol\n  public String getLinkTarget(String path) throws IOException {\n    checkNNStartup();\n    metrics.incrGetLinkTargetOps();\n    HdfsFileStatus stat = null;\n    try {\n      stat = namesystem.getFileInfo(path, false, false, false);\n    } catch (UnresolvedPathException e) {\n      return e.getResolvedPath().toString();\n    } catch (UnresolvedLinkException e) {\n      // The NameNode should only throw an UnresolvedPathException\n      throw new AssertionError(\"UnresolvedLinkException thrown\");\n    }\n    if (stat == null) {\n      throw new FileNotFoundException(\"File does not exist: \" + path);\n    } else if (!stat.isSymlink()) {\n      throw new IOException(\"Path \" + path + \" is not a symbolic link\");\n    }\n    return DFSUtilClient.bytes2String(stat.getSymlinkInBytes());\n  }\n\n\n  @Override // DatanodeProtocol\n  public DatanodeRegistration registerDatanode(DatanodeRegistration nodeReg)\n      throws IOException {\n    checkNNStartup();\n    verifySoftwareVersion(nodeReg);\n    namesystem.registerDatanode(nodeReg);\n    return nodeReg;\n  }\n\n  @Override // DatanodeProtocol\n  public HeartbeatResponse sendHeartbeat(DatanodeRegistration nodeReg,","sourceCodeStart":1590,"sourceCodeEnd":1626,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java#L1590-L1626","documentation":"Error \"File does not exist: {}\" thrown in apache/hadoop.","triggerScenarios":"getFileLinkStatus or a symlink operation references a nonexistent path.","commonSituations":"Querying or modifying a symlink after it (or a parent) was deleted.","solutions":["Verify the symlink path exists before operating on it; create it first if needed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}