Class NumberedOverwritingPartitionChunk<T>
- java.lang.Object
-
- org.apache.druid.timeline.partition.NumberedOverwritingPartitionChunk<T>
-
- All Implemented Interfaces:
Comparable<PartitionChunk<T>>,PartitionChunk<T>
public class NumberedOverwritingPartitionChunk<T> extends Object implements PartitionChunk<T>
PartitionChunk corresponding toNumberedOverwriteShardSpec
-
-
Constructor Summary
Constructors Constructor Description NumberedOverwritingPartitionChunk(int chunkId, T object)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabuts(PartitionChunk<T> other)Determines if this PartitionChunk abuts another PartitionChunk.intcompareTo(PartitionChunk<T> o)booleanequals(Object o)intgetChunkNumber()Returns the partition chunk number of this PartitionChunk.TgetObject()Returns the payload, generally an object that can be used to perform some action against the shard.inthashCode()booleanisEnd()Returns true if this chunk is the end of the partition.booleanisStart()Returns true if this chunk is the beginning of the partition.StringtoString()
-
-
-
Constructor Detail
-
NumberedOverwritingPartitionChunk
public NumberedOverwritingPartitionChunk(int chunkId, T object)
-
-
Method Detail
-
getObject
public T getObject()
Description copied from interface:PartitionChunkReturns the payload, generally an object that can be used to perform some action against the shard.- Specified by:
getObjectin interfacePartitionChunk<T>- Returns:
- the payload
-
abuts
public boolean abuts(PartitionChunk<T> other)
Description copied from interface:PartitionChunkDetermines 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:
abutsin interfacePartitionChunk<T>- Parameters:
other- input chunk- Returns:
- true if this chunk abuts the input chunk
-
isStart
public boolean isStart()
Description copied from interface:PartitionChunkReturns 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:
isStartin interfacePartitionChunk<T>- Returns:
- true if the chunk is the beginning of the partition
-
isEnd
public boolean isEnd()
Description copied from interface:PartitionChunkReturns 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:
isEndin interfacePartitionChunk<T>- Returns:
- true if the chunk is the end of the partition
-
getChunkNumber
public int getChunkNumber()
Description copied from interface:PartitionChunkReturns 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:
getChunkNumberin interfacePartitionChunk<T>- Returns:
- the sequential numerical id of this partition chunk
-
compareTo
public int compareTo(PartitionChunk<T> o)
- Specified by:
compareToin interfaceComparable<T>
-
-