Class NumberedOverwritePartialShardSpec
- java.lang.Object
-
- org.apache.druid.timeline.partition.NumberedOverwritePartialShardSpec
-
- All Implemented Interfaces:
PartialShardSpec
public class NumberedOverwritePartialShardSpec extends Object implements PartialShardSpec
-
-
Constructor Summary
Constructors Constructor Description NumberedOverwritePartialShardSpec(int startRootPartitionId, int endRootPartitionId, int minorVersion)
NumberedOverwritePartialShardSpec(int startRootPartitionId, int endRootPartitionId, short minorVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShardSpec
complete(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int partitionId, int numCorePartitions)
Creates a new ShardSpec with given partitionId and numCorePartitions.int
getEndRootPartitionId()
short
getMinorVersion()
Class<? extends ShardSpec>
getShardSpecClass()
Returns the class of the shardSpec created by this factory.int
getStartRootPartitionId()
boolean
useNonRootGenerationPartitionSpace()
Returns true if this partialShardSpec needs a partitionId of a non-root generation.
-
-
-
Constructor Detail
-
NumberedOverwritePartialShardSpec
public NumberedOverwritePartialShardSpec(int startRootPartitionId, int endRootPartitionId, short minorVersion)
-
NumberedOverwritePartialShardSpec
public NumberedOverwritePartialShardSpec(int startRootPartitionId, int endRootPartitionId, int minorVersion)
-
-
Method Detail
-
getStartRootPartitionId
public int getStartRootPartitionId()
-
getEndRootPartitionId
public int getEndRootPartitionId()
-
getMinorVersion
public short getMinorVersion()
-
complete
public ShardSpec complete(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int partitionId, int numCorePartitions)
Description copied from interface:PartialShardSpec
Creates a new ShardSpec with given partitionId and numCorePartitions.- Specified by:
complete
in interfacePartialShardSpec
- Parameters:
objectMapper
- jsonMapper used only forHashBasedNumberedShardSpec
partitionId
- partitionId of the shardSpec. must be carefully chosen to be unique in a time chunknumCorePartitions
- the core partition set size. Should be set properly to determine if this segment belongs to the core partitions.
-
getShardSpecClass
public Class<? extends ShardSpec> getShardSpecClass()
Description copied from interface:PartialShardSpec
Returns the class of the shardSpec created by this factory.- Specified by:
getShardSpecClass
in interfacePartialShardSpec
-
useNonRootGenerationPartitionSpace
public boolean useNonRootGenerationPartitionSpace()
Description copied from interface:PartialShardSpec
Returns true if this partialShardSpec needs a partitionId of a non-root generation. Any partialShardSpec to overwrite a subset of segments in a time chunk such asNumberedOverwritePartialShardSpec
should return true.- Specified by:
useNonRootGenerationPartitionSpace
in interfacePartialShardSpec
- See Also:
PartitionIds
-
-