apache/iceberg · error · UnsupportedOperationException
this.getClass().getName() + " does not implement repairTable
Error message
this.getClass().getName() + " does not implement repairTable"
What it means
The default repairTable factory method in ActionsProvider throws UnsupportedOperationException when the concrete provider does not implement it. RepairTable fixes corrupt table metadata (e.g., recovering from the metadata.json history); providers that don't support it throw at call time.
Source
Thrown at api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java:100
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement computePartitionStats");
}
/** Instantiates an action to rewrite all absolute paths in table metadata. */
default RewriteTablePath rewriteTablePath(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement rewriteTablePath");
}
/** Instantiates an action to remove dangling delete files from current snapshot. */
default RemoveDanglingDeleteFiles removeDanglingDeleteFiles(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement removeDanglingDeleteFiles");
}
/** Instantiates an action to repair a table. */
default RepairTable repairTable(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement repairTable");
}
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Invoke repairTable via a provider that implements it (e.g., SparkActions.get(table)).
- Upgrade the engine integration module to a version implementing repairTable.
- Override repairTable in your custom ActionsProvider to return a concrete RepairTable action.
Example fix
// before RepairTable a = customProvider.repairTable(table); // after RepairTable a = SparkActions.get(table).repairTable();
Defensive patterns
Strategy: try-catch
Validate before calling
boolean ok = Arrays.stream(provider.getClass().getMethods()).anyMatch(m -> "repairTable".equals(m.getName()) && m.getDeclaringClass() != ActionsProvider.class);
Type guard
boolean implemented = provider.getClass() != ActionsProvider.class;
Try / catch
try { provider.repairTable(table); } catch (UnsupportedOperationException e) { throw new IllegalStateException("repairTable not available in this runtime", e); } Prevention
- Run repair via a fully featured provider such as SparkActions
- Keep custom ActionsProvider implementations in sync with the API
When it happens
Trigger: Calling repairTable(table) on an ActionsProvider without the override — custom providers, minimal test providers, or engine runtimes that never implemented table repair.
Common situations: Attempted metadata repair in an environment where the repair action is unavailable; provider implementations not updated alongside the API.
Related errors
- this.getClass().getName() + " does not implement computePart
- this.getClass().getName() + " does not implement rewriteTabl
- this.getClass().getName() + " does not implement removeDangl
- %s does not implement deleteFile
- %s does not implement addFile
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/cdc068a5e4a2624c.
Report an issue: GitHub.