{"record":{"id":"1e1405ca34dc92d3","repo":"apache/iceberg","slug":"the-method-start-catalog-icebergsinkconfig-sinkt","errorCode":null,"errorMessage":"The method start(Catalog, IcebergSinkConfig, SinkTaskContext) is deprecated and will be removed in 2.0.0. Use start(Catalog, IcebergSinkConfig, SinkTaskContext, Collection<TopicPartition>) instead.","messagePattern":"The method start\\(Catalog, IcebergSinkConfig, SinkTaskContext\\) is deprecated and will be removed in 2\\.0\\.0\\. Use start\\(Catalog, IcebergSinkConfig, SinkTaskContext, Collection<TopicPartition>\\) instead\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitterImpl.java","lineNumber":135,"sourceCode":"    }\n\n    return containsFirst;\n  }\n\n  @VisibleForTesting\n  TopicPartition findFirstTopicPartition(Collection<MemberDescription> members) {\n    return members.stream()\n        .flatMap(member -> member.assignment().topicPartitions().stream())\n        .min(new TopicPartitionComparator())\n        .orElse(null);\n  }\n\n  @Override\n  public void start(\n      Catalog icebergCatalog,\n      IcebergSinkConfig icebergSinkConfig,\n      SinkTaskContext sinkTaskContext) {\n    throw new UnsupportedOperationException(\n        \"The method start(Catalog, IcebergSinkConfig, SinkTaskContext) is deprecated and will be removed in 2.0.0. \"\n            + \"Use start(Catalog, IcebergSinkConfig, SinkTaskContext, Collection<TopicPartition>) instead.\");\n  }\n\n  @Override\n  public void open(\n      Catalog icebergCatalog,\n      IcebergSinkConfig icebergSinkConfig,\n      SinkTaskContext sinkTaskContext,\n      Collection<TopicPartition> addedPartitions) {\n    initialize(icebergCatalog, icebergSinkConfig, sinkTaskContext);\n    if (hasLeaderPartition(addedPartitions)) {\n      LOG.info(\"Committer {} received leader partition. Starting Coordinator.\", taskId);\n      startCoordinator();\n    }\n  }\n\n  @Override","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitterImpl.java#L117-L153","documentation":"CommitterImpl implements the deprecated 3-argument Committer.start method and deliberately throws UnsupportedOperationException to force migration to the 4-argument overload that receives the currently assigned TopicPartitions. The deprecated entry point cannot work correctly with the partition-based worker lifecycle the sink now uses. This is a hard-stop guard, not a graceful deprecation.","triggerScenarios":"Kafka Connect's worker calls the old Committer.start(Catalog, IcebergSinkConfig, SinkTaskContext) overload — i.e. running an Iceberg sink connector version whose Committer interface still exposes the 3-arg start against this implementation, typically a version-mismatch between connector code and Connect framework or an externally constructed Committer invoking the legacy method.","commonSituations":"Upgrading the Iceberg Kafka Connect sink while a custom or patched Connect runtime still binds to the legacy SenderTask/Committer signatures; building a custom channel implementation that calls start() without the assigned partitions collection.","solutions":["Call the 4-argument overload start(Catalog, IcebergSinkConfig, SinkTaskContext, Collection<TopicPartition>) passing the partitions currently assigned to the task.","If invoked indirectly by the Connect framework, upgrade the Iceberg sink connector (and Kafka Connect runtime) to versions that agree on the new interface.","If you maintain a wrapper or subclass of CommitterImpl, forward to the new overload instead of the deprecated one."],"exampleFix":"// before\ncommitter.start(catalog, sinkConfig, sinkTaskContext);\n\n// after\ncommitter.start(catalog, sinkConfig, sinkTaskContext, context.assignment());","handlingStrategy":"validation","validationCode":"// Java\nif (partitions == null) {\n  throw new IllegalArgumentException(\"partitions collection required: use the 4-arg start overload\");\n}\ncommitter.start(catalog, sinkConfig, sinkTaskContext, partitions);","typeGuard":null,"tryCatchPattern":"try { committer.start(catalog, cfg, ctx, partitions); } catch (UnsupportedOperationException e) { throw new IllegalStateException(\"Connector/framework version mismatch on Committer API\", e); }","preventionTips":["Always call the 4-argument start overload in new code","Keep the Iceberg sink connector and Kafka Connect runtime versions aligned","Watch deprecation warnings at compile time (-Werror or lint) to catch legacy API usage"],"tags":["kafka-connect","deprecated-api","unsupported-operation","version-mismatch"],"backgroundTag":"deprecated-api-usage","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}