public class DatabalancerUtils extends Object
Constructor and Description |
---|
DatabalancerUtils() |
Modifier and Type | Method and Description |
---|---|
static kafka.common.AliveBrokersSnapshot |
aliveBrokerSnapshotFromClusterImage(org.apache.kafka.image.ClusterImage clusterImage)
Return an AliveBrokerSnapshot based on the supplied ClusterImage
|
static boolean |
anyUnevenLoadEnabled(kafka.server.KafkaConfig kafkaConfig) |
static boolean |
anyUnevenLoadEnabled(String autoHealMode) |
static String |
generateCcTopicExclusionRegex(kafka.server.KafkaConfig config) |
static String |
generateCcTopicExclusionRegex(List<String> topicNames,
List<String> topicPrefixes)
The function forms a regex expression by performing OR operation on the topic names and topic prefixes
considering each of these as string literals.
|
static Integer |
getBrokerId(kafka.server.KafkaConfig config) |
static List<String> |
getConfiguredLogDirs(kafka.server.KafkaConfig config)
Get the log directories from the Kafka Config.
|
public static Integer getBrokerId(kafka.server.KafkaConfig config)
public static List<String> getConfiguredLogDirs(kafka.server.KafkaConfig config)
public static boolean anyUnevenLoadEnabled(kafka.server.KafkaConfig kafkaConfig)
public static boolean anyUnevenLoadEnabled(String autoHealMode)
public static String generateCcTopicExclusionRegex(kafka.server.KafkaConfig config)
public static String generateCcTopicExclusionRegex(List<String> topicNames, List<String> topicPrefixes)
public static kafka.common.AliveBrokersSnapshot aliveBrokerSnapshotFromClusterImage(org.apache.kafka.image.ClusterImage clusterImage)
clusterImage
- The cluster image upon which to base the AliveBrokerSnapshot