mirror of https://github.com/apache/kafka.git
MINOR: Fix the leak "unknown" `group.coordinator.rebalance.protocols` on documentation (#17834)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Jacot <djacot@confluent.io>
This commit is contained in:
parent
32c887b05e
commit
a4cd94e4ef
|
@ -67,6 +67,13 @@ public interface Group {
|
|||
|
||||
return type == null ? UNKNOWN : type;
|
||||
}
|
||||
|
||||
static String[] documentValidValues() {
|
||||
return Arrays.stream(GroupType.values())
|
||||
.filter(type -> type != UNKNOWN)
|
||||
.map(GroupType::toString)
|
||||
.toArray(String[]::new);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,13 +25,11 @@ import org.apache.kafka.coordinator.group.assignor.RangeAssignor;
|
|||
import org.apache.kafka.coordinator.group.assignor.UniformAssignor;
|
||||
import org.apache.kafka.coordinator.group.modern.share.ShareGroupConfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.apache.kafka.common.config.ConfigDef.Importance.HIGH;
|
||||
import static org.apache.kafka.common.config.ConfigDef.Importance.MEDIUM;
|
||||
|
@ -75,8 +73,7 @@ public class GroupCoordinatorConfig {
|
|||
public static final boolean NEW_GROUP_COORDINATOR_ENABLE_DEFAULT = true;
|
||||
|
||||
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(",")) + ". " +
|
||||
public static final String GROUP_COORDINATOR_REBALANCE_PROTOCOLS_DOC = "The list of enabled rebalance protocols." +
|
||||
"The " + Group.GroupType.SHARE + " rebalance protocol is in early access and therefore must not be used in production.";
|
||||
public static final List<String> GROUP_COORDINATOR_REBALANCE_PROTOCOLS_DEFAULT = List.of(
|
||||
Group.GroupType.CLASSIC.toString(),
|
||||
|
@ -215,7 +212,7 @@ 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(Group.GroupType.documentValidValues()), MEDIUM, GROUP_COORDINATOR_REBALANCE_PROTOCOLS_DOC)
|
||||
.define(GROUP_COORDINATOR_NUM_THREADS_CONFIG, INT, GROUP_COORDINATOR_NUM_THREADS_DEFAULT, atLeast(1), MEDIUM, GROUP_COORDINATOR_NUM_THREADS_DOC)
|
||||
.define(GROUP_COORDINATOR_APPEND_LINGER_MS_CONFIG, INT, GROUP_COORDINATOR_APPEND_LINGER_MS_DEFAULT, atLeast(0), MEDIUM, GROUP_COORDINATOR_APPEND_LINGER_MS_DOC)
|
||||
// Internal configuration used by integration and system tests.
|
||||
|
|
Loading…
Reference in New Issue