public static class MergePolicy.OneMerge extends Object
Modifier and Type | Field and Description |
---|---|
long |
estimatedMergeBytes
Estimated size in bytes of the merged segment.
|
List<SegmentCommitInfo> |
segments
Segments to be merged.
|
int |
totalMaxDoc
Total number of documents in segments to be merged, not accounting for deletions.
|
Constructor and Description |
---|
OneMerge(List<SegmentCommitInfo> segments)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkAborted()
Checks if merge has been aborted and throws a merge exception if so.
|
SegmentCommitInfo |
getMergeInfo()
Returns the
SegmentCommitInfo for the merged segment,
or null if it hasn't been set yet. |
MergePolicy.OneMergeProgress |
getMergeProgress()
Returns a
MergePolicy.OneMergeProgress instance for this merge, which provides
statistics of the merge threads (run time vs. |
MergeInfo |
getStoreMergeInfo()
Return
MergeInfo describing this merge. |
boolean |
isAborted()
Returns true if this merge was or should be aborted.
|
void |
mergeFinished()
Called by
IndexWriter after the merge is done and all readers have been closed. |
void |
mergeInit()
Called by
IndexWriter after the merge started and from the
thread that will be executing the merge. |
String |
segString()
Returns a readable description of the current merge
state.
|
void |
setAborted()
Marks this merge as aborted.
|
void |
setMergeInfo(SegmentCommitInfo info)
Expert: Sets the
SegmentCommitInfo of the merged segment. |
long |
totalBytesSize()
Returns the total size in bytes of this merge.
|
int |
totalNumDocs()
Returns the total number of documents that are included with this merge.
|
CodecReader |
wrapForMerge(CodecReader reader)
Wrap the reader in order to add/remove information to the merged segment.
|
public volatile long estimatedMergeBytes
public final List<SegmentCommitInfo> segments
public final int totalMaxDoc
public OneMerge(List<SegmentCommitInfo> segments)
segments
- List of SegmentCommitInfo
s
to be merged.public void mergeInit() throws IOException
IndexWriter
after the merge started and from the
thread that will be executing the merge.IOException
public void mergeFinished() throws IOException
IndexWriter
after the merge is done and all readers have been closed.IOException
public CodecReader wrapForMerge(CodecReader reader) throws IOException
IOException
public void setMergeInfo(SegmentCommitInfo info)
SegmentCommitInfo
of the merged segment.
Allows sub-classes to e.g. set diagnostics properties.public SegmentCommitInfo getMergeInfo()
SegmentCommitInfo
for the merged segment,
or null if it hasn't been set yet.public String segString()
public long totalBytesSize()
public int totalNumDocs()
public boolean isAborted()
public void setAborted()
public void checkAborted() throws MergePolicy.MergeAbortedException
public MergePolicy.OneMergeProgress getMergeProgress()
MergePolicy.OneMergeProgress
instance for this merge, which provides
statistics of the merge threads (run time vs. sleep time) if merging is throttled.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.