{"record":{"id":"ca0bcbb09babf608","repo":"apache/seatunnel","slug":"unsupported-operation-ca0bcb","errorCode":"UNSUPPORTED_OPERATION","errorMessage":"Unsupported operation type: ${opType}","messagePattern":"Unsupported operation type: (.+?)","errorType":"error_code","errorClass":"HudiConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/sink/writer/HudiRecordWriter.java","lineNumber":182,"sourceCode":"        buffer.clear();\n    }\n\n    private void executeWrite() {\n        HoodieJavaWriteClient<HoodieAvroPayload> writeClient = clientProvider.getOrCreateClient();\n        String writeInstantTime = writeClient.startCommit();\n        // write records\n        switch (hudiTableConfig.getOpType()) {\n            case INSERT:\n                writeClient.insert(writeRecords, writeInstantTime);\n                break;\n            case UPSERT:\n                writeClient.upsert(writeRecords, writeInstantTime);\n                break;\n            case BULK_INSERT:\n                writeClient.bulkInsert(writeRecords, writeInstantTime);\n                break;\n            default:\n                throw new HudiConnectorException(\n                        HudiErrorCode.UNSUPPORTED_OPERATION,\n                        \"Unsupported operation type: \" + hudiTableConfig.getOpType());\n        }\n        writeRecords.clear();\n    }\n\n    private void executeDelete() {\n        HoodieJavaWriteClient<HoodieAvroPayload> writeClient = clientProvider.getOrCreateClient();\n        writeClient.delete(deleteRecordKeys, writeClient.startCommit());\n        deleteRecordKeys.clear();\n    }\n\n    protected void prepareRecords(SeaTunnelRow element) {\n        HoodieRecord<HoodieAvroPayload> hoodieAvroPayloadHoodieRecord =\n                recordConverter.convertRow(schema, seaTunnelRowType, element, hudiTableConfig);\n        HoodieKey recordKey = hoodieAvroPayloadHoodieRecord.getKey();\n        boolean changeFlag = changeFlag(element.getRowKind());\n        buffer.put(recordKey, Pair.of(changeFlag, hoodieAvroPayloadHoodieRecord));","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/sink/writer/HudiRecordWriter.java#L164-L200","documentation":"executeWrite() dispatches to the Hudi write client based on the configured operation type (upsert, bulk_insert); any other configured opType hits default and throws HudiConnectorException with UNSUPPORTED_OPERATION because the connector does not implement that operation.","triggerScenarios":"hudiTableConfig.getOpType() returns a value other than UPSERT or BULK_INSERT (e.g. INSERT, DELETE, INSERT_OVERWRITE) when flush() triggers executeWrite.","commonSituations":"Typo or unsupported value in the op_type config option; copying a config from another connector; newer Hudi op types not mapped by this connector version.","solutions":["Set the op_type config to one of the supported values (upsert or bulk_insert)","Correct typos/case in the op_type value in the job config","Check the connector docs for the list of supported operation types"],"exampleFix":"// before\n\"op_type\" = \"insert_overwrite\"\n// after\n\"op_type\" = \"upsert\"","handlingStrategy":"validation","validationCode":"String op = config.get(\"op_type\");\nif (!\"upsert\".equalsIgnoreCase(op) && !\"bulk_insert\".equalsIgnoreCase(op)) {\n    throw new IllegalArgumentException(\"op_type must be upsert or bulk_insert, got: \" + op);\n}","typeGuard":null,"tryCatchPattern":"try {\n    sink.writeRecord(row);\n} catch (HudiConnectorException e) {\n    if (HudiErrorCode.UNSUPPORTED_OPERATION.equals(e.getPluginErrorCode())) {\n        LOG.error(\"Fix op_type config; supported: upsert, bulk_insert\");\n    } else { throw e; }\n}","preventionTips":["Copy op_type values only from the connector's documented option list","Validate the full sink config against option definitions before submit","Do not reuse op_type values from other connectors"],"tags":["hudi","writer","config","unsupported-operation"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}