{"record":{"id":"2b989998a1df343f","repo":"apache/seatunnel","slug":"settypeinfo-method-is-not-supported","errorCode":null,"errorMessage":"setTypeInfo method is not supported","messagePattern":"setTypeInfo 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":62,"sourceCode":" *     CommitInfoT}. {@link SinkAggregatedCommitter} handle it, this class should implement\n *     interface {@link Serializable}.\n */\npublic interface SeaTunnelSink<IN, StateT, CommitInfoT, AggregatedCommitInfoT>\n        extends Serializable,\n                PluginIdentifierInterface,\n                SeaTunnelPluginLifeCycle,\n                SeaTunnelJobAware {\n\n    /**\n     * Set the row type info of sink row data. This method will be automatically called by\n     * 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","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java#L44-L80","documentation":"Sentinel UnsupportedOperationException from the deprecated default SeaTunnelSink.setTypeInfo method: this sink implementation (created via createAndPrepareSink) never overrode the legacy type-info hook. Modern sinks get their row type from the Factory/translation layer instead, so hitting this means the calling translation path is still using the old deprecated API against a sink that only supports the new one.","triggerScenarios":"Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rely on the factory-based type discovery (TableSchemaFactory / translation layer) instead of calling setTypeInfo","If a legacy execution path must be supported, override setTypeInfo in the concrete sink","Upgrade the translation/entrypoint code to the current API that no longer invokes this method"],"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"}