java.lang.Object
org.apache.pulsar.policies.data.loadbalancer.LoadReport
All Implemented Interfaces:
LoadManagerReport, ServiceLookupData

public class LoadReport extends Object implements 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 Details

    • loadReportType

      public static final String loadReportType
  • Constructor Details

    • LoadReport

      public LoadReport()
    • LoadReport

      public LoadReport(String webServiceUrl, String webServiceUrlTls, String pulsarServiceUrl, String pulsarServiceUrlTls)
  • Method Details

    • setBundleStats

      public void setBundleStats(Map<String,NamespaceBundleStats> stats)
    • getBundleStats

      public Map<String,NamespaceBundleStats> getBundleStats()
      Specified by:
      getBundleStats in interface LoadManagerReport
    • getName

      public String getName()
    • setName

      public void setName(String brokerName)
    • getSystemResourceUsage

      public SystemResourceUsage getSystemResourceUsage()
    • setSystemResourceUsage

      public void setSystemResourceUsage(SystemResourceUsage systemResourceUsage)
    • isUnderLoaded

      public boolean isUnderLoaded()
    • setUnderLoaded

      public void setUnderLoaded(boolean isUnderLoaded)
    • isOverLoaded

      public boolean isOverLoaded()
    • getBottleneckResourceType

      public SystemResourceUsage.ResourceType getBottleneckResourceType()
    • setOverLoaded

      public void setOverLoaded(boolean isOverLoaded)
    • getTimestamp

      public long getTimestamp()
    • setTimestamp

      public void setTimestamp(long timestamp)
    • getMsgRateIn

      public double getMsgRateIn()
      Specified by:
      getMsgRateIn in interface LoadManagerReport
    • getMsgRateOut

      public double getMsgRateOut()
      Specified by:
      getMsgRateOut in interface LoadManagerReport
    • getLoadReportType

      public String getLoadReportType()
    • getNumTopics

      public int getNumTopics()
      Specified by:
      getNumTopics in interface LoadManagerReport
    • getNumConsumers

      public int getNumConsumers()
      Specified by:
      getNumConsumers in interface LoadManagerReport
    • getNumProducers

      public int getNumProducers()
      Specified by:
      getNumProducers in interface LoadManagerReport
    • getNumBundles

      public int getNumBundles()
      Specified by:
      getNumBundles in interface LoadManagerReport
    • getBundles

      public Set<String> getBundles()
    • getSortedBundleStats

      public TreeMap<String,NamespaceBundleStats> getSortedBundleStats(SystemResourceUsage.ResourceType resType)
    • getBundleGains

      public Set<String> getBundleGains()
    • setBundleGains

      public void setBundleGains(Set<String> bundleGains)
    • getBundleLosses

      public Set<String> getBundleLosses()
    • setBundleLosses

      public void setBundleLosses(Set<String> bundleLosses)
    • 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

      public void setBrokerVersionString(String brokerVersionString)
    • getBrokerVersionString

      public String getBrokerVersionString()
      Specified by:
      getBrokerVersionString in interface LoadManagerReport
    • getWebServiceUrl

      public String getWebServiceUrl()
      Specified by:
      getWebServiceUrl in interface ServiceLookupData
    • getWebServiceUrlTls

      public String getWebServiceUrlTls()
      Specified by:
      getWebServiceUrlTls in interface ServiceLookupData
    • getPulsarServiceUrl

      public String getPulsarServiceUrl()
      Specified by:
      getPulsarServiceUrl in interface ServiceLookupData
    • getPulsarServiceUrlTls

      public String getPulsarServiceUrlTls()
      Specified by:
      getPulsarServiceUrlTls in interface ServiceLookupData
    • isPersistentTopicsEnabled

      public boolean isPersistentTopicsEnabled()
      Specified by:
      isPersistentTopicsEnabled in interface LoadManagerReport
    • setPersistentTopicsEnabled

      public void setPersistentTopicsEnabled(boolean persistentTopicsEnabled)
    • isNonPersistentTopicsEnabled

      public boolean isNonPersistentTopicsEnabled()
      Specified by:
      isNonPersistentTopicsEnabled in interface LoadManagerReport
    • setNonPersistentTopicsEnabled

      public void setNonPersistentTopicsEnabled(boolean nonPersistentTopicsEnabled)
    • getCpu

      public ResourceUsage getCpu()
      Specified by:
      getCpu in interface LoadManagerReport
    • getMemory

      public ResourceUsage getMemory()
      Specified by:
      getMemory in interface LoadManagerReport
    • getDirectMemory

      public ResourceUsage getDirectMemory()
      Specified by:
      getDirectMemory in interface LoadManagerReport
    • getBandwidthIn

      public ResourceUsage getBandwidthIn()
      Specified by:
      getBandwidthIn in interface LoadManagerReport
    • getBandwidthOut

      public ResourceUsage getBandwidthOut()
      Specified by:
      getBandwidthOut in interface LoadManagerReport
    • getLastUpdate

      public long getLastUpdate()
      Specified by:
      getLastUpdate in interface LoadManagerReport
    • getMsgThroughputIn

      public double getMsgThroughputIn()
      Specified by:
      getMsgThroughputIn in interface LoadManagerReport
    • getMsgThroughputOut

      public double getMsgThroughputOut()
      Specified by:
      getMsgThroughputOut in interface LoadManagerReport
    • getProtocols

      public Map<String,String> getProtocols()
      Specified by:
      getProtocols in interface ServiceLookupData
    • setProtocols

      public void setProtocols(Map<String,String> protocols)
    • getProtocol

      public Optional<String> getProtocol(String protocol)
      Specified by:
      getProtocol in interface ServiceLookupData
    • getLoadManagerClassName

      public String getLoadManagerClassName()
      Specified by:
      getLoadManagerClassName in interface ServiceLookupData
    • setLoadManagerClassName

      public void setLoadManagerClassName(String loadManagerClassName)
    • getStartTimestamp

      public long getStartTimestamp()
      Specified by:
      getStartTimestamp in interface ServiceLookupData
    • setStartTimestamp

      public void setStartTimestamp(long startTimestamp)