-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
KAFKA-18553: Update javadoc and comments of ConfigType #18567
base: trunk
Are you sure you want to change the base?
Conversation
@@ -31,6 +31,5 @@ public class ConfigType { | |||
public static final String CLIENT_METRICS = "client-metrics"; | |||
public static final String GROUP = "groups"; | |||
|
|||
// Do not include ClientMetrics and Groups in `all` as they are not supported on ZK. |
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.
Hmm, does this mean we should change ALL
? cc @apoorvmittal10 @AndrewJSchofield
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.
Perhaps we can eliminate ALL
since it's exclusively used by ConfigCommand
after the removal of ZooKeeper code
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.
Why would we remove it? It seems like a useful concept and better placed here than in the command itself.
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.
I would, in fact, avoid the need for ConfigCommand
to do its own definition of the config types the system supports - commands should ideally not have any such logic.
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.
ConfigCommand
use ALL
to do pre-check before calling related APIs. Hence, it should be fine to remove the ALL
as ConfigCommand
eventually throw exception if user-defined string is not a allowed type.
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.
+1 to replace with current implementation with enum.
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.
If we agree to convert this class to an enum, I suggest we handle this after #18585 is merged, since ConfigType
is widely used by AdminZkClient
.
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.
Making it an enum is fine, but can also be done separately. We can file that as a JIRA if we want to decouple from this PR. The reason why I raised the issue is that by removing the comment that was there, we had lost track of the reason for the unusual behavior (which is no longer needed).
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.
I see.
Indeed the definition of All has been change after removing zk.
I will file a ticket for converting to enum issue.
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.
51eaeef
to
a0bc2b8
Compare
a0bc2b8
to
0f20644
Compare
@@ -31,6 +31,5 @@ public class ConfigType { | |||
public static final String CLIENT_METRICS = "client-metrics"; | |||
public static final String GROUP = "groups"; | |||
|
|||
// Do not include ClientMetrics and Groups in `all` as they are not supported on ZK. | |||
public static final List<String> ALL = Arrays.asList(TOPIC, CLIENT, USER, BROKER, IP); | |||
public static final List<String> ALL = Arrays.asList(TOPIC, CLIENT, USER, BROKER, IP, CLIENT_METRICS, GROUP); |
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.
Can we use List.of()
?
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.
Sure
JIRA: KAFKA-18553 The description of this class is outdated.
0f20644
to
6eec6e9
Compare
JIRA: KAFKA-18553
The description of this class is outdated.
Committer Checklist (excluded from commit message)