public abstract class PrimaryNode extends Node
Modifier and Type | Field and Description |
---|---|
protected long |
primaryGen |
protected IndexWriter |
writer |
dir, globalStartNS, id, lastFileMetaData, localStartNS, mgr, PRIMARY_GEN_KEY, printStream, searcherFactory, VERBOSE_CONNECTIONS, VERBOSE_FILES, VERSION_KEY
Constructor and Description |
---|
PrimaryNode(IndexWriter writer,
int id,
long primaryGen,
long forcePrimaryVersion,
SearcherFactory searcherFactory,
java.io.PrintStream printStream) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
commit() |
boolean |
flushAndRefresh()
Flush all index operations to disk and opens a new near-real-time reader.
|
CopyState |
getCopyState()
IncRef the current CopyState and return it
|
long |
getCopyStateVersion() |
long |
getLastCommitVersion() |
long |
getPrimaryGen()
Returns the current primary generation, which is incremented each time a new primary is started for this index
|
boolean |
isClosed() |
protected abstract void |
preCopyMergedSegmentFiles(SegmentCommitInfo info,
java.util.Map<java.lang.String,FileMetaData> files)
Called when a merge has finished, but before IW switches to the merged segment
|
void |
releaseCopyState(CopyState copyState)
Called once replica is done (or failed) copying an NRT point
|
bytesToString, getCurrentSearchingVersion, getDirectory, getSearcherManager, message, name, nodeMessage, nodeMessage, readLocalFileMetaData, toString
protected final IndexWriter writer
protected final long primaryGen
public PrimaryNode(IndexWriter writer, int id, long primaryGen, long forcePrimaryVersion, SearcherFactory searcherFactory, java.io.PrintStream printStream) throws java.io.IOException
java.io.IOException
public long getPrimaryGen()
public boolean flushAndRefresh() throws java.io.IOException
java.io.IOException
public long getCopyStateVersion()
public long getLastCommitVersion()
public void commit() throws java.io.IOException
public CopyState getCopyState() throws java.io.IOException
java.io.IOException
public void releaseCopyState(CopyState copyState) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
protected abstract void preCopyMergedSegmentFiles(SegmentCommitInfo info, java.util.Map<java.lang.String,FileMetaData> files) throws java.io.IOException
java.io.IOException
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.