Class LoadReport
java.lang.Object
org.apache.pulsar.policies.data.loadbalancer.LoadReport
- All Implemented Interfaces:
org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport,org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
public class LoadReport
extends Object
implements org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
This class represents the overall load of the broker - it includes overall
SystemResourceUsage and
NamespaceUsage for all the namespaces hosted by this broker.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLoadReport(String webServiceUrl, String webServiceUrlTls, String pulsarServiceUrl, String pulsarServiceUrlTls) -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoubledoubledoubleorg.apache.pulsar.policies.data.loadbalancer.ResourceUsageorg.apache.pulsar.policies.data.loadbalancer.ResourceUsageorg.apache.pulsar.policies.data.loadbalancer.ResourceUsagegetCpu()org.apache.pulsar.policies.data.loadbalancer.ResourceUsagelongorg.apache.pulsar.policies.data.loadbalancer.ResourceUsagedoubledoubledoubledoublegetName()intintintintdoubledoubledoubledoubledoubledoublegetProtocol(String protocol) longbooleanbooleanbooleanbooleanvoidsetAllocatedBandwidthIn(double allocatedBandwidthIn) voidsetAllocatedBandwidthOut(double allocatedBandwidthOut) voidsetAllocatedCPU(double allocatedCPU) voidsetAllocatedMemory(double allocatedMemory) voidsetAllocatedMsgRateIn(double allocatedMsgRateIn) voidsetAllocatedMsgRateOut(double allocatedMsgRateOut) voidsetBrokerVersionString(String brokerVersionString) voidsetBundleGains(Set<String> bundleGains) voidsetBundleLosses(Set<String> bundleLosses) voidsetBundleStats(Map<String, org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats> stats) voidvoidsetNonPersistentTopicsEnabled(boolean nonPersistentTopicsEnabled) voidsetOverLoaded(boolean isOverLoaded) voidsetPersistentTopicsEnabled(boolean persistentTopicsEnabled) voidsetPreAllocatedBandwidthIn(double preAllocatedBandwidthIn) voidsetPreAllocatedBandwidthOut(double preAllocatedBandwidthOut) voidsetPreAllocatedCPU(double preAllocatedCPU) voidsetPreAllocatedMemory(double preAllocatedMemory) voidsetPreAllocatedMsgRateIn(double preAllocatedMsgRateIn) voidsetPreAllocatedMsgRateOut(double preAllocatedMsgRateOut) voidsetProtocols(Map<String, String> protocols) voidsetSystemResourceUsage(SystemResourceUsage systemResourceUsage) voidsetTimestamp(long timestamp) voidsetUnderLoaded(boolean isUnderLoaded)
-
Field Details
-
loadReportType
-
-
Constructor Details
-
LoadReport
public LoadReport() -
LoadReport
-
-
Method Details
-
setBundleStats
-
getBundleStats
public Map<String,org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats> getBundleStats()- Specified by:
getBundleStatsin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getName
-
setName
-
getSystemResourceUsage
-
setSystemResourceUsage
-
isUnderLoaded
public boolean isUnderLoaded() -
setUnderLoaded
public void setUnderLoaded(boolean isUnderLoaded) -
isOverLoaded
public boolean isOverLoaded() -
getBottleneckResourceType
-
setOverLoaded
public void setOverLoaded(boolean isOverLoaded) -
getTimestamp
public long getTimestamp() -
setTimestamp
public void setTimestamp(long timestamp) -
getMsgRateIn
public double getMsgRateIn()- Specified by:
getMsgRateInin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getMsgRateOut
public double getMsgRateOut()- Specified by:
getMsgRateOutin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getLoadReportType
-
getNumTopics
public int getNumTopics()- Specified by:
getNumTopicsin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getNumConsumers
public int getNumConsumers()- Specified by:
getNumConsumersin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getNumProducers
public int getNumProducers()- Specified by:
getNumProducersin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getNumBundles
public int getNumBundles()- Specified by:
getNumBundlesin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getBundles
-
getSortedBundleStats
public TreeMap<String,org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats> getSortedBundleStats(SystemResourceUsage.ResourceType resType) -
getBundleGains
-
setBundleGains
-
getBundleLosses
-
setBundleLosses
-
getAllocatedCPU
public double getAllocatedCPU() -
setAllocatedCPU
public void setAllocatedCPU(double allocatedCPU) -
getAllocatedMemory
public double getAllocatedMemory() -
setAllocatedMemory
public void setAllocatedMemory(double allocatedMemory) -
getAllocatedBandwidthIn
public double getAllocatedBandwidthIn() -
setAllocatedBandwidthIn
public void setAllocatedBandwidthIn(double allocatedBandwidthIn) -
getAllocatedBandwidthOut
public double getAllocatedBandwidthOut() -
setAllocatedBandwidthOut
public void setAllocatedBandwidthOut(double allocatedBandwidthOut) -
getAllocatedMsgRateIn
public double getAllocatedMsgRateIn() -
setAllocatedMsgRateIn
public void setAllocatedMsgRateIn(double allocatedMsgRateIn) -
getAllocatedMsgRateOut
public double getAllocatedMsgRateOut() -
setAllocatedMsgRateOut
public void setAllocatedMsgRateOut(double allocatedMsgRateOut) -
getPreAllocatedCPU
public double getPreAllocatedCPU() -
setPreAllocatedCPU
public void setPreAllocatedCPU(double preAllocatedCPU) -
getPreAllocatedMemory
public double getPreAllocatedMemory() -
setPreAllocatedMemory
public void setPreAllocatedMemory(double preAllocatedMemory) -
getPreAllocatedBandwidthIn
public double getPreAllocatedBandwidthIn() -
setPreAllocatedBandwidthIn
public void setPreAllocatedBandwidthIn(double preAllocatedBandwidthIn) -
getPreAllocatedBandwidthOut
public double getPreAllocatedBandwidthOut() -
setPreAllocatedBandwidthOut
public void setPreAllocatedBandwidthOut(double preAllocatedBandwidthOut) -
getPreAllocatedMsgRateIn
public double getPreAllocatedMsgRateIn() -
setPreAllocatedMsgRateIn
public void setPreAllocatedMsgRateIn(double preAllocatedMsgRateIn) -
getPreAllocatedMsgRateOut
public double getPreAllocatedMsgRateOut() -
setPreAllocatedMsgRateOut
public void setPreAllocatedMsgRateOut(double preAllocatedMsgRateOut) -
setBrokerVersionString
-
getBrokerVersionString
- Specified by:
getBrokerVersionStringin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getWebServiceUrl
- Specified by:
getWebServiceUrlin interfaceorg.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
-
getWebServiceUrlTls
- Specified by:
getWebServiceUrlTlsin interfaceorg.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
-
getPulsarServiceUrl
- Specified by:
getPulsarServiceUrlin interfaceorg.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
-
getPulsarServiceUrlTls
- Specified by:
getPulsarServiceUrlTlsin interfaceorg.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
-
isPersistentTopicsEnabled
public boolean isPersistentTopicsEnabled()- Specified by:
isPersistentTopicsEnabledin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
setPersistentTopicsEnabled
public void setPersistentTopicsEnabled(boolean persistentTopicsEnabled) -
isNonPersistentTopicsEnabled
public boolean isNonPersistentTopicsEnabled()- Specified by:
isNonPersistentTopicsEnabledin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
setNonPersistentTopicsEnabled
public void setNonPersistentTopicsEnabled(boolean nonPersistentTopicsEnabled) -
getCpu
public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getCpu()- Specified by:
getCpuin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getMemory
public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getMemory()- Specified by:
getMemoryin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getDirectMemory
public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getDirectMemory()- Specified by:
getDirectMemoryin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getBandwidthIn
public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getBandwidthIn()- Specified by:
getBandwidthInin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getBandwidthOut
public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getBandwidthOut()- Specified by:
getBandwidthOutin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getLastUpdate
public long getLastUpdate()- Specified by:
getLastUpdatein interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getMsgThroughputIn
public double getMsgThroughputIn()- Specified by:
getMsgThroughputInin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getMsgThroughputOut
public double getMsgThroughputOut()- Specified by:
getMsgThroughputOutin interfaceorg.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
-
getProtocols
- Specified by:
getProtocolsin interfaceorg.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
-
setProtocols
-
getProtocol
- Specified by:
getProtocolin interfaceorg.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
-