public class ModelUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BROKER_ID |
static String |
BROKER_STATE |
static String |
BROKERS |
static String |
HOSTS |
static String |
IS_LEADER |
static String |
LOAD |
static String |
METRIC_VALUES |
static String |
NAME |
static String |
PARTITION |
static String |
RACK_ID |
static String |
REPLICAS |
static String |
TOPIC |
Modifier and Type | Method and Description |
---|---|
static double |
estimateLeaderCpuUtil(double brokerCpuUtil,
double brokerLeaderBytesInRate,
double brokerLeaderBytesOutRate,
double brokerFollowerBytesInRate,
double partitionBytesInRate,
double partitionBytesOutRate)
Estimate the leader CPU utilization for the partition with the given information as a double in [0.0,1.0].
|
static double |
estimateLeaderCpuUtilUsingLinearRegressionModel(double leaderPartitionBytesInRate,
double leaderPartitionBytesOutRate) |
static double |
getFollowerCpuUtilFromLeaderLoad(double leaderBytesInRate,
double leaderBytesOutRate,
double leaderCpuUtil) |
static void |
init(KafkaCruiseControlConfig config) |
public static final String BROKER_ID
public static final String BROKER_STATE
public static final String REPLICAS
public static final String IS_LEADER
public static final String TOPIC
public static final String PARTITION
public static final String LOAD
public static final String METRIC_VALUES
public static final String NAME
public static final String BROKERS
public static final String RACK_ID
public static final String HOSTS
public static void init(KafkaCruiseControlConfig config)
public static double getFollowerCpuUtilFromLeaderLoad(double leaderBytesInRate, double leaderBytesOutRate, double leaderCpuUtil)
public static double estimateLeaderCpuUtil(double brokerCpuUtil, double brokerLeaderBytesInRate, double brokerLeaderBytesOutRate, double brokerFollowerBytesInRate, double partitionBytesInRate, double partitionBytesOutRate)
brokerCpuUtil
- A double in [0.0,1.0], representing the CPU usage of the broker hosting the partition leader.brokerLeaderBytesInRate
- Leader bytes in rate in the broker.brokerLeaderBytesOutRate
- Leader bytes out rate in the broker.brokerFollowerBytesInRate
- Follower bytes in rate in the broker.partitionBytesInRate
- Leader bytes in rate for the partition.partitionBytesOutRate
- Total bytes out rate (i.e. leader/replication bytes out) for the partition.public static double estimateLeaderCpuUtilUsingLinearRegressionModel(double leaderPartitionBytesInRate, double leaderPartitionBytesOutRate)