Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KafkaV2SinkConnector #39434

Merged
merged 73 commits into from
Mar 29, 2024
Merged

KafkaV2SinkConnector #39434

merged 73 commits into from
Mar 29, 2024

Conversation

xinlian12
Copy link
Member

@xinlian12 xinlian12 commented Mar 27, 2024

Adding back Kafka sink connector change : #38973

Extra changes:

  • Added more shaded class files in guava.collect and guava.math
  • Added the following two API in azure-cosmos
    PartitionKey toPartitionKey(List<Object> values, boolean strict);
    Mono<PartitionKeyDefinition> getPartitionKeyDefinition(CosmosAsyncContainer container);

@github-actions github-actions bot added Cosmos DevCenter Digital Twins Event Grid Event Hubs graalvm Label for tracking issues related to graalvm Mgmt This issue is related to a management-plane library. OpenTelemetry OpenTelemetry instrumentation labels Mar 27, 2024
@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @xinlian12
All my suggestions can be implemented in a follow up PR if it makes it easier.

sdk/cosmos/azure-cosmos-kafka-connect/pom.xml Outdated Show resolved Hide resolved
@@ -459,7 +492,7 @@ Licensed under the MIT License.
</profile>
<profile>
<!-- integration tests, requires Cosmos DB Emulator Endpoint -->
<id>kafka-integration</id>
<id>kafka</id>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should name them as integration

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will discuss offline for this

/**
* A Sink connector that publishes topic messages to CosmosDB.
*/
public class CosmosSinkConnector extends SinkConnector {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our CosmosSourceConnector implements AutoCloseable, how about sink connector? Do we need it?

Copy link
Member Author

@xinlian12 xinlian12 Mar 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sink connector does not hold any resources like socket etc, so no real need to implement AutoCloseable

new KafkaCosmosPointWriter(this.sinkTaskConfig.getWriteConfig(), context.errantRecordReporter());
}

// TODO[public preview]: in V1, it will create the database if does not exists, but why?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are few comments I left with // TODO[], will revisit all together once. But I want to remove this as I do not think it make sense to create the database here

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12 xinlian12 merged commit be7bb5d into Azure:main Mar 29, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants