public class BrokerStats extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
BROKERS |
protected List<SingleBrokerStats> |
brokerStats |
protected static String |
HOST |
protected int |
hostFieldLength |
protected static String |
HOSTS |
protected SortedMap<String,com.linkedin.kafka.cruisecontrol.monitor.BasicStats> |
hostStats |
protected boolean |
isBrokerStatsEstimated |
protected int |
logdirFieldLength |
Constructor and Description |
---|
BrokerStats(KafkaCruiseControlConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
addSingleBrokerStats(String host,
int id,
Broker.State state,
double diskUtil,
double cpuUtil,
double leaderBytesInRate,
double followerBytesInRate,
double bytesOutRate,
double potentialBytesOutRate,
int numReplicas,
int numLeaders,
boolean isEstimated,
double capacity,
Map<String,DiskStats> diskStatsByLogdir) |
Map<String,Object> |
getJsonStructure()
Return an object that can be further be used to encode into JSON
|
boolean |
isBrokerStatsEstimated() |
List<SingleBrokerStats> |
stats() |
String |
toString() |
protected static final String HOST
protected static final String HOSTS
protected static final String BROKERS
protected final List<SingleBrokerStats> brokerStats
protected final SortedMap<String,com.linkedin.kafka.cruisecontrol.monitor.BasicStats> hostStats
protected int hostFieldLength
protected int logdirFieldLength
protected boolean isBrokerStatsEstimated
public BrokerStats(KafkaCruiseControlConfig config)
public void addSingleBrokerStats(String host, int id, Broker.State state, double diskUtil, double cpuUtil, double leaderBytesInRate, double followerBytesInRate, double bytesOutRate, double potentialBytesOutRate, int numReplicas, int numLeaders, boolean isEstimated, double capacity, Map<String,DiskStats> diskStatsByLogdir)
public boolean isBrokerStatsEstimated()
public Map<String,Object> getJsonStructure()
public List<SingleBrokerStats> stats()