Package org.apache.druid.frame.key
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 ofClusterByPartition
. 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. UseallAbutting()
to check if this particular list of partitions is in fact all abutting (and, therefore, also non-overlapping).
-
-
Constructor Summary
Constructors Constructor Description ClusterByPartitions(List<ClusterByPartition> ranges)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allAbutting()
Whether this list of partitions is all abutting, meaning: each partition's start is equal to the previous partition's end.boolean
equals(Object o)
ClusterByPartition
get(int i)
int
hashCode()
Iterator<ClusterByPartition>
iterator()
static ClusterByPartitions
oneUniversalPartition()
List<ClusterByPartition>
ranges()
int
size()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ClusterByPartitions
public ClusterByPartitions(List<ClusterByPartition> ranges)
-
-
Method Detail
-
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 interfaceIterable<ClusterByPartition>
-
-