{"record":{"id":"28256496d77f009f","repo":"apache/iceberg","slug":"failed-to-create-parquet-input-file-for-s","errorCode":null,"errorMessage":"Failed to create Parquet input file for %s","messagePattern":"Failed to create Parquet input file for (.+?)","errorType":"exception","errorClass":"RuntimeIOException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java","lineNumber":62,"sourceCode":"import org.apache.parquet.io.OutputFile;\nimport org.apache.parquet.io.ParquetFileRange;\nimport org.apache.parquet.io.PositionOutputStream;\nimport org.apache.parquet.io.SeekableInputStream;\n\n/** Methods in this class translate from the IO API to Parquet's IO API. */\nclass ParquetIO {\n  private ParquetIO() {}\n\n  static InputFile file(org.apache.iceberg.io.InputFile file) {\n    // TODO: use reflection to avoid depending on classes from iceberg-hadoop\n    // TODO: use reflection to avoid depending on classes from hadoop\n    if (file instanceof HadoopInputFile) {\n      HadoopInputFile hfile = (HadoopInputFile) file;\n      try {\n        return org.apache.parquet.hadoop.util.HadoopInputFile.fromStatus(\n            hfile.getStat(), hfile.getConf());\n      } catch (IOException e) {\n        throw new RuntimeIOException(\n            e, \"Failed to create Parquet input file for %s\", file.location());\n      }\n    }\n    return new ParquetInputFile(file);\n  }\n\n  static OutputFile file(org.apache.iceberg.io.OutputFile file) {\n    if (file instanceof HadoopOutputFile) {\n      HadoopOutputFile hfile = (HadoopOutputFile) file;\n      try {\n        return org.apache.parquet.hadoop.util.HadoopOutputFile.fromPath(\n            hfile.getPath(), hfile.getConf());\n      } catch (IOException e) {\n        throw new RuntimeIOException(\n            e, \"Failed to create Parquet output file for %s\", file.location());\n      }\n    }\n    return new ParquetOutputFile(file);","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java#L44-L80","documentation":"ParquetIO.file(InputFile) adapts Iceberg InputFiles to Parquet InputFiles. For HadoopInputFile instances it re-derives the Parquet HadoopInputFile from the file status; if that filesystem status lookup throws IOException, it is rethrown as RuntimeIOException with this message.","triggerScenarios":"Calling ParquetIO.file(InputFile) with a HadoopInputFile whose underlying FileSystem getFileStatus/fromStatus call fails (file missing, FS unreachable, permissions).","commonSituations":"Deleted or renamed file between planning and read; HDFS/S3 connectivity failures; permission errors on the Hadoop filesystem; misconfigured Hadoop FS credentials.","solutions":["Check the RuntimeIOException cause for the underlying Hadoop IOException","Verify the file path exists and is accessible (permissions, FS credentials)","Test filesystem connectivity (HDFS NameNode, S3 endpoint) and retry transient failures","Re-plan the scan if the file was deleted or moved"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!fs.exists(path)) { throw new FileNotFoundException(path.toString()); }","typeGuard":null,"tryCatchPattern":"try {\n  ParquetReader reader = ParquetIO.file(inputFile).build();\n} catch (RuntimeIOException e) {\n  logger.error(\"Input file unusable: {}\", inputFile.location(), e.getCause());\n  throw e;\n}","preventionTips":["Verify input files exist before reading (skip deleted/expired data files)","Check Hadoop FS credentials and connectivity","Handle transient FS failures with retry"],"tags":["parquet","io","hadoop","file-open"],"backgroundTag":"file-open-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}