public class LogDocMergePolicy extends LogMergePolicy
LogMergePolicy
that measures size of a
segment as the number of documents (not taking deletions
into account).MergePolicy.MergeAbortedException, MergePolicy.MergeContext, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge, MergePolicy.OneMergeProgress
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MIN_MERGE_DOCS
Default minimum segment size.
|
calibrateSizeByDeletes, DEFAULT_MAX_MERGE_DOCS, DEFAULT_MERGE_FACTOR, DEFAULT_NO_CFS_RATIO, LEVEL_LOG_SPAN, maxMergeDocs, maxMergeSize, maxMergeSizeForForcedMerge, mergeFactor, minMergeSize
DEFAULT_MAX_CFS_SEGMENT_SIZE, maxCFSSegmentSize, noCFSRatio
Constructor and Description |
---|
LogDocMergePolicy()
Sole constructor, setting all settings to their
defaults.
|
Modifier and Type | Method and Description |
---|---|
int |
getMinMergeDocs()
Get the minimum size for a segment to remain
un-merged.
|
void |
setMinMergeDocs(int minMergeDocs)
Sets the minimum size for the lowest level segments.
|
protected long |
size(SegmentCommitInfo info,
MergePolicy.MergeContext mergeContext)
Return the byte size of the provided
SegmentCommitInfo , pro-rated by percentage of
non-deleted documents is set. |
findForcedDeletesMerges, findForcedMerges, findMerges, getCalibrateSizeByDeletes, getMaxMergeDocs, getMergeFactor, isMerged, setCalibrateSizeByDeletes, setMaxMergeDocs, setMergeFactor, sizeBytes, sizeDocs, toString
assertDelCount, findFullFlushMerges, getMaxCFSSegmentSizeMB, getNoCFSRatio, isMerged, keepFullyDeletedSegment, message, numDeletesToMerge, segString, setMaxCFSSegmentSizeMB, setNoCFSRatio, useCompoundFile, verbose
public static final int DEFAULT_MIN_MERGE_DOCS
public LogDocMergePolicy()
protected long size(SegmentCommitInfo info, MergePolicy.MergeContext mergeContext) throws IOException
MergePolicy
SegmentCommitInfo
, pro-rated by percentage of
non-deleted documents is set.size
in class MergePolicy
IOException
public void setMinMergeDocs(int minMergeDocs)
public int getMinMergeDocs()
setMinMergeDocs(int)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.