Class RoundRobinServerSelector

java.lang.Object
org.apache.druid.server.coordinator.loading.RoundRobinServerSelector

@NotThreadSafe public class RoundRobinServerSelector extends Object
Provides iterators over historicals for a given tier that can load a specified segment.

Once a selector is initialized with a DruidCluster, an iterator returned by getServersInTierToLoadSegment(String, DataSegment) iterates over the historicals in a tier in a round robin fashion. The next invocation of this method picks up where the last iterator had left off.

This class is not thread-safe and must be used from a single thread.

  • Constructor Details

    • RoundRobinServerSelector

      public RoundRobinServerSelector(DruidCluster cluster)
  • Method Details

    • getServersInTierToLoadSegment

      public Iterator<ServerHolder> getServersInTierToLoadSegment(String tier, DataSegment segment)
      Returns an iterator over the servers in this tier which are eligible to load the given segment.