Class 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 Detail

      • RoundRobinServerSelector

        public RoundRobinServerSelector​(DruidCluster cluster)
    • Method Detail

      • getServersInTierToLoadSegment

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