Enum Class LuceneSliceQueue.PartitioningStrategy
- All Implemented Interfaces:
Serializable,Comparable<LuceneSliceQueue.PartitioningStrategy>,Constable,Writeable
- Enclosing class:
LuceneSliceQueue
DataPartitioning
for descriptions on how each value works.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionreadFrom(StreamInput in) Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.voidwriteTo(StreamOutput out)
-
Enum Constant Details
-
SHARD
-
SEGMENT
SeeDataPartitioning.SEGMENT.Segments are never split — each leaf stays whole. Small segments are bin-packed together so that each slice carries at least
LuceneSliceQueue.MIN_DOCS_PER_SLICEdocs (or its fair share,totalDocs / taskConcurrency, whichever is larger). The total slice count is capped attaskConcurrency. This delegates toContextIndexSearcher.computeSlices(java.util.List<org.apache.lucene.index.LeafReaderContext>, int, int), which is the same algorithm the regular_searchAPI uses — so the SEGMENT floor matches the DOC floor. -
DOC
SeeDataPartitioning.DOC.Aims for
taskConcurrencyslices:desiredSliceSize=clamp(totalDocs / taskConcurrency, minDocsPerSlice, MAX_DOCS_PER_SLICE).minDocsPerSlicedefaults toLuceneSliceQueue.MIN_DOCS_PER_SLICEbut may be lowered per query (via themin_docs_per_slicepragma) so small-index tests can still exercise multi-slice partitioning.maxSegmentsPerSlicescales withtotalSegments / taskConcurrency(with aLuceneSliceQueue.MAX_SEGMENTS_PER_SLICEfloor) so that a heavily fragmented index doesn't force a slice count well above the chosen parallelism.When the largest unguarded segment is within ~1.5× of
desiredSliceSize, every non-guarded leaf can be kept whole; we then balance leaves acrosstaskConcurrencyslices via worst-fit-decreasing bin packing (preserving segment boundaries) instead of splitting segments throughLuceneSliceQueue.AdaptivePartitioner.If the supplied
LuceneSliceQueue.LeafSplitGuardmarks a leaf as "keep whole" for the suppliedWeight(e.g.LuceneCountOperator'sWeight.count(LeafReaderContext)shortcut), that leaf is emitted as a single full-leaf slice and skipped by both the splitter and the bin-packer. -
TIME_SERIES
Partition using the prefix of tsid
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
readFrom
- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-