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 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,org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats> stats)
    • getBundleStats

      public Map<String,org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats> getBundleStats()
      Specified by:
      getBundleStats in interface org.apache.pulsar.policies.data.loadbalancer.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 org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getMsgRateOut

      public double getMsgRateOut()
      Specified by:
      getMsgRateOut in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getLoadReportType

      public String getLoadReportType()
    • getNumTopics

      public int getNumTopics()
      Specified by:
      getNumTopics in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getNumConsumers

      public int getNumConsumers()
      Specified by:
      getNumConsumers in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getNumProducers

      public int getNumProducers()
      Specified by:
      getNumProducers in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getNumBundles

      public int getNumBundles()
      Specified by:
      getNumBundles in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getBundles

      public Set<String> getBundles()
    • getSortedBundleStats

      public TreeMap<String,org.apache.pulsar.policies.data.loadbalancer.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 org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getWebServiceUrl

      public String getWebServiceUrl()
      Specified by:
      getWebServiceUrl in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getWebServiceUrlTls

      public String getWebServiceUrlTls()
      Specified by:
      getWebServiceUrlTls in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getPulsarServiceUrl

      public String getPulsarServiceUrl()
      Specified by:
      getPulsarServiceUrl in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getPulsarServiceUrlTls

      public String getPulsarServiceUrlTls()
      Specified by:
      getPulsarServiceUrlTls in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • isPersistentTopicsEnabled

      public boolean isPersistentTopicsEnabled()
      Specified by:
      isPersistentTopicsEnabled in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • setPersistentTopicsEnabled

      public void setPersistentTopicsEnabled(boolean persistentTopicsEnabled)
    • isNonPersistentTopicsEnabled

      public boolean isNonPersistentTopicsEnabled()
      Specified by:
      isNonPersistentTopicsEnabled in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • setNonPersistentTopicsEnabled

      public void setNonPersistentTopicsEnabled(boolean nonPersistentTopicsEnabled)
    • getCpu

      public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getCpu()
      Specified by:
      getCpu in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getMemory

      public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getMemory()
      Specified by:
      getMemory in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getDirectMemory

      public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getDirectMemory()
      Specified by:
      getDirectMemory in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getBandwidthIn

      public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getBandwidthIn()
      Specified by:
      getBandwidthIn in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getBandwidthOut

      public org.apache.pulsar.policies.data.loadbalancer.ResourceUsage getBandwidthOut()
      Specified by:
      getBandwidthOut in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getLastUpdate

      public long getLastUpdate()
      Specified by:
      getLastUpdate in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getMsgThroughputIn

      public double getMsgThroughputIn()
      Specified by:
      getMsgThroughputIn in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getMsgThroughputOut

      public double getMsgThroughputOut()
      Specified by:
      getMsgThroughputOut in interface org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
    • getProtocols

      public Map<String,String> getProtocols()
      Specified by:
      getProtocols in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • setProtocols

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

      public Optional<String> getProtocol(String protocol)
      Specified by:
      getProtocol in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData