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).
|
setDelegationTokenExpiryTimeMs(delegationTokenManagerConfigs.delegationTokenExpiryTimeMs).
|
||||||
setDelegationTokenExpiryCheckIntervalMs(delegationTokenManagerConfigs.delegationTokenExpiryCheckIntervalMs).
|
setDelegationTokenExpiryCheckIntervalMs(delegationTokenManagerConfigs.delegationTokenExpiryCheckIntervalMs).
|
||||||
setUncleanLeaderElectionCheckIntervalMs(config.uncleanLeaderElectionCheckIntervalMs).
|
setUncleanLeaderElectionCheckIntervalMs(config.uncleanLeaderElectionCheckIntervalMs).
|
||||||
setInterBrokerListenerName(config.interBrokerListenerName.value()).
|
|
||||||
setControllerPerformanceSamplePeriodMs(config.controllerPerformanceSamplePeriodMs).
|
setControllerPerformanceSamplePeriodMs(config.controllerPerformanceSamplePeriodMs).
|
||||||
setControllerPerformanceAlwaysLogThresholdMs(config.controllerPerformanceAlwaysLogThresholdMs)
|
setControllerPerformanceAlwaysLogThresholdMs(config.controllerPerformanceAlwaysLogThresholdMs)
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,6 @@ public class ClusterControlManager {
|
||||||
private ReplicaPlacer replicaPlacer = null;
|
private ReplicaPlacer replicaPlacer = null;
|
||||||
private FeatureControlManager featureControl = null;
|
private FeatureControlManager featureControl = null;
|
||||||
private BrokerShutdownHandler brokerShutdownHandler = null;
|
private BrokerShutdownHandler brokerShutdownHandler = null;
|
||||||
private String interBrokerListenerName = "PLAINTEXT";
|
|
||||||
private QuorumControllerMetrics metrics = null;
|
private QuorumControllerMetrics metrics = null;
|
||||||
|
|
||||||
Builder setLogContext(LogContext logContext) {
|
Builder setLogContext(LogContext logContext) {
|
||||||
|
@ -135,10 +134,6 @@ public class ClusterControlManager {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Builder setInterBrokerListenerName(String interBrokerListenerName) {
|
|
||||||
this.interBrokerListenerName = interBrokerListenerName;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Builder setMetrics(QuorumControllerMetrics metrics) {
|
Builder setMetrics(QuorumControllerMetrics metrics) {
|
||||||
this.metrics = metrics;
|
this.metrics = metrics;
|
||||||
|
@ -175,7 +170,6 @@ public class ClusterControlManager {
|
||||||
replicaPlacer,
|
replicaPlacer,
|
||||||
featureControl,
|
featureControl,
|
||||||
brokerShutdownHandler,
|
brokerShutdownHandler,
|
||||||
interBrokerListenerName,
|
|
||||||
metrics
|
metrics
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -265,11 +259,6 @@ public class ClusterControlManager {
|
||||||
|
|
||||||
private final BrokerShutdownHandler brokerShutdownHandler;
|
private final BrokerShutdownHandler brokerShutdownHandler;
|
||||||
|
|
||||||
/**
|
|
||||||
* The statically configured inter-broker listener name.
|
|
||||||
*/
|
|
||||||
private final String interBrokerListenerName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps controller IDs to controller registrations.
|
* Maps controller IDs to controller registrations.
|
||||||
*/
|
*/
|
||||||
|
@ -294,7 +283,6 @@ public class ClusterControlManager {
|
||||||
ReplicaPlacer replicaPlacer,
|
ReplicaPlacer replicaPlacer,
|
||||||
FeatureControlManager featureControl,
|
FeatureControlManager featureControl,
|
||||||
BrokerShutdownHandler brokerShutdownHandler,
|
BrokerShutdownHandler brokerShutdownHandler,
|
||||||
String interBrokerListenerName,
|
|
||||||
QuorumControllerMetrics metrics
|
QuorumControllerMetrics metrics
|
||||||
) {
|
) {
|
||||||
this.logContext = logContext;
|
this.logContext = logContext;
|
||||||
|
@ -311,7 +299,6 @@ public class ClusterControlManager {
|
||||||
this.controllerRegistrations = new TimelineHashMap<>(snapshotRegistry, 0);
|
this.controllerRegistrations = new TimelineHashMap<>(snapshotRegistry, 0);
|
||||||
this.directoryToBroker = new TimelineHashMap<>(snapshotRegistry, 0);
|
this.directoryToBroker = new TimelineHashMap<>(snapshotRegistry, 0);
|
||||||
this.brokerShutdownHandler = brokerShutdownHandler;
|
this.brokerShutdownHandler = brokerShutdownHandler;
|
||||||
this.interBrokerListenerName = interBrokerListenerName;
|
|
||||||
this.metrics = metrics;
|
this.metrics = metrics;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,6 @@ public final class QuorumController implements Controller {
|
||||||
private long delegationTokenExpiryTimeMs;
|
private long delegationTokenExpiryTimeMs;
|
||||||
private long delegationTokenExpiryCheckIntervalMs = TimeUnit.MINUTES.toMillis(5);
|
private long delegationTokenExpiryCheckIntervalMs = TimeUnit.MINUTES.toMillis(5);
|
||||||
private long uncleanLeaderElectionCheckIntervalMs = TimeUnit.MINUTES.toMillis(5);
|
private long uncleanLeaderElectionCheckIntervalMs = TimeUnit.MINUTES.toMillis(5);
|
||||||
private String interBrokerListenerName = "PLAINTEXT";
|
|
||||||
|
|
||||||
public Builder(int nodeId, String clusterId) {
|
public Builder(int nodeId, String clusterId) {
|
||||||
this.nodeId = nodeId;
|
this.nodeId = nodeId;
|
||||||
|
@ -381,10 +380,6 @@ public final class QuorumController implements Controller {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setInterBrokerListenerName(String interBrokerListenerName) {
|
|
||||||
this.interBrokerListenerName = interBrokerListenerName;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public QuorumController build() throws Exception {
|
public QuorumController build() throws Exception {
|
||||||
if (raftClient == null) {
|
if (raftClient == null) {
|
||||||
|
@ -443,7 +438,6 @@ public final class QuorumController implements Controller {
|
||||||
delegationTokenExpiryTimeMs,
|
delegationTokenExpiryTimeMs,
|
||||||
delegationTokenExpiryCheckIntervalMs,
|
delegationTokenExpiryCheckIntervalMs,
|
||||||
uncleanLeaderElectionCheckIntervalMs,
|
uncleanLeaderElectionCheckIntervalMs,
|
||||||
interBrokerListenerName,
|
|
||||||
controllerPerformanceSamplePeriodMs,
|
controllerPerformanceSamplePeriodMs,
|
||||||
controllerPerformanceAlwaysLogThresholdMs
|
controllerPerformanceAlwaysLogThresholdMs
|
||||||
);
|
);
|
||||||
|
@ -1488,7 +1482,6 @@ public final class QuorumController implements Controller {
|
||||||
long delegationTokenExpiryTimeMs,
|
long delegationTokenExpiryTimeMs,
|
||||||
long delegationTokenExpiryCheckIntervalMs,
|
long delegationTokenExpiryCheckIntervalMs,
|
||||||
long uncleanLeaderElectionCheckIntervalMs,
|
long uncleanLeaderElectionCheckIntervalMs,
|
||||||
String interBrokerListenerName,
|
|
||||||
long controllerPerformanceSamplePeriodMs,
|
long controllerPerformanceSamplePeriodMs,
|
||||||
long controllerPerformanceAlwaysLogThresholdMs
|
long controllerPerformanceAlwaysLogThresholdMs
|
||||||
) {
|
) {
|
||||||
|
@ -1530,7 +1523,6 @@ public final class QuorumController implements Controller {
|
||||||
setReplicaPlacer(replicaPlacer).
|
setReplicaPlacer(replicaPlacer).
|
||||||
setFeatureControlManager(featureControl).
|
setFeatureControlManager(featureControl).
|
||||||
setBrokerShutdownHandler(this::handleBrokerShutdown).
|
setBrokerShutdownHandler(this::handleBrokerShutdown).
|
||||||
setInterBrokerListenerName(interBrokerListenerName).
|
|
||||||
setMetrics(controllerMetrics).
|
setMetrics(controllerMetrics).
|
||||||
build();
|
build();
|
||||||
this.configurationControl = new ConfigurationControlManager.Builder().
|
this.configurationControl = new ConfigurationControlManager.Builder().
|
||||||
|
|
Loading…
Reference in New Issue