{"record":{"id":"3f8beb57585b086b","repo":"apache/iceberg","slug":"failed-to-create-parquet-output-file-for-s","errorCode":null,"errorMessage":"Failed to create Parquet output file for %s","messagePattern":"Failed to create Parquet output file for (.+?)","errorType":"exception","errorClass":"RuntimeIOException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java","lineNumber":76,"sourceCode":"      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);\n  }\n\n  static OutputFile file(org.apache.iceberg.io.OutputFile file, Configuration conf) {\n    if (file instanceof HadoopOutputFile) {\n      HadoopOutputFile hfile = (HadoopOutputFile) file;\n      try {\n        return org.apache.parquet.hadoop.util.HadoopOutputFile.fromPath(hfile.getPath(), conf);\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);\n  }","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java#L58-L94","documentation":"ParquetIO.file(OutputFile) adapts Iceberg OutputFiles to Parquet OutputFiles. For HadoopOutputFile instances it reconstructs the Parquet HadoopOutputFile from the path; an IOException during that operation is rethrown as RuntimeIOException with this message, meaning the Parquet output target could not be created.","triggerScenarios":"Calling ParquetIO.file(OutputFile) with a HadoopOutputFile whose fromPath resolution fails (invalid path, filesystem error, permissions) — thrown as RuntimeIOException.","commonSituations":"Writing to a nonexistent directory, missing write permissions, HDFS/S3 outages or misconfigured credentials during a write job.","solutions":["Inspect the RuntimeIOException cause for the underlying Hadoop IOException","Verify the destination path and parent directory are valid and writable","Check filesystem credentials/connectivity (HDFS, S3, etc.)","Ensure no conflicting file creation permissions or existing commit artifacts block the path"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"Path parent = path.getParent();\nif (!fs.exists(parent)) { fs.mkdirs(parent); }\nif (!fs.isFileAccessWritable(parent)) { throw new AccessControlException(parent.toString()); }","typeGuard":null,"tryCatchPattern":"try {\n  ParquetWriter writer = ParquetAppenderWriter = ParquetIO.file(outputFile);\n} catch (RuntimeIOException e) {\n  logger.error(\"Output target unusable: {}\", outputFile.location(), e.getCause());\n  throw e;\n}","preventionTips":["Create parent directories before writing","Verify write permissions on the destination","Check FS connectivity/credentials before long write jobs"],"tags":["parquet","io","hadoop","file-write"],"backgroundTag":"file-write-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"}