You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "m1a2st (via GitHub)" <gi...@apache.org> on 2025/01/31 07:39:10 UTC
[PR] KAFKA-18685: Refactor DynamicLogConfig constructor [kafka]
m1a2st opened a new pull request, #18764:
URL: https://github.com/apache/kafka/pull/18764
Jira: https://issues.apache.org/jira/browse/KAFKA-18685
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18685: Cleanup DynamicLogConfig constructor [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #18764:
URL: https://github.com/apache/kafka/pull/18764#discussion_r1938719117
##########
core/src/main/scala/kafka/server/DynamicBrokerConfig.scala:
##########
@@ -362,23 +361,6 @@ class DynamicBrokerConfig(private val kafkaConfig: KafkaConfig) extends Logging
dynamicConfigPasswordEncoder.getOrElse(throw new ConfigException("Password encoder secret not configured"))
}
- private[server] def toPersistentProps(configProps: Properties, perBrokerConfig: Boolean): Properties = {
- val props = configProps.clone().asInstanceOf[Properties]
-
- def encodePassword(configName: String, value: String): Unit = {
- if (value != null) {
- if (!perBrokerConfig)
- throw new ConfigException("Password config can be defined only at broker level")
- props.setProperty(configName, passwordEncoder.encode(new Password(value)))
- }
- }
- configProps.asScala.foreachEntry { (name, value) =>
- if (isPasswordConfig(name))
- encodePassword(name, value)
- }
- props
- }
Review Comment:
that is a legacy code of zk and I open https://issues.apache.org/jira/browse/KAFKA-18693 to do fully cleanup. Hence, could you please revert this change?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18685: Cleanup DynamicLogConfig constructor [kafka]
Posted by "clolov (via GitHub)" <gi...@apache.org>.
clolov merged PR #18764:
URL: https://github.com/apache/kafka/pull/18764
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18685: Refactor DynamicLogConfig constructor [kafka]
Posted by "m1a2st (via GitHub)" <gi...@apache.org>.
m1a2st commented on code in PR #18764:
URL: https://github.com/apache/kafka/pull/18764#discussion_r1936800369
##########
core/src/main/scala/kafka/server/DynamicBrokerConfig.scala:
##########
@@ -362,23 +361,6 @@ class DynamicBrokerConfig(private val kafkaConfig: KafkaConfig) extends Logging
dynamicConfigPasswordEncoder.getOrElse(throw new ConfigException("Password encoder secret not configured"))
}
- private[server] def toPersistentProps(configProps: Properties, perBrokerConfig: Boolean): Properties = {
- val props = configProps.clone().asInstanceOf[Properties]
-
- def encodePassword(configName: String, value: String): Unit = {
- if (value != null) {
- if (!perBrokerConfig)
- throw new ConfigException("Password config can be defined only at broker level")
- props.setProperty(configName, passwordEncoder.encode(new Password(value)))
- }
- }
- configProps.asScala.foreachEntry { (name, value) =>
- if (isPasswordConfig(name))
- encodePassword(name, value)
- }
- props
- }
Review Comment:
This method only use in the test, thus I also remove it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org