java.lang.Object
org.apache.pulsar.broker.loadbalance.extensions.models.TopKBundles

public class TopKBundles extends Object
Defines the information of top k highest-loaded bundles.
  • Constructor Details

  • Method Details

    • update

      public void update(Map<String,org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats> bundleStats, int topk)
      Update the topK bundles from the input bundleStats.
      Parameters:
      bundleStats - bundle stats.
      topk - top k bundle stats to select.
    • partitionSort

      public static void partitionSort(List<Map.Entry<String,? extends Comparable>> arr, int k)