public static class MergePolicy.OneMerge extends Object
Modifier and Type | Field and Description |
---|---|
long |
estimatedMergeBytes
Estimated size in bytes of the merged segment.
|
MergeRateLimiter |
rateLimiter
A private
RateLimiter for this merge, used to rate limit writes and abort. |
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 |
---|---|
SegmentCommitInfo |
getMergeInfo()
Returns the
SegmentCommitInfo for the merged segment,
or null if it hasn't been set yet. |
MergeInfo |
getStoreMergeInfo()
Return
MergeInfo describing this merge. |
void |
mergeFinished()
Called by
IndexWriter after the merge is done and all readers have been closed. |
String |
segString()
Returns a readable description of the current merge
state.
|
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 MergeRateLimiter rateLimiter
RateLimiter
for this merge, used to rate limit writes and abort.public final int totalMaxDoc
public OneMerge(List<SegmentCommitInfo> segments)
segments
- List of SegmentCommitInfo
s
to be merged.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() throws IOException
IOException
public int totalNumDocs() throws IOException
IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.