KAFKA-16908: Refactor QuorumConfig with AbstractConfig#17231
KAFKA-16908: Refactor QuorumConfig with AbstractConfig#17231chia7712 merged 4 commits intoapache:trunkfrom
QuorumConfig with AbstractConfig#17231Conversation
| * the metadata. The standby is a "hot" standby, not a "cold" one. | ||
| */ | ||
| public class QuorumConfig { | ||
| public class QuorumConfig extends AbstractConfig { |
There was a problem hiding this comment.
Does it need to extend AbstractConfig if it's constructor accepts a AbstractConfig already?
There was a problem hiding this comment.
Does it need to extend
AbstractConfigif it's constructor accepts aAbstractConfigalready?
Indeed, having it extend AbstractConfig is unnecessary. And I have removed it. PTAL
chia7712
left a comment
There was a problem hiding this comment.
@xijiu thanks for this patch. Could you please add a QuorumConfig reference to KafkaConfig and then remove the unused quorum variables from KafkaConfig? quorumElectionTimeoutMs, quorumFetchTimeoutMs, quorumElectionBackoffMs, quorumLingerMs, and quorumRetryBackoffMs?
The above behavior is similar to remoteLogManagerConfig in KafkaConfig
| .define(QUORUM_REQUEST_TIMEOUT_MS_CONFIG, INT, DEFAULT_QUORUM_REQUEST_TIMEOUT_MS, null, MEDIUM, QUORUM_REQUEST_TIMEOUT_MS_DOC) | ||
| .define(QUORUM_RETRY_BACKOFF_MS_CONFIG, INT, DEFAULT_QUORUM_RETRY_BACKOFF_MS, null, LOW, QUORUM_RETRY_BACKOFF_MS_DOC); | ||
|
|
||
| private final int requestTimeoutMs; |
There was a problem hiding this comment.
Could you please keep those local variables since they are not dynamic?
1148a2c to
93d4567
Compare
|
@chia7712 I have modified the code and remove some getter methods from |
| def remoteLogManagerConfig = _remoteLogManagerConfig | ||
|
|
||
| private val _quorumConfig = new QuorumConfig(this) | ||
| def quorumConfig = _quorumConfig |
There was a problem hiding this comment.
nit: please declare the type explicitly
There was a problem hiding this comment.
nit: please declare the type explicitly
Done, I have declared the QuorumConfig type, PTAL
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
As title
Committer Checklist (excluded from commit message)