apache/iceberg · error · java.lang.IllegalArgumentException
Unsupported manifest content type:
Error message
Unsupported manifest content type:
What it means
When planning a Spark action, manifests are read by content type: DATA manifests via ManifestFiles.read, DELETES via readDeleteManifest. Any other ManifestContent has no reader path and throws IllegalArgumentException, protecting against silently skipping unknown manifest kinds.
Solutions
- Upgrade the Iceberg Spark runtime to a version handling the manifest content type
- Remove/repair the offending manifests (e.g. via expireSnapshots on a compatible runtime)
- Confirm no mixed Iceberg versions between catalog and executor
Example fix
// before
throw new IllegalArgumentException("Unsupported manifest content type:" + content);
// after
// upgrade runtime that supports the new ManifestContent before this default branch fires Defensive patterns
Strategy: try-catch
Try / catch
try { SparkActions.get(spark).deleteOrphanFiles(table)...execute(); }
catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Unsupported manifest content type")) { /* upgrade runtime */ }
else throw e;
} Prevention
- Keep Spark runtime >= writer Iceberg version
- Do not hand-edit metadata files
- Expire old manifests with a compatible runtime before upgrading readers
When it happens
Trigger: Running a Spark action (rewriteDataFiles, compute stats, etc.) against a table containing manifests whose content type is neither DATA nor DELETES — e.g. new manifest kinds introduced by a newer spec version.
Common situations: Reading tables written by a newer Iceberg version with an older Spark runtime on the classpath; corrupted or hand-edited metadata assigning unexpected content values.
Related errors
- Cannot create table as the namespace does not exist
- Cannot find source table
- Cannot find source table
- Cannot find source table
- Cannot use non-v1 table
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/1dc92b586dc669ba.
Report an issue: GitHub.
Appendix: source
Thrown at spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java:436
}
public CloseableIterator<FileInfo> entries(ManifestFileBean manifest) {
ManifestContent content = manifest.content();
FileIO io = table.getValue().io();
Map<Integer, PartitionSpec> specs = table.getValue().specs();
List<String> proj = ImmutableList.of(DataFile.FILE_PATH.name(), DataFile.CONTENT.name());
switch (content) {
case DATA:
return CloseableIterator.transform(
ManifestFiles.read(manifest, io, specs).select(proj).iterator(),
ReadManifest::toFileInfo);
case DELETES:
return CloseableIterator.transform(
ManifestFiles.readDeleteManifest(manifest, io, specs).select(proj).iterator(),
ReadManifest::toFileInfo);
default:
throw new IllegalArgumentException("Unsupported manifest content type:" + content);
}
}
static FileInfo toFileInfo(ContentFile<?> file) {
return new FileInfo(file.location(), file.content().toString());
}
}
}
View on GitHub (pinned to 86d9c8fc54)