Class HashedPartitionsSpec
java.lang.Object
org.apache.druid.indexer.partitions.HashedPartitionsSpec
- All Implemented Interfaces:
DimensionBasedPartitionsSpec,PartitionsSpec
-
Field Summary
FieldsFields inherited from interface org.apache.druid.indexer.partitions.DimensionBasedPartitionsSpec
ASSUME_GROUPED, FORCE_GUARANTEED_ROLLUP_COMPATIBLE, MAX_PARTITION_SIZE, PARTITION_DIMENSIONS, TARGET_PARTITION_SIZE, TARGET_ROWS_PER_SEGMENTFields inherited from interface org.apache.druid.indexer.partitions.PartitionsSpec
DEFAULT_MAX_ROWS_PER_SEGMENT, HISTORICAL_NULL, MAX_ROWS_PER_SEGMENT -
Constructor Summary
ConstructorsConstructorDescriptionHashedPartitionsSpec(Integer maxRowsPerSegment, Integer numShards, List<String> partitionDimensions) HashedPartitionsSpec(Integer maxRowsPerSegment, Integer numShards, List<String> partitionDimensions, HashPartitionFunction partitionFunction) HashedPartitionsSpec(Integer targetRowsPerSegment, Integer numShards, List<String> partitionDimensions, HashPartitionFunction partitionFunction, Integer targetPartitionSize, Integer maxRowsPerSegment) -
Method Summary
Modifier and TypeMethodDescriptionstatic HashedPartitionsSpecbooleanReturns the max number of rows per segment.getType()inthashCode()booleanneedsDeterminePartitions(boolean useForHadoopTask) Returns true if this partitionsSpec needs to determine the number of partitions to start data ingestion.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.druid.indexer.partitions.PartitionsSpec
isForceGuaranteedRollupCompatible, isForceGuaranteedRollupCompatibleType
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
HashedPartitionsSpec
public HashedPartitionsSpec(@Nullable Integer targetRowsPerSegment, @Nullable Integer numShards, @Nullable List<String> partitionDimensions, @Nullable HashPartitionFunction partitionFunction, @Deprecated @Nullable Integer targetPartitionSize, @Deprecated @Nullable Integer maxRowsPerSegment) -
HashedPartitionsSpec
public HashedPartitionsSpec(@Nullable Integer maxRowsPerSegment, @Nullable Integer numShards, @Nullable List<String> partitionDimensions, @Nullable HashPartitionFunction partitionFunction) -
HashedPartitionsSpec
-
-
Method Details
-
defaultSpec
-
getTargetRowsPerSegment
- Specified by:
getTargetRowsPerSegmentin interfaceDimensionBasedPartitionsSpec
-
getType
- Specified by:
getTypein interfacePartitionsSpec
-
getMaxRowsPerSegment
Description copied from interface:PartitionsSpecReturns the max number of rows per segment. Implementations can have different default values which it could be even null. Callers should use the right value depending on the context if this returns null.- Specified by:
getMaxRowsPerSegmentin interfacePartitionsSpec
-
needsDeterminePartitions
public boolean needsDeterminePartitions(boolean useForHadoopTask) Description copied from interface:PartitionsSpecReturns true if this partitionsSpec needs to determine the number of partitions to start data ingestion. It should usually return true if perfect rollup is enforced but number of partitions is not specified.- Specified by:
needsDeterminePartitionsin interfacePartitionsSpec
-
getNumShards
-
getPartitionDimensions
- Specified by:
getPartitionDimensionsin interfaceDimensionBasedPartitionsSpec
-
getPartitionFunction
-
getForceGuaranteedRollupIncompatiblityReason
- Specified by:
getForceGuaranteedRollupIncompatiblityReasonin interfacePartitionsSpec- Returns:
- Message describing why this partitionSpec is incompatible with forceGuaranteedRollup=true. Empty string if the partitionSpec is compatible.
-
equals
-
hashCode
public int hashCode() -
toString
-