class FrozenBufferedUpdates
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.concurrent.CountDownLatch |
applied
Counts down once all deletes/updates have been applied
|
private int |
binaryDVUpdateCount |
(package private) byte[] |
binaryDVUpdates |
(package private) static int |
BYTES_PER_DEL_QUERY |
(package private) int |
bytesUsed |
(package private) Query[] |
deleteQueries |
(package private) int[] |
deleteQueryLimits |
(package private) PrefixCodedTerms |
deleteTerms |
private long |
delGen |
private InfoStream |
infoStream |
private int |
numericDVUpdateCount |
(package private) byte[] |
numericDVUpdates |
(package private) int |
numTermDeletes |
(package private) SegmentCommitInfo |
privateSegment |
long |
totalDelCount
How many total documents were deleted/updated.
|
Constructor and Description |
---|
FrozenBufferedUpdates(InfoStream infoStream,
BufferedUpdates updates,
SegmentCommitInfo privateSegment) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
any() |
(package private) boolean |
anyDeleteTerms() |
private long |
apply(BufferedUpdatesStream.SegmentState[] segStates)
Applies pending delete-by-term, delete-by-query and doc values updates to all segments in the index, returning
the number of new deleted or updated documents.
|
void |
apply(IndexWriter writer)
Translates a frozen packet of delete term/query, or doc values
updates, into their actual docIDs in the index, and applies the change.
|
private long |
applyDocValuesUpdates(BufferedUpdatesStream.SegmentState[] segStates) |
private long |
applyDocValuesUpdates(BufferedUpdatesStream.SegmentState segState,
byte[] updates,
boolean isNumeric) |
private long |
applyQueryDeletes(BufferedUpdatesStream.SegmentState[] segStates) |
private long |
applyTermDeletes(BufferedUpdatesStream.SegmentState[] segStates) |
long |
delGen() |
private void |
finishApply(IndexWriter writer,
BufferedUpdatesStream.SegmentState[] segStates,
boolean success,
java.util.Set<java.lang.String> delFiles) |
private byte[] |
freezeBinaryDVUpdates(java.util.Map<java.lang.String,java.util.LinkedHashMap<Term,DocValuesUpdate.BinaryDocValuesUpdate>> binaryDVUpdates) |
private byte[] |
freezeNumericDVUpdates(java.util.Map<java.lang.String,java.util.LinkedHashMap<Term,DocValuesUpdate.NumericDocValuesUpdate>> numericDVUpdates) |
private java.util.List<SegmentCommitInfo> |
getInfosToApply(IndexWriter writer)
Returns the
SegmentCommitInfo that this packet is supposed to apply its deletes to, or null
if the private segment was already merged away. |
void |
setDelGen(long delGen) |
java.lang.String |
toString() |
static final int BYTES_PER_DEL_QUERY
final PrefixCodedTerms deleteTerms
final Query[] deleteQueries
final int[] deleteQueryLimits
final byte[] numericDVUpdates
final byte[] binaryDVUpdates
private int numericDVUpdateCount
private int binaryDVUpdateCount
public final java.util.concurrent.CountDownLatch applied
public long totalDelCount
final int bytesUsed
final int numTermDeletes
private long delGen
final SegmentCommitInfo privateSegment
private final InfoStream infoStream
public FrozenBufferedUpdates(InfoStream infoStream, BufferedUpdates updates, SegmentCommitInfo privateSegment) throws java.io.IOException
java.io.IOException
private byte[] freezeNumericDVUpdates(java.util.Map<java.lang.String,java.util.LinkedHashMap<Term,DocValuesUpdate.NumericDocValuesUpdate>> numericDVUpdates) throws java.io.IOException
java.io.IOException
private byte[] freezeBinaryDVUpdates(java.util.Map<java.lang.String,java.util.LinkedHashMap<Term,DocValuesUpdate.BinaryDocValuesUpdate>> binaryDVUpdates) throws java.io.IOException
java.io.IOException
private java.util.List<SegmentCommitInfo> getInfosToApply(IndexWriter writer)
SegmentCommitInfo
that this packet is supposed to apply its deletes to, or null
if the private segment was already merged away.public void apply(IndexWriter writer) throws java.io.IOException
java.io.IOException
private void finishApply(IndexWriter writer, BufferedUpdatesStream.SegmentState[] segStates, boolean success, java.util.Set<java.lang.String> delFiles) throws java.io.IOException
java.io.IOException
private long apply(BufferedUpdatesStream.SegmentState[] segStates) throws java.io.IOException
java.io.IOException
private long applyDocValuesUpdates(BufferedUpdatesStream.SegmentState[] segStates) throws java.io.IOException
java.io.IOException
private long applyDocValuesUpdates(BufferedUpdatesStream.SegmentState segState, byte[] updates, boolean isNumeric) throws java.io.IOException
java.io.IOException
private long applyQueryDeletes(BufferedUpdatesStream.SegmentState[] segStates) throws java.io.IOException
java.io.IOException
private long applyTermDeletes(BufferedUpdatesStream.SegmentState[] segStates) throws java.io.IOException
java.io.IOException
public void setDelGen(long delGen)
public long delGen()
public java.lang.String toString()
toString
in class java.lang.Object
boolean any()
boolean anyDeleteTerms()