Class ClusterByPartitions

java.lang.Object
org.apache.druid.frame.key.ClusterByPartitions
All Implemented Interfaces:
Iterable<ClusterByPartition>

public class ClusterByPartitions extends Object implements Iterable<ClusterByPartition>
Holder object for a set of ClusterByPartition. There are no preconditions put upon the partitions, except that there is at least one of them. In particular, they are not required to abut each other or to be non-overlapping. Use allAbutting() to check if this particular list of partitions is in fact all abutting (and, therefore, also non-overlapping).
  • Constructor Details

  • Method Details

    • oneUniversalPartition

      public static ClusterByPartitions oneUniversalPartition()
    • allAbutting

      public boolean allAbutting()
      Whether this list of partitions is all abutting, meaning: each partition's start is equal to the previous partition's end. Note that the start of the first partition, and the end of the last partition, may or may not be unbounded. So this list of partitions may not cover the entire space even if they are all abutting.
    • get

      public ClusterByPartition get(int i)
    • size

      public int size()
    • ranges

      public List<ClusterByPartition> ranges()
    • iterator

      public Iterator<ClusterByPartition> iterator()
      Specified by:
      iterator in interface Iterable<ClusterByPartition>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object