{"record":{"id":"b30449cd05e3c07a","repo":"apache/hadoop","slug":"file-does-not-exist-b30449","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-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java","lineNumber":3069,"sourceCode":"    }.resolve(this, absF);\n  }\n\n  /* HDFS only */\n  public RemoteIterator<ZoneReencryptionStatus> listReencryptionStatus()\n      throws IOException {\n    return dfs.listReencryptionStatus();\n  }\n\n  /* HDFS only */\n  public FileEncryptionInfo getFileEncryptionInfo(final Path path)\n      throws IOException {\n    Path absF = fixRelativePart(path);\n    return new FileSystemLinkResolver<FileEncryptionInfo>() {\n      @Override\n      public FileEncryptionInfo doCall(final Path p) throws IOException {\n        final HdfsFileStatus fi = dfs.getFileInfo(getPathName(p));\n        if (fi == null) {\n          throw new FileNotFoundException(\"File does not exist: \" + p);\n        }\n        return fi.getFileEncryptionInfo();\n      }\n\n      @Override\n      public FileEncryptionInfo next(final FileSystem fs, final Path p)\n          throws IOException {\n        if (fs instanceof DistributedFileSystem) {\n          DistributedFileSystem myDfs = (DistributedFileSystem)fs;\n          return myDfs.getFileEncryptionInfo(p);\n        }\n        throw new UnsupportedOperationException(\n            \"Cannot call getFileEncryptionInfo\"\n                + \" on a symlink to a non-DistributedFileSystem: \" + path\n                + \" -> \" + p);\n      }\n    }.resolve(this, absF);\n  }","sourceCodeStart":3051,"sourceCodeEnd":3087,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L3051-L3087","documentation":"Error \"File does not exist: {}\" thrown in apache/hadoop.","triggerScenarios":"An encryption-zone or file-level operation is attempted on a path, but the file does not exist on the NameNode.","commonSituations":"See trigger scenarios.","solutions":["Check fs.exists(path) before operating on the file.","Confirm the path is correct and the file has not been removed by another job."],"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"}