Skip to content

MINOR: Move inter-broker NetworkClient factory to server module#22346

Open
JiayaoS wants to merge 2 commits into
apache:trunkfrom
JiayaoS:feature/NetworkUtils
Open

MINOR: Move inter-broker NetworkClient factory to server module#22346
JiayaoS wants to merge 2 commits into
apache:trunkfrom
JiayaoS:feature/NetworkUtils

Conversation

@JiayaoS
Copy link
Copy Markdown
Contributor

@JiayaoS JiayaoS commented May 22, 2026

Move the inter-broker NetworkClient factory from core to the server module and make it depend on AbstractKafkaConfig instead of KafkaConfig.

Move saslMechanismInterBrokerProtocol to AbstractKafkaConfig to keep the factory independent of KafkaConfig.

@github-actions github-actions Bot added triage PRs from the community core Kafka Broker small Small PRs labels May 22, 2026
import org.apache.kafka.server.util.timer.{SystemTimer, SystemTimerReaper, Timer}
import org.apache.kafka.server.util.{Deadline, FutureUtils, KafkaScheduler, NetworkPartitionMetadataClient, PartitionMetadataClient}
import org.apache.kafka.server.{AssignmentsManager, AutoTopicCreationManager, BrokerFeatures, BrokerLifecycleManager, ClientMetricsManager, DefaultApiVersionManager, DefaultAutoTopicCreationManager, DelayedActionQueue, FetchManager, FetchSessionCacheShard, KRaftTopicCreator, NodeToControllerChannelManagerImpl, ProcessRole, RaftControllerNodeProvider}
import org.apache.kafka.server.{AssignmentsManager, AutoTopicCreationManager, BrokerFeatures, BrokerLifecycleManager, ClientMetricsManager, DefaultApiVersionManager, DefaultAutoTopicCreationManager, DelayedActionQueue, FetchManager, FetchSessionCacheShard, KRaftTopicCreator, InterBrokerNetworkClientFactory, NodeToControllerChannelManagerImpl, ProcessRole, RaftControllerNodeProvider}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
import org.apache.kafka.server.{AssignmentsManager, AutoTopicCreationManager, BrokerFeatures, BrokerLifecycleManager, ClientMetricsManager, DefaultApiVersionManager, DefaultAutoTopicCreationManager, DelayedActionQueue, FetchManager, FetchSessionCacheShard, KRaftTopicCreator, InterBrokerNetworkClientFactory, NodeToControllerChannelManagerImpl, ProcessRole, RaftControllerNodeProvider}
import org.apache.kafka.server.{AssignmentsManager, AutoTopicCreationManager, BrokerFeatures, BrokerLifecycleManager, ClientMetricsManager, DefaultApiVersionManager, DefaultAutoTopicCreationManager, DelayedActionQueue, FetchManager, FetchSessionCacheShard, InterBrokerNetworkClientFactory, KRaftTopicCreator,, NodeToControllerChannelManagerImpl, ProcessRole, RaftControllerNodeProvider}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looking at the alphabetic order

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks~

private InterBrokerNetworkClientFactory() {}

public static NetworkClient create(String prefix,
AbstractKafkaConfig config,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the params are not indented here well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks~

Copy link
Copy Markdown
Contributor

@muralibasani muralibasani 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.

@github-actions github-actions Bot removed the triage PRs from the community label May 23, 2026
Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

Please merge trunk to fix build error, Thanks

@JiayaoS JiayaoS force-pushed the feature/NetworkUtils branch from d0b3105 to 8d88531 Compare May 25, 2026 07:25
@JiayaoS
Copy link
Copy Markdown
Contributor Author

JiayaoS commented May 25, 2026

Please merge trunk to fix build error, Thanks

Thanks, done.

Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved core Kafka Broker small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants