apache/iceberg · error · RuntimeIOException
Failed to create manifest writer for path: %s
Error message
Failed to create manifest writer for path: %s
What it means
Thrown when the Avro manifest writer appender for a format-version-4 data manifest cannot be created at the output location; the IOException is wrapped as RuntimeIOException. Creating the manifest writer is part of every snapshot commit that writes data manifests.
Source
Thrown at core/src/main/java/org/apache/iceberg/ManifestWriter.java:306
@Override
protected FileAppender<ManifestEntry<DataFile>> newAppender(
PartitionSpec spec, OutputFile file) {
Schema manifestSchema = V4Metadata.entrySchema(spec.partitionType());
try {
return InternalData.write(format(), file)
.schema(manifestSchema)
.named("manifest_entry")
.meta("schema", SchemaParser.toJson(spec.schema()))
.meta("partition-spec", PartitionSpecParser.toJsonFields(spec))
.meta("partition-spec-id", String.valueOf(spec.specId()))
.meta("format-version", "4")
.meta("content", "data")
.set(writerProperties())
.overwrite()
.build();
} catch (IOException e) {
throw new RuntimeIOException(
e, "Failed to create manifest writer for path: %s", file.location());
}
}
}
static class V4DeleteWriter extends ManifestWriter<DeleteFile> {
private final V4Metadata.ManifestEntryWrapper<DeleteFile> entryWrapper;
V4DeleteWriter(
PartitionSpec spec,
EncryptedOutputFile file,
Long snapshotId,
Map<String, String> writerProperties) {
super(spec, file, snapshotId, null, writerProperties);
this.entryWrapper = new V4Metadata.ManifestEntryWrapper<>(snapshotId, spec.partitionType());
}
@OverrideView on GitHub (pinned to 86d9c8fc54)
Solutions
- Examine the wrapped IOException cause for the concrete storage error.
- Verify FileIO provider configuration (impl, credentials, endpoint) used by the table.
- Confirm write permission and existence of the target location/bucket.
- Retry the commit; use commit retries for transient object-store faults.
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-flight write probe on the metadata prefix
try (var out = table.io().newOutputFile(probeManifestPath).createOrOverwrite()) {
// writable
} catch (IOException e) {
throw new IllegalStateException("Cannot write manifests: " + probeManifestPath, e);
} Try / catch
try {
snapshotProducer.commit();
} catch (RuntimeIOException e) {
logger.error("v4 manifest write failed: {}", e.getCause(), e);
// fix FileIO/credentials then retry
} Prevention
- Pre-create and ACL the metadata prefix for format-v4 tables
- Distribute provider credentials to executors
- Retry commits on transient storage faults
- Monitor token expiry during long jobs
When it happens
Trigger: ManifestWriter.V4DataWriter.newAppender fails while opening the output file via FileIO when writing a format-version 4 data manifest.
Common situations: Cloud storage auth failures, missing bucket/prefix permissions, transient network errors during commits, misconfigured FileIO in executors, disk quota exceeded on local FS.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- Failed to create snapshot list writer for path: %s
- Cannot read manifest list file: %s
- Cannot read manifest list file: %s
- Failed to close manifest reader
- Failed to get stream length
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/26ba2526df1217f4.
Report an issue: GitHub.