{"record":{"id":"75a1f5b3eaf53a54","repo":"apache/hadoop","slug":"file-check-failed-75a1f5","errorCode":null,"errorMessage":"File check failed","messagePattern":"File check failed","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java","lineNumber":361,"sourceCode":"    } else if (isFile(client, absolute)) {\n      throw new IOException(String.format(E_DIR_CREATE_FROMFILE, absolute));\n    }\n    return created;\n  }\n\n  /**\n   * Convenience method, so that we don't open a new connection when using this\n   * method from within another method. Otherwise every API invocation incurs\n   * the overhead of opening/closing a TCP connection.\n   * @throws IOException\n   */\n  private boolean isFile(ChannelSftp channel, Path file) throws IOException {\n    try {\n      return !getFileStatus(channel, file).isDirectory();\n    } catch (FileNotFoundException e) {\n      return false; // file does not exist\n    } catch (IOException ioe) {\n      throw new IOException(E_FILE_CHECK_FAILED, ioe);\n    }\n  }\n\n  /**\n   * Convenience method, so that we don't open a new connection when using this\n   * method from within another method. Otherwise every API invocation incurs\n   * the overhead of opening/closing a TCP connection.\n   */\n  private boolean delete(ChannelSftp channel, Path file, boolean recursive)\n      throws IOException {\n    Path workDir;\n    try {\n      workDir = new Path(channel.pwd());\n    } catch (SftpException e) {\n      throw new IOException(e);\n    }\n    Path absolute = makeAbsolute(workDir, file);\n    String pathName = absolute.toUri().getPath();","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java#L343-L379","documentation":"Error \"File check failed\" thrown in apache/hadoop.","triggerScenarios":"Thrown by SFTPFileSystem when an existence/type check on a path fails, typically because the SFTP stat operation errored.","commonSituations":"See trigger scenarios.","solutions":["Check that the remote file exists and is a regular file (not a directory) before the operation.","Inspect the SFTP error cause for details (permissions, missing file)."],"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-23T01:17:44.959Z"}