apache/iceberg · error · UnsupportedOperationException
Received invalid default split request event from subtask %d
Error message
Received invalid default split request event from subtask %d as Iceberg source uses custom split request event
What it means
AbstractIcebergEnumerator.handleSplitRequest overrides the default FLIP-27 enumerator hook. The Iceberg source does not use the framework's default split-request mechanism; readers instead send a custom SplitRequestEvent via handleSourceEvent so they can piggyback finished split ids. Receiving a default split request means a reader (or foreign event source) is not using the Iceberg source protocol, so the enumerator throws UnsupportedOperationException naming the offending subtask id.
Source
Thrown at flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java:78
// excessive memory footprint. Some pending splits may not have been discovered yet.
.setUnassignedSplitsGauge(() -> Long.valueOf(assigner.pendingSplitCount()));
this.enumeratorContext.metricGroup().gauge("pendingRecords", assigner::pendingRecords);
}
@Override
public void start() {
assigner.start();
}
@Override
public void close() throws IOException {
assigner.close();
}
@Override
public void handleSplitRequest(int subtaskId, @Nullable String requesterHostname) {
// Iceberg source uses custom split request event to piggyback finished split ids.
throw new UnsupportedOperationException(
String.format(
Locale.ROOT,
"Received invalid default split request event "
+ "from subtask %d as Iceberg source uses custom split request event",
subtaskId));
}
@Override
public void handleSourceEvent(int subtaskId, SourceEvent sourceEvent) {
if (sourceEvent instanceof SplitRequestEvent) {
SplitRequestEvent splitRequestEvent = (SplitRequestEvent) sourceEvent;
LOG.info("Received request split event from subtask {}", subtaskId);
assigner.onCompletedSplits(splitRequestEvent.finishedSplitIds());
readersAwaitingSplit.put(subtaskId, splitRequestEvent.requesterHostname());
assignSplits();
} else {
throw new IllegalArgumentException(
String.format(View on GitHub (pinned to 86d9c8fc54)
Solutions
- Use the stock IcebergSourceReader (IcebergSourceReaderBase subclasses) which sends SplitRequestEvent, not the default request.
- Remove custom reader code that calls SourceReaderContext.sendSplitRequest(); instead emit SplitRequestEvent with finished split ids.
- Verify no non-Iceberg readers are connected to this enumerator (check subtask id from the message in JobManager logs).
- Align reader and enumerator versions — an old reader jar with a new enumerator can fall back to default requests.
Example fix
// before context.sendSourceEvent(new DefaultSplitRequest()); // wrong: default protocol // after context.sendSourceEvent(new SplitRequestEvent(finishedSplitIds, requesterHostname));
Defensive patterns
Strategy: validation
Validate before calling
// in custom reader code: never call the default request hook // ensure you emit the Iceberg event instead: context.sendSourceEvent(new SplitRequestEvent(finishedIds, requesterHostname));
Prevention
- Always extend IcebergSourceReaderBase so split requests use the Iceberg protocol.
- Never call SourceReaderContext.sendSplitRequest() with the Iceberg enumerator.
- Pin one iceberg-flink version across all task nodes.
When it happens
Trigger: A SourceReader sends a plain default split request (e.g., a non-Iceberg reader added to the same source, or custom reader code calling context.sendSplitRequest() instead of emitting SplitRequestEvent) while an AbstractIcebergEnumerator is the enumerator.
Common situations: Custom/patched IcebergSourceReader modifications; mixing source reader implementations after a Flink version upgrade; accidentally using the generic SourceReader base class without the Iceberg split-request event.
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
- Altering schema is not supported in the old alterTable API.
- Altering partition keys is not supported yet.
- Creating table with computed columns is not supported yet.
- Creating table with watermark specs is not supported yet.
- Could not set a field in the RowDataWrapper because rowData
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/3a7d93768dc089ce.
Report an issue: GitHub.