{"record":{"id":"2295df055f07041f","repo":"apache/seatunnel","slug":"getconsumedtype-method-is-not-supported","errorCode":null,"errorMessage":"getConsumedType method is not supported","messagePattern":"getConsumedType method is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java","lineNumber":73,"sourceCode":"     * translation.\n     *\n     * @deprecated instead by {@link org.apache.seatunnel.api.table.factory.Factory}\n     * @param seaTunnelRowType The row type info of sink.\n     */\n    @Deprecated\n    default void setTypeInfo(SeaTunnelRowType seaTunnelRowType) {\n        throw new UnsupportedOperationException(\"setTypeInfo method is not supported\");\n    }\n\n    /**\n     * Get the data type of the records consumed by this sink.\n     *\n     * @deprecated instead by {@link org.apache.seatunnel.api.table.factory.Factory}\n     * @return SeaTunnel data type.\n     */\n    @Deprecated\n    default SeaTunnelDataType<IN> getConsumedType() {\n        throw new UnsupportedOperationException(\"getConsumedType method is not supported\");\n    }\n\n    /**\n     * This method will be called to creat {@link SinkWriter}\n     *\n     * @param context The sink context\n     * @return Return sink writer instance\n     * @throws IOException throws IOException when createWriter failed.\n     */\n    SinkWriter<IN, CommitInfoT, StateT> createWriter(SinkWriter.Context context) throws IOException;\n\n    default SinkWriter<IN, CommitInfoT, StateT> restoreWriter(\n            SinkWriter.Context context, List<StateT> states) throws IOException {\n        return createWriter(context);\n    }\n\n    /**\n     * Get {@link StateT} serializer. So that {@link StateT} can be transferred across processes","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java#L55-L91","documentation":"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.","triggerScenarios":"Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}