Class EvenClusterLoadPlanBrokerStats
java.lang.Object
org.apache.kafka.clients.admin.EvenClusterLoadPlanBrokerStats
Holds broker-specific information like broker ID, host, cpu usage percentage, multiple network
disk usage in MB, disk usage percentage, measurements in KB/s, total leader replicas,
and total replicas.
-
Constructor Summary
ConstructorsConstructorDescriptionEvenClusterLoadPlanBrokerStats(int brokerId, String host, double diskMB, double diskPercent, double cpuPercent, double leaderNetworkInKBps, double followerNetworkInKBps, double networkOutKBps, double potentialNetworkOutKBps, int leaders, int replicas) Creates anEvenClusterLoadPlanBrokerStatsobject. -
Method Summary
Modifier and TypeMethodDescriptionintbrokerId()ID of the broker.doubleCPU usage percent.doublediskMB()Disk usage in MB.doublePercentage of used up disk.doubleInbound traffic from replicas that it follows.host()Broker's host.doubleInbound traffic from replicas that it's leader of.intleaders()Number of replicas that it's a leader of.doubleOutbound network traffic.doublePotential outbound network traffic.intreplicas()Number of replicas hosted.toString()
-
Constructor Details
-
EvenClusterLoadPlanBrokerStats
public EvenClusterLoadPlanBrokerStats(int brokerId, String host, double diskMB, double diskPercent, double cpuPercent, double leaderNetworkInKBps, double followerNetworkInKBps, double networkOutKBps, double potentialNetworkOutKBps, int leaders, int replicas) Creates anEvenClusterLoadPlanBrokerStatsobject.- Parameters:
brokerId- id of the brokerhost- hostdiskMB- disk usage in MBdiskPercent- disk usage percentcpuPercent- cpu usage percentleaderNetworkInKBps- leader network inbound traffic in KB/sfollowerNetworkInKBps- follower network inbound traffic in KB/snetworkOutKBps- outbound traffic in KB/spotentialNetworkOutKBps- potential outbound network traffic in KB/sleaders- number of replicas that it's a leader ofreplicas- number of replicas
-
-
Method Details
-
brokerId
public int brokerId()ID of the broker.- Returns:
- broker ID
-
host
-
diskMB
public double diskMB()Disk usage in MB.- Returns:
- disk usage
-
diskPercent
public double diskPercent()Percentage of used up disk.- Returns:
- disk usage percent
-
cpuPercent
public double cpuPercent()CPU usage percent.- Returns:
- cpu usage percent
-
leaderNetworkInKBps
public double leaderNetworkInKBps()Inbound traffic from replicas that it's leader of.- Returns:
- leader network inbound
-
followerNetworkInKBps
public double followerNetworkInKBps()Inbound traffic from replicas that it follows.- Returns:
- follower network inbound
-
networkOutKBps
public double networkOutKBps()Outbound network traffic.- Returns:
- network outbound
-
potentialNetworkOutKBps
public double potentialNetworkOutKBps()Potential outbound network traffic.- Returns:
- potential network outbound
-
leaders
public int leaders()Number of replicas that it's a leader of.- Returns:
- leaders
-
replicas
public int replicas()Number of replicas hosted.- Returns:
- replicas
-
getPrintableForm
-
toString
-