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, translogStatsFields inherited from class org.elasticsearch.index.engine.Engine
CAN_MATCH_SEARCH_SOURCE, DOC_STATS_SOURCE, engineConfig, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondocStats()Returns theDocsStatsfor this engineprotected org.apache.lucene.index.DirectoryReaderopen(org.apache.lucene.index.IndexCommit commit)segmentsStats(boolean includeSegmentFileSizes, boolean includeUnloadedSegments)Global stats on segments.voidThis implementation will trim existing translog files using aTranslogDeletionPolicythat 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, getMaxSeqNoOfUpdatesOrDeletes, getMinRetainedSeqNo, getPersistedLocalCheckpoint, 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, writeIndexingBufferMethods 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:
openin classReadOnlyEngine- Throws:
IOException
-
segmentsStats
public SegmentsStats segmentsStats(boolean includeSegmentFileSizes, boolean includeUnloadedSegments)Description copied from class:EngineGlobal stats on segments.- Overrides:
segmentsStatsin classEngine
-
docStats
Description copied from class:EngineReturns theDocsStatsfor this engine -
trimUnreferencedTranslogFiles
public void trimUnreferencedTranslogFiles()This implementation will trim existing translog files using aTranslogDeletionPolicythat retains nothing but the last translog generation from safe commit.- Overrides:
trimUnreferencedTranslogFilesin classReadOnlyEngine
-