Class DynamicPartitionsSpec
java.lang.Object
org.apache.druid.indexer.partitions.DynamicPartitionsSpec
- All Implemented Interfaces:
PartitionsSpec
Dynamically determine partitions in the middle of indexing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final longDefault maxTotalRows for most task types except compaction task.Fields inherited from interface org.apache.druid.indexer.partitions.PartitionsSpec
DEFAULT_MAX_ROWS_PER_SEGMENT, HISTORICAL_NULL, MAX_ROWS_PER_SEGMENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the max number of rows per segment.longgetMaxTotalRowsOr(long defaultMaxTotalRows) Get the given maxTotalRows or the default.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
-
DEFAULT_MAX_TOTAL_ROWS
public static final long DEFAULT_MAX_TOTAL_ROWSDefault maxTotalRows for most task types except compaction task.- See Also:
-
DEFAULT_COMPACTION_MAX_TOTAL_ROWS
public static final long DEFAULT_COMPACTION_MAX_TOTAL_ROWS- See Also:
-
-
Constructor Details
-
DynamicPartitionsSpec
-
-
Method Details
-
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
-
getMaxTotalRows
-
getMaxTotalRowsOr
public long getMaxTotalRowsOr(long defaultMaxTotalRows) Get the given maxTotalRows or the default. The default can be different depending on the caller. -
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
-
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
-