Class BucketBalancer

java.lang.Object
io.trino.plugin.raptor.legacy.storage.BucketBalancer

public class BucketBalancer extends Object
Service to balance buckets across active Raptor storage nodes in a cluster.

The objectives of this service are:

  1. For a given distribution, each node should be allocated the same number of buckets for a distribution. This enhances parallelism, and therefore query performance.
  2. The total disk utilization across the cluster should be balanced. This ensures that total cluster storage capacity is maximized. Simply allocating the same number of buckets to every node may not achieve this, as bucket sizes may vary dramatically across distributions.

This prioritizes query performance over total cluster storage capacity, and therefore may produce a cluster state that is imbalanced in terms of disk utilization.

  • Constructor Details

  • Method Details

    • start

      @PostConstruct public void start()
    • shutdown

      @PreDestroy public void shutdown()
    • getBucketsBalanced

      public io.airlift.stats.CounterStat getBucketsBalanced()
    • getJobErrors

      public io.airlift.stats.CounterStat getJobErrors()
    • startBalanceJob

      public void startBalanceJob()