Package org.elasticsearch.index.engine
Class NoOpEngine
java.lang.Object
org.elasticsearch.index.engine.Engine
org.elasticsearch.index.engine.ReadOnlyEngine
org.elasticsearch.index.engine.NoOpEngine
- All Implemented Interfaces:
Closeable
,AutoCloseable
NoOpEngine is an engine implementation that does nothing but the bare minimum
required in order to have an engine. All attempts to do something (search,
index, get), throw
UnsupportedOperationException
. However, NoOpEngine
allows to trim any existing translog files through the usage of the
{trimUnreferencedTranslogFiles()
} method.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.engine.Engine
Engine.CommitId, Engine.Delete, Engine.DeleteResult, Engine.EventListener, Engine.Get, Engine.GetResult, Engine.HistorySource, Engine.Index, Engine.IndexCommitRef, Engine.IndexResult, Engine.IndexThrottle, Engine.NoOp, Engine.NoOpLock, Engine.NoOpResult, Engine.Operation, Engine.Result, Engine.Searcher, Engine.SearcherScope, Engine.SearcherSupplier, Engine.SyncedFlushResult, Engine.TranslogRecoveryRunner, Engine.Warmer
-
Field Summary
Fields inherited from class org.elasticsearch.index.engine.ReadOnlyEngine
FIELD_RANGE_SEARCH_SOURCE, translogStats
Fields inherited from class org.elasticsearch.index.engine.Engine
CAN_MATCH_SEARCH_SOURCE, DOC_STATS_SOURCE, engineConfig, ES_VERSION, eventListener, failedEngine, failEngineLock, FORCE_MERGE_UUID_KEY, HISTORY_UUID_KEY, isClosed, lastWriteNanos, logger, MAX_UNSAFE_AUTO_ID_TIMESTAMP_COMMIT_ID, MIN_RETAINED_SEQNO, readLock, rwl, SEARCH_SOURCE, shardId, store, SYNC_COMMIT_ID, writeLock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondocStats()
Returns theDocsStats
for this engineprotected org.apache.lucene.index.DirectoryReader
open
(org.apache.lucene.index.IndexCommit commit) segmentsStats
(boolean includeSegmentFileSizes, boolean includeUnloadedSegments) Global stats on segments.void
This implementation will trim existing translog files using aTranslogDeletionPolicy
that retains nothing but the last translog generation from safe commit.Methods inherited from class org.elasticsearch.index.engine.ReadOnlyEngine
acquireHistoryRetentionLock, acquireLastIndexCommit, acquireSafeIndexCommit, acquireSearcherSupplier, activateThrottling, advanceMaxSeqNoOfUpdatesOrDeletes, assertMaxSeqNoEqualsToGlobalCheckpoint, closeNoLock, completionStats, deactivateThrottling, delete, ensureMaxSeqNoEqualsToGlobalCheckpoint, ensureTranslogSynced, estimateNumberOfHistoryOperations, fillSeqNoGaps, flush, forceMerge, get, getCommitId, getHistoryUUID, getIndexBufferRAMBytesUsed, getIndexThrottleTimeInMillis, getLastCommittedSegmentInfos, getLastSyncedGlobalCheckpoint, getMaxSeqNo, getMaxSeqNoOfUpdatesOrDeletes, getMinRetainedSeqNo, getPersistedLocalCheckpoint, getProcessedLocalCheckpoint, getRawFieldRange, getReferenceManager, getSafeCommitInfo, getSeqNoStats, getTranslogLastWriteLocation, getTranslogStats, getWritingBytes, hasCompleteOperationHistory, index, isThrottled, isTranslogSyncNeeded, maybePruneDeletes, maybeRefresh, newChangesSnapshot, noOp, openDirectory, processReader, readHistoryOperations, recoverFromTranslog, refresh, refreshNeeded, restoreLocalHistoryFromTranslog, rollTranslogGeneration, segments, shouldPeriodicallyFlush, shouldRollTranslogGeneration, skipTranslogRecovery, syncFlush, syncTranslog, trimOperationsFromTranslog, updateMaxUnsafeAutoIdTimestamp, verifyEngineBeforeIndexClosing, wrapReader, writeIndexingBuffer
Methods inherited from class org.elasticsearch.index.engine.Engine
acquireIndexCommitForSnapshot, acquireSearcher, acquireSearcher, acquireSearcher, acquireSearcherSupplier, close, commitStats, config, docsStats, ensureOpen, ensureOpen, failEngine, fillSegmentStats, flush, flushAndClose, getEngineConfig, getFromSearcher, getLastWriteNanos, getMaxSeenAutoIdTimestamp, getMergeStats, guardedRamBytesUsed, maybeFailEngine, onSettingsChanged, writerSegmentStats
-
Constructor Details
-
NoOpEngine
-
-
Method Details
-
open
protected org.apache.lucene.index.DirectoryReader open(org.apache.lucene.index.IndexCommit commit) throws IOException - Overrides:
open
in classReadOnlyEngine
- Throws:
IOException
-
segmentsStats
public SegmentsStats segmentsStats(boolean includeSegmentFileSizes, boolean includeUnloadedSegments) Description copied from class:Engine
Global stats on segments.- Overrides:
segmentsStats
in classEngine
-
docStats
Description copied from class:Engine
Returns theDocsStats
for this engine -
trimUnreferencedTranslogFiles
public void trimUnreferencedTranslogFiles()This implementation will trim existing translog files using aTranslogDeletionPolicy
that retains nothing but the last translog generation from safe commit.- Overrides:
trimUnreferencedTranslogFiles
in classReadOnlyEngine
-