-
Notifications
You must be signed in to change notification settings - Fork 14.5k
MINOR: Remove threadNamePrefix parameter from ReplicaManager and ReplicaFetcherManager #20069
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalaoqi Please run ./gradlew checkstyleMain checkstyleTest spotlessCheck
to fix lint issue. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalaoqi: Thanks for the patch!
@@ -28,7 +28,6 @@ class ReplicaFetcherManager(brokerConfig: KafkaConfig, | |||
protected val replicaManager: ReplicaManager, | |||
metrics: Metrics, | |||
time: Time, | |||
threadNamePrefix: Option[String] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You delete the threadNamePrefix
from the constructor, but you don't update ReplicaManagerBuilder
correspondingly. Hence, the build fails.
kafka/core/src/main/java/kafka/server/builders/ReplicaManagerBuilder.java
Lines 112 to 134 in 64aebb5
return new ReplicaManager(config, | |
metrics, | |
time, | |
scheduler, | |
logManager, | |
Option.empty(), | |
quotaManagers, | |
metadataCache, | |
logDirFailureChannel, | |
alterPartitionManager, | |
brokerTopicStats, | |
Option.empty(), | |
Option.empty(), | |
Option.empty(), | |
Option.empty(), | |
Option.empty(), | |
Option.empty(), | |
Option.empty(), | |
() -> -1L, | |
Option.empty(), | |
DirectoryEventHandler.NOOP, | |
new DelayedActionQueue()); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AbstractCoordinatorConcurrencyTest
kafka/core/src/test/scala/unit/kafka/coordinator/AbstractCoordinatorConcurrencyTest.scala
Line 194 in 64aebb5
threadNamePrefix = Option(this.getClass.getName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReplicaManagerConcurrencyTest
threadNamePrefix: Option[String], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalaoqi: The clean-up patch is easy to miss things. You can build the patch on your local machine to see if it breaks anything.
./gradlew clean build -x test
@@ -28,7 +28,6 @@ class ReplicaFetcherManager(brokerConfig: KafkaConfig, | |||
protected val replicaManager: ReplicaManager, | |||
metrics: Metrics, | |||
time: Time, | |||
threadNamePrefix: Option[String] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AbstractCoordinatorConcurrencyTest
kafka/core/src/test/scala/unit/kafka/coordinator/AbstractCoordinatorConcurrencyTest.scala
Line 194 in 64aebb5
threadNamePrefix = Option(this.getClass.getName)) { |
@@ -28,7 +28,6 @@ class ReplicaFetcherManager(brokerConfig: KafkaConfig, | |||
protected val replicaManager: ReplicaManager, | |||
metrics: Metrics, | |||
time: Time, | |||
threadNamePrefix: Option[String] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReplicaManagerConcurrencyTest
threadNamePrefix: Option[String], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalaoqi: LGTM
threadNamePrefix
fromReplicaManager
constructorBrokerServer
to use updated constructorthreadNamePrefix
fromReplicaFetcherManager
Reviewers: PoAn Yang payang@apache.org, TengYao Chi
frankvicky@apache.org