Class SingleDimensionPartitionsSpec
- java.lang.Object
-
- org.apache.druid.indexer.partitions.DimensionRangePartitionsSpec
-
- org.apache.druid.indexer.partitions.SingleDimensionPartitionsSpec
-
- All Implemented Interfaces:
DimensionBasedPartitionsSpec
,PartitionsSpec
public class SingleDimensionPartitionsSpec extends DimensionRangePartitionsSpec
Partition a segment by a single dimension.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
-
Fields 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_SEGMENT
-
Fields inherited from interface org.apache.druid.indexer.partitions.PartitionsSpec
DEFAULT_MAX_ROWS_PER_SEGMENT, HISTORICAL_NULL, MAX_ROWS_PER_SEGMENT
-
-
Constructor Summary
Constructors Constructor Description SingleDimensionPartitionsSpec(Integer targetRowsPerSegment, Integer maxRowsPerSegment, String partitionDimension, boolean assumeGrouped)
SingleDimensionPartitionsSpec(Integer targetRowsPerSegment, Integer maxRowsPerSegment, String partitionDimension, boolean assumeGrouped, Integer targetPartitionSize, Integer maxPartitionSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getForceGuaranteedRollupIncompatiblityReason()
String
getPartitionDimension()
Map<String,Object>
getSerializableObject()
Returns a Map to be used for serializing objects of this class.int
hashCode()
String
toString()
-
Methods inherited from class org.apache.druid.indexer.partitions.DimensionRangePartitionsSpec
getMaxRowsPerSegment, getMaxRowsPerSegmentForJson, getPartitionDimensions, getTargetRowsPerSegment, getType, isAssumeGrouped, needsDeterminePartitions
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.druid.indexer.partitions.PartitionsSpec
isForceGuaranteedRollupCompatible, isForceGuaranteedRollupCompatibleType
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SingleDimensionPartitionsSpec
public SingleDimensionPartitionsSpec(@Nullable Integer targetRowsPerSegment, @Nullable Integer maxRowsPerSegment, @Nullable String partitionDimension, boolean assumeGrouped, @Deprecated @Nullable Integer targetPartitionSize, @Deprecated @Nullable Integer maxPartitionSize)
-
-
Method Detail
-
getSerializableObject
public Map<String,Object> getSerializableObject()
Returns a Map to be used for serializing objects of this class. This is to ensure that a new field added inDimensionRangePartitionsSpec
does not get serialized when serializing aSingleDimensionPartitionsSpec
.- Returns:
- A map containing only the keys
"partitionDimension"
,"targetRowsPerSegment"
,"maxRowsPerSegments"
and"assumeGrouped"
.
-
getForceGuaranteedRollupIncompatiblityReason
public String getForceGuaranteedRollupIncompatiblityReason()
- Specified by:
getForceGuaranteedRollupIncompatiblityReason
in interfacePartitionsSpec
- Overrides:
getForceGuaranteedRollupIncompatiblityReason
in classDimensionRangePartitionsSpec
- Returns:
- Message describing why this partitionSpec is incompatible with forceGuaranteedRollup=true. Empty string if the partitionSpec is compatible.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classDimensionRangePartitionsSpec
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDimensionRangePartitionsSpec
-
toString
public String toString()
- Overrides:
toString
in classDimensionRangePartitionsSpec
-
-