dajac commented on code in PR #17834: URL: https://github.com/apache/kafka/pull/17834#discussion_r1847810835
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorConfig.java: ########## @@ -76,7 +76,9 @@ public class GroupCoordinatorConfig { public static final String GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG = "group.coordinator.rebalance.protocols"; public static final String GROUP_COORDINATOR_REBALANCE_PROTOCOLS_DOC = "The list of enabled rebalance protocols. Supported protocols: " + - Arrays.stream(Group.GroupType.values()).map(Group.GroupType::toString).collect(Collectors.joining(",")) + ". " + + Arrays.stream(Group.GroupType.values()) + .filter(protocol -> !protocol.equals(Group.GroupType.UNKNOWN)) + .map(Group.GroupType::toString).collect(Collectors.joining(", ")) + ". " + Review Comment: I wonder whether we should just drop this part from the documentation given that the values are provided automatically. What do you think? ########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorConfig.java: ########## @@ -213,7 +215,8 @@ public class GroupCoordinatorConfig { public static final ConfigDef NEW_GROUP_CONFIG_DEF = new ConfigDef() .define(GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG, LIST, GROUP_COORDINATOR_REBALANCE_PROTOCOLS_DEFAULT, - ConfigDef.ValidList.in(Utils.enumOptions(Group.GroupType.class)), MEDIUM, GROUP_COORDINATOR_REBALANCE_PROTOCOLS_DOC) + ConfigDef.ValidList.in(Arrays.stream(Utils.enumOptions(Group.GroupType.class)) + .filter(groupType -> !groupType.equals(Group.GroupType.UNKNOWN.toString())).toArray(String[]::new)), MEDIUM, GROUP_COORDINATOR_REBALANCE_PROTOCOLS_DOC) Review Comment: nit: I wonder whether we should have a small helper method in `GroupType` to get the list of valid values. What do you think? -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org