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 |
estimateCpuUtil(double brokerCpuUtil,
double brokerTotalBytesInRate,
double brokerTotalBytesOutRate,
double brokerProduceRate,
double brokerFetchRate,
double totalReplicaBytesInRate,
double totalReplicaBytesOutRate,
double replicaProduceRate,
double replicaFetchRate,
double requestContributionWeight,
double bytesContributionWeight)
Estimate the leader CPU utilization for the partition with the given information as a double in [0.0,1.0].
|
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 double estimateCpuUtil(double brokerCpuUtil, double brokerTotalBytesInRate, double brokerTotalBytesOutRate, double brokerProduceRate, double brokerFetchRate, double totalReplicaBytesInRate, double totalReplicaBytesOutRate, double replicaProduceRate, double replicaFetchRate, double requestContributionWeight, double bytesContributionWeight)
brokerCpuUtil
- A double in [0.0,1.0], representing the CPU usage of the broker hosting the partition leader.brokerTotalBytesInRate
- Total bytes in rate in the broker, including client and replication bytes.brokerTotalBytesOutRate
- Total bytes out rate in the broker, including client and replication bytes.brokerProduceRate
- Produce rate of the broker.brokerFetchRate
- Fetch rate of the broker, including replication requests.totalReplicaBytesInRate
- Total bytes in rate for the replica, including replication bytes.totalReplicaBytesOutRate
- Total bytes out rate (i.e. leader/replication bytes out) for the replica.replicaProduceRate
- Total produce rate for the replica on this broker. If its a follower, this
value will be 0.replicaFetchRate
- Total fetch rate for the partition including consumer and replica fetch. For
a follower this will be 0.