Class StringPartitionChunk<T>

java.lang.Object
org.apache.druid.timeline.partition.StringPartitionChunk<T>
All Implemented Interfaces:
Comparable<PartitionChunk<T>>, PartitionChunk<T>

public class StringPartitionChunk<T> extends Object implements PartitionChunk<T>
  • Method Details

    • makeForSingleDimension

      public static <T> StringPartitionChunk<T> makeForSingleDimension(String start, String end, int chunkNumber, T obj)
    • make

      public static <T> StringPartitionChunk<T> make(StringTuple start, StringTuple end, int chunkNumber, T obj)
    • getObject

      public T getObject()
      Description copied from interface: PartitionChunk
      Returns the payload, generally an object that can be used to perform some action against the shard.
      Specified by:
      getObject in interface PartitionChunk<T>
      Returns:
      the payload
    • abuts

      public boolean abuts(PartitionChunk<T> chunk)
      Description copied from interface: PartitionChunk
      Determines if this PartitionChunk abuts another PartitionChunk. A sequence of abutting PartitionChunks should start with an object where isStart() == true and eventually end with an object where isEnd() == true.
      Specified by:
      abuts in interface PartitionChunk<T>
      Parameters:
      chunk - input chunk
      Returns:
      true if this chunk abuts the input chunk
    • isStart

      public boolean isStart()
      Description copied from interface: PartitionChunk
      Returns true if this chunk is the beginning of the partition. Most commonly, that means it represents the range [-infinity, X) for some concrete X.
      Specified by:
      isStart in interface PartitionChunk<T>
      Returns:
      true if the chunk is the beginning of the partition
    • isEnd

      public boolean isEnd()
      Description copied from interface: PartitionChunk
      Returns true if this chunk is the end of the partition. Most commonly, that means it represents the range [X, infinity] for some concrete X.
      Specified by:
      isEnd in interface PartitionChunk<T>
      Returns:
      true if the chunk is the end of the partition
    • getChunkNumber

      public int getChunkNumber()
      Description copied from interface: PartitionChunk
      Returns the partition chunk number of this PartitionChunk. I.e. if there are 4 partitions in total and this is the 3rd partition, it will return 2
      Specified by:
      getChunkNumber in interface PartitionChunk<T>
      Returns:
      the sequential numerical id of this partition chunk
    • compareTo

      public int compareTo(PartitionChunk<T> chunk)
      Specified by:
      compareTo in interface Comparable<T>
    • 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