apache/seatunnel · error · UnsupportedOperationException
The SplitChange type of %s is not supported.
Error message
The SplitChange type of %s is not supported.
What it means
handleSplitsChanges() only supports SplitsAddition — the CDC source reader never removes or modifies splits through this API. If the engine delivers any other SplitsChange subtype (e.g. SplitsRemoval), the reader throws UnsupportedOperationException because it cannot process it.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/reader/IncrementalSourceSplitReader.java:122
currentFetcher != null ? currentFetcher.getClass().getSimpleName() : "null",
currentFetcher != null && currentFetcher.isFinished());
throw new IOException(
String.format(
"Invalid state: currentSplitId is null when emitting records. "
+ "emittedFinishedSplitId=%s, currentFetcher=%s, isFinished=%s",
emittedFinishedSplitId,
currentFetcher != null
? currentFetcher.getClass().getSimpleName()
: "null",
currentFetcher != null && currentFetcher.isFinished()));
}
return ChangeEventRecords.forRecords(currentSplitId, dataIt);
}
@Override
public void handleSplitsChanges(SplitsChange<SourceSplitBase> splitsChanges) {
if (!(splitsChanges instanceof SplitsAddition)) {
throw new UnsupportedOperationException(
String.format(
"The SplitChange type of %s is not supported.",
splitsChanges.getClass()));
}
log.debug("Handling split change {}", splitsChanges);
splits.addAll(splitsChanges.splits());
}
@Override
public void wakeUp() {}
@Override
public void close() throws Exception {
try {
if (currentFetcher != null) {
log.info("Close current fetcher {}", currentFetcher.getClass().getCanonicalName());
currentFetcher.close();View on GitHub (pinned to cf67b549a7)
Solutions
- Check the engine version and connector compatibility; upgrade SeaTunnel so split-removal changes are not routed to this reader
- Inspect why a non-addition SplitsChange was generated (usually a failed-split or recovery path) and restart from a clean checkpoint
- If implementing a custom source/enumerator, only send SplitsAddition to IncrementalSourceSplitReader
Defensive patterns
Strategy: validation
Validate before calling
// Filter change types before passing to the CDC reader:
if (!(splitsChange instanceof SplitsAddition)) {
throw new IllegalArgumentException("IncrementalSourceSplitReader only accepts SplitsAddition");
} Type guard
boolean isAddition(SplitsChange<?> c) { return c instanceof SplitsAddition; } Try / catch
try { reader.handleSplitsChanges(change); }
catch (UnsupportedOperationException e) { LOG.warn("Ignoring unsupported split change type", e); } Prevention
- Only route SplitsAddition to the incremental split reader
- Verify engine/translation layer compatibility with the CDC connector version
When it happens
Trigger: handleSplitsChanges(splitsChanges) receives a SplitsChange that is not an instanceof SplitsAddition — e.g. the framework issues SplitsRemoval during failed/finishing-split handling or a custom engine path sends an unsupported change type.
Common situations: Running on an engine/translation layer that emits removal changes the CDC reader doesn't handle; job restore paths that replay removal events; custom SourceReader integration feeding the wrong change type.
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
- Multiple incremental splits are not supported
- not supported create new Offset by committed offset.
- Invalid state: currentSplitId is null when emitting records.
- should not call here, error
- not supported create new Offset by filename and position.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/13e75dda56c7e076.
Report an issue: GitHub.