Class NumberedOverwritePartialShardSpec
java.lang.Object
org.apache.druid.timeline.partition.NumberedOverwritePartialShardSpec
- All Implemented Interfaces:
PartialShardSpec
-
Constructor Summary
ConstructorsConstructorDescriptionNumberedOverwritePartialShardSpec(int startRootPartitionId, int endRootPartitionId, int minorVersion) NumberedOverwritePartialShardSpec(int startRootPartitionId, int endRootPartitionId, short minorVersion) -
Method Summary
Modifier and TypeMethodDescriptioncomplete(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int partitionId, int numCorePartitions) Creates a new ShardSpec with given partitionId and numCorePartitions.intshortReturns the class of the shardSpec created by this factory.intbooleanReturns true if this partialShardSpec needs a partitionId of a non-root generation.
-
Constructor Details
-
NumberedOverwritePartialShardSpec
public NumberedOverwritePartialShardSpec(int startRootPartitionId, int endRootPartitionId, short minorVersion) -
NumberedOverwritePartialShardSpec
public NumberedOverwritePartialShardSpec(int startRootPartitionId, int endRootPartitionId, int minorVersion)
-
-
Method Details
-
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:PartialShardSpecCreates a new ShardSpec with given partitionId and numCorePartitions.- Specified by:
completein interfacePartialShardSpec- Parameters:
objectMapper- jsonMapper used only forHashBasedNumberedShardSpecpartitionId- 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
Description copied from interface:PartialShardSpecReturns the class of the shardSpec created by this factory.- Specified by:
getShardSpecClassin interfacePartialShardSpec
-
useNonRootGenerationPartitionSpace
public boolean useNonRootGenerationPartitionSpace()Description copied from interface:PartialShardSpecReturns 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 asNumberedOverwritePartialShardSpecshould return true.- Specified by:
useNonRootGenerationPartitionSpacein interfacePartialShardSpec- See Also:
-