public class ModelUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BROKER_ID |
static java.lang.String |
BROKER_STATE |
static java.lang.String |
BROKERS |
static java.lang.String |
HOSTS |
static java.lang.String |
IS_LEADER |
static java.lang.String |
LOAD |
static java.lang.String |
METRIC_VALUES |
static java.lang.String |
NAME |
static java.lang.String |
PARTITION |
static java.lang.String |
RACK_ID |
static java.lang.String |
REPLICAS |
static java.lang.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 java.lang.String BROKER_ID
public static final java.lang.String BROKER_STATE
public static final java.lang.String REPLICAS
public static final java.lang.String IS_LEADER
public static final java.lang.String TOPIC
public static final java.lang.String PARTITION
public static final java.lang.String LOAD
public static final java.lang.String METRIC_VALUES
public static final java.lang.String NAME
public static final java.lang.String BROKERS
public static final java.lang.String RACK_ID
public static final java.lang.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)