mirror of https://github.com/apache/kafka.git
KAFKA-19355 Remove interBrokerListenerName from ClusterControlManager (#19866)
CI / build (push) Waiting to run
Details
CI / build (push) Waiting to run
Details
Following the removal of the ZK-to-KRaft migration code in commit
85bfdf4
, controller-to-broker communication is now handled by the
control-plane listener (`controller.listener.names`). The
`interBrokerListenerName` parameter in `ClusterControlManager` is no
longer referenced on the controller side and can be safely removed as
dead code.
Reviewers: Lan Ding <isDing_L@163.com>, Ken Huang <s7133700@gmail.com>,
Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
6826f45fd8
commit
8b49130b92
|
@ -252,7 +252,6 @@ class ControllerServer(
|
|||
setDelegationTokenExpiryTimeMs(delegationTokenManagerConfigs.delegationTokenExpiryTimeMs).
|
||||
setDelegationTokenExpiryCheckIntervalMs(delegationTokenManagerConfigs.delegationTokenExpiryCheckIntervalMs).
|
||||
setUncleanLeaderElectionCheckIntervalMs(config.uncleanLeaderElectionCheckIntervalMs).
|
||||
setInterBrokerListenerName(config.interBrokerListenerName.value()).
|
||||
setControllerPerformanceSamplePeriodMs(config.controllerPerformanceSamplePeriodMs).
|
||||
setControllerPerformanceAlwaysLogThresholdMs(config.controllerPerformanceAlwaysLogThresholdMs)
|
||||
}
|
||||
|
|
|
@ -92,7 +92,6 @@ public class ClusterControlManager {
|
|||
private ReplicaPlacer replicaPlacer = null;
|
||||
private FeatureControlManager featureControl = null;
|
||||
private BrokerShutdownHandler brokerShutdownHandler = null;
|
||||
private String interBrokerListenerName = "PLAINTEXT";
|
||||
private QuorumControllerMetrics metrics = null;
|
||||
|
||||
Builder setLogContext(LogContext logContext) {
|
||||
|
@ -135,10 +134,6 @@ public class ClusterControlManager {
|
|||
return this;
|
||||
}
|
||||
|
||||
Builder setInterBrokerListenerName(String interBrokerListenerName) {
|
||||
this.interBrokerListenerName = interBrokerListenerName;
|
||||
return this;
|
||||
}
|
||||
|
||||
Builder setMetrics(QuorumControllerMetrics metrics) {
|
||||
this.metrics = metrics;
|
||||
|
@ -175,7 +170,6 @@ public class ClusterControlManager {
|
|||
replicaPlacer,
|
||||
featureControl,
|
||||
brokerShutdownHandler,
|
||||
interBrokerListenerName,
|
||||
metrics
|
||||
);
|
||||
}
|
||||
|
@ -265,11 +259,6 @@ public class ClusterControlManager {
|
|||
|
||||
private final BrokerShutdownHandler brokerShutdownHandler;
|
||||
|
||||
/**
|
||||
* The statically configured inter-broker listener name.
|
||||
*/
|
||||
private final String interBrokerListenerName;
|
||||
|
||||
/**
|
||||
* Maps controller IDs to controller registrations.
|
||||
*/
|
||||
|
@ -294,7 +283,6 @@ public class ClusterControlManager {
|
|||
ReplicaPlacer replicaPlacer,
|
||||
FeatureControlManager featureControl,
|
||||
BrokerShutdownHandler brokerShutdownHandler,
|
||||
String interBrokerListenerName,
|
||||
QuorumControllerMetrics metrics
|
||||
) {
|
||||
this.logContext = logContext;
|
||||
|
@ -311,7 +299,6 @@ public class ClusterControlManager {
|
|||
this.controllerRegistrations = new TimelineHashMap<>(snapshotRegistry, 0);
|
||||
this.directoryToBroker = new TimelineHashMap<>(snapshotRegistry, 0);
|
||||
this.brokerShutdownHandler = brokerShutdownHandler;
|
||||
this.interBrokerListenerName = interBrokerListenerName;
|
||||
this.metrics = metrics;
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,6 @@ public final class QuorumController implements Controller {
|
|||
private long delegationTokenExpiryTimeMs;
|
||||
private long delegationTokenExpiryCheckIntervalMs = TimeUnit.MINUTES.toMillis(5);
|
||||
private long uncleanLeaderElectionCheckIntervalMs = TimeUnit.MINUTES.toMillis(5);
|
||||
private String interBrokerListenerName = "PLAINTEXT";
|
||||
|
||||
public Builder(int nodeId, String clusterId) {
|
||||
this.nodeId = nodeId;
|
||||
|
@ -381,10 +380,6 @@ public final class QuorumController implements Controller {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder setInterBrokerListenerName(String interBrokerListenerName) {
|
||||
this.interBrokerListenerName = interBrokerListenerName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QuorumController build() throws Exception {
|
||||
if (raftClient == null) {
|
||||
|
@ -443,7 +438,6 @@ public final class QuorumController implements Controller {
|
|||
delegationTokenExpiryTimeMs,
|
||||
delegationTokenExpiryCheckIntervalMs,
|
||||
uncleanLeaderElectionCheckIntervalMs,
|
||||
interBrokerListenerName,
|
||||
controllerPerformanceSamplePeriodMs,
|
||||
controllerPerformanceAlwaysLogThresholdMs
|
||||
);
|
||||
|
@ -1488,7 +1482,6 @@ public final class QuorumController implements Controller {
|
|||
long delegationTokenExpiryTimeMs,
|
||||
long delegationTokenExpiryCheckIntervalMs,
|
||||
long uncleanLeaderElectionCheckIntervalMs,
|
||||
String interBrokerListenerName,
|
||||
long controllerPerformanceSamplePeriodMs,
|
||||
long controllerPerformanceAlwaysLogThresholdMs
|
||||
) {
|
||||
|
@ -1530,7 +1523,6 @@ public final class QuorumController implements Controller {
|
|||
setReplicaPlacer(replicaPlacer).
|
||||
setFeatureControlManager(featureControl).
|
||||
setBrokerShutdownHandler(this::handleBrokerShutdown).
|
||||
setInterBrokerListenerName(interBrokerListenerName).
|
||||
setMetrics(controllerMetrics).
|
||||
build();
|
||||
this.configurationControl = new ConfigurationControlManager.Builder().
|
||||
|
|
Loading…
Reference in New Issue