apache/iceberg · error · UncheckedIOException
Failed to create new equality delete writer
Error message
Failed to create new equality delete writer
What it means
RegistryBasedFileWriterFactory.newEqualityDeleteWriter builds an EqualityDeleteWriter through the writer registry; an IOException while creating/opening the equality delete output file is wrapped in UncheckedIOException with this message.
Source
Thrown at data/src/main/java/org/apache/iceberg/data/RegistryBasedFileWriterFactory.java:154
try {
FileWriterBuilder<EqualityDeleteWriter<T>, S> builder =
FormatModelRegistry.equalityDeleteWriteBuilder(deleteFileFormat, inputType, file);
return builder
.setAll(properties)
.setAll(writerProperties)
.metricsConfig(metricsConfig)
.schema(equalityDeleteRowSchema)
.engineSchema(equalityDeleteInputSchema())
.equalityFieldIds(equalityFieldIds)
.spec(spec)
.partition(partition)
.keyMetadata(keyMetadata)
.sortOrder(equalityDeleteSortOrder)
.overwrite()
.build();
} catch (IOException e) {
throw new UncheckedIOException("Failed to create new equality delete writer", e);
}
}
@Override
public PositionDeleteWriter<T> newPositionDeleteWriter(
EncryptedOutputFile file, PartitionSpec spec, StructLike partition) {
EncryptionKeyMetadata keyMetadata = file.keyMetadata();
Map<String, String> properties = table != null ? table.properties() : ImmutableMap.of();
MetricsConfig metricsConfig = MetricsConfig.forPositionDelete();
try {
FileWriterBuilder<PositionDeleteWriter<T>, ?> builder =
FormatModelRegistry.positionDeleteWriteBuilder(deleteFileFormat, file);
return builder
.setAll(properties)
.setAll(writerProperties)
.metricsConfig(metricsConfig)
.spec(spec)View on GitHub (pinned to 86d9c8fc54)
Solutions
- Read the wrapped IOException cause to identify the real open failure.
- Ensure the registry has an EqualityDeleteWriter factory registered for the target format.
- Verify write credentials and output path for delete files.
- Match the delete format to one supported by your writer registry (e.g. parquet).
Example fix
// before: only data writers registered // after: register equality delete writer factory too registry.addFactory(Parquet.EqualityDeleteWriter.class, new ParquetEqualityDeleteWriterFactory());
Defensive patterns
Strategy: try-catch
Validate before calling
// ensure an equality delete writer factory exists for the format
if (registry.factory(Parquet.EqualityDeleteWriter.class) == null) {
throw new IllegalStateException("No equality delete writer registered");
} Try / catch
try {
EqualityDeleteWriter<T> w = factory.newEqualityDeleteWriter(file, spec, partition);
} catch (UncheckedIOException e) {
throw new RuntimeException("Equality delete writer open failed: " + e.getCause().getMessage(), e.getCause());
} Prevention
- Register equality-delete writer factories alongside data writer factories.
- Pre-flight check the delete-file output directory for write access.
- Keep format choices consistent across data and delete writers.
When it happens
Trigger: Calling newEqualityDeleteWriter(file, spec, partition) when opening the EncryptedOutputFile fails or no registered equality-delete writer exists for the configured format.
Common situations: Custom writer registries missing equality-delete writer mappings; storage auth/path failures on the delete-file output location; format unsupported for equality deletes.
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 new data writer
- Failed to create new position delete writer
- Failed to close current writer
- Failed to close encryption manager
- Failed to write json to file: %s
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/cbb1af64d59132aa.
Report an issue: GitHub.