apache/iceberg · error · UnsupportedOperationException
Operation rewriteManifests is not supported after the table
Error message
Operation rewriteManifests is not supported after the table is serialized
What it means
SerializableTable wraps table metadata and FileIO so a table can be used for reads in distributed tasks, but it cannot commit metadata changes because it has no catalog connection. rewriteManifests() is a metadata-mutating operation, so it is overridden to throw UnsupportedOperationException with this message.
Source
Thrown at core/src/main/java/org/apache/iceberg/SerializableTable.java:387
@Override
public UpdateLocation updateLocation() {
throw new UnsupportedOperationException(errorMsg("updateLocation"));
}
@Override
public AppendFiles newAppend() {
throw new UnsupportedOperationException(errorMsg("newAppend"));
}
@Override
public RewriteFiles newRewrite() {
throw new UnsupportedOperationException(errorMsg("newRewrite"));
}
@Override
public RewriteManifests rewriteManifests() {
throw new UnsupportedOperationException(errorMsg("rewriteManifests"));
}
@Override
public OverwriteFiles newOverwrite() {
throw new UnsupportedOperationException(errorMsg("newOverwrite"));
}
@Override
public RowDelta newRowDelta() {
throw new UnsupportedOperationException(errorMsg("newRowDelta"));
}
@Override
public ReplacePartitions newReplacePartitions() {
throw new UnsupportedOperationException(errorMsg("newReplacePartitions"));
}
@OverrideView on GitHub (pinned to 86d9c8fc54)
Solutions
- Use catalog.loadTable(identifier).rewriteManifests() so commits go through the catalog
- Run manifest rewriting on the driver where the live Table is available
- Return rewrite results from workers and apply the commit driver-side via the original table
- Add an explicit check (table instanceof SerializableTable) that fails fast with a clearer message
Example fix
// before Table table = deserializedTable; // SerializableTable table.rewriteManifests().execute(); // after Table table = catalog.loadTable(identifier); table.rewriteManifests().execute();
Defensive patterns
Strategy: try-catch
Validate before calling
if (table instanceof org.apache.iceberg.SerializableTable) {
throw new IllegalStateException("rewriteManifests() requires a catalog-backed Table");
} Type guard
boolean canCommit = !(table instanceof org.apache.iceberg.SerializableTable);
Try / catch
try {
table.rewriteManifests().execute();
} catch (UnsupportedOperationException e) {
if (e.getMessage().contains("not supported after the table is serialized")) {
catalog.loadTable(identifier).rewriteManifests().execute();
} else { throw e; }
} Prevention
- Keep manifest rewrites on the catalog-connected node
- Pass table identifiers across the wire, never serialized Table instances for writes
- Validate table type at helper-method entry points
- Treat SerializableTable strictly as a read-only view
When it happens
Trigger: Calling table.rewriteManifests() on a deserialized SerializableTable inside a worker task, e.g. building a custom manifest compaction job.
Common situations: Distributed manifest compaction implemented by shipping the Table across the wire; refactoring driver code into executors; helper utilities that accept Table and are fed a SerializableTable.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Operation updateLocation is not supported after the table is
- Operation newAppend is not supported after the table is seri
- Operation newRewrite is not supported after the table is ser
- Operation newOverwrite is not supported after the table is s
- Operation newRowDelta is not supported after the table is se
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/1a341df75a3011e6.
Report an issue: GitHub.