apache/iceberg · error · RuntimeIOException
Failed to create Parquet input file for %s
Error message
Failed to create Parquet input file for %s
What it means
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.
Source
Thrown at parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java:62
import org.apache.parquet.io.OutputFile;
import org.apache.parquet.io.ParquetFileRange;
import org.apache.parquet.io.PositionOutputStream;
import org.apache.parquet.io.SeekableInputStream;
/** Methods in this class translate from the IO API to Parquet's IO API. */
class ParquetIO {
private ParquetIO() {}
static InputFile file(org.apache.iceberg.io.InputFile file) {
// TODO: use reflection to avoid depending on classes from iceberg-hadoop
// TODO: use reflection to avoid depending on classes from hadoop
if (file instanceof HadoopInputFile) {
HadoopInputFile hfile = (HadoopInputFile) file;
try {
return org.apache.parquet.hadoop.util.HadoopInputFile.fromStatus(
hfile.getStat(), hfile.getConf());
} catch (IOException e) {
throw new RuntimeIOException(
e, "Failed to create Parquet input file for %s", file.location());
}
}
return new ParquetInputFile(file);
}
static OutputFile file(org.apache.iceberg.io.OutputFile file) {
if (file instanceof HadoopOutputFile) {
HadoopOutputFile hfile = (HadoopOutputFile) file;
try {
return org.apache.parquet.hadoop.util.HadoopOutputFile.fromPath(
hfile.getPath(), hfile.getConf());
} catch (IOException e) {
throw new RuntimeIOException(
e, "Failed to create Parquet output file for %s", file.location());
}
}
return new ParquetOutputFile(file);View on GitHub (pinned to 86d9c8fc54)
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
Defensive patterns
Strategy: try-catch
Validate before calling
if (!fs.exists(path)) { throw new FileNotFoundException(path.toString()); } Try / catch
try {
ParquetReader reader = ParquetIO.file(inputFile).build();
} catch (RuntimeIOException e) {
logger.error("Input file unusable: {}", inputFile.location(), e.getCause());
throw e;
} Prevention
- Verify input files exist before reading (skip deleted/expired data files)
- Check Hadoop FS credentials and connectivity
- Handle transient FS failures with retry
When it happens
Trigger: Calling ParquetIO.file(InputFile) with a HadoopInputFile whose underlying FileSystem getFileStatus/fromStatus call fails (file missing, FS unreachable, permissions).
Common situations: Deleted or renamed file between planning and read; HDFS/S3 connectivity failures; permission errors on the Hadoop filesystem; misconfigured Hadoop FS credentials.
Understand the failure class
Background: "open() failed", "failed to open file", "cannot create file" — what a file open error means and how to fix it — this error's family across 42 libraries.
Related errors
- Failed to open input stream for file: %s
- Failed to create Parquet output file for %s
- Failed to read from input stream
- Failed to read bytes from stream
- Error reading mini block.
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/28256496d77f009f.
Report an issue: GitHub.