apache/seatunnel · error · UnsupportedOperationException
getConsumedType method is not supported
Error message
getConsumedType method is not supported
What it means
Sentinel UnsupportedOperationException from the deprecated default SeaTunnelSink.getConsumedType method: the concrete sink did not override this legacy accessor, so any caller asking the sink for its consumed SeaTunnelRowType via the old API gets this error. Row types are now supplied by the Factory/TableSchema path, so the fault is the outdated call site, not missing sink configuration.
Solutions
- Obtain the sink's row type from the factory's table schema instead of calling getConsumedType
- Override getConsumedType in the sink implementation if legacy compatibility is required
- Update the calling code (older translation layer) to a version that uses factory-provided types
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java:73 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/2295df055f07041f.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java:73
* translation.
*
* @deprecated instead by {@link org.apache.seatunnel.api.table.factory.Factory}
* @param seaTunnelRowType The row type info of sink.
*/
@Deprecated
default void setTypeInfo(SeaTunnelRowType seaTunnelRowType) {
throw new UnsupportedOperationException("setTypeInfo method is not supported");
}
/**
* Get the data type of the records consumed by this sink.
*
* @deprecated instead by {@link org.apache.seatunnel.api.table.factory.Factory}
* @return SeaTunnel data type.
*/
@Deprecated
default SeaTunnelDataType<IN> getConsumedType() {
throw new UnsupportedOperationException("getConsumedType method is not supported");
}
/**
* This method will be called to creat {@link SinkWriter}
*
* @param context The sink context
* @return Return sink writer instance
* @throws IOException throws IOException when createWriter failed.
*/
SinkWriter<IN, CommitInfoT, StateT> createWriter(SinkWriter.Context context) throws IOException;
default SinkWriter<IN, CommitInfoT, StateT> restoreWriter(
SinkWriter.Context context, List<StateT> states) throws IOException {
return createWriter(context);
}
/**
* Get {@link StateT} serializer. So that {@link StateT} can be transferred across processesView on GitHub (pinned to cf67b549a7)