public final class ShadowIndexShard extends IndexShard
IndexShard to add file synchronization
from the primary when a flush happens. It also ensures that a replica being
promoted to a primary causes the shard to fail, kicking off a re-allocation
of the primary shard.currentEngineReference, engineFactory, INDEX_FLUSH_ON_CLOSE, INDEX_REFRESH_INTERVAL, shardRouting, statedeprecationLogger, indexSettings, logger, shardId| Constructor and Description |
|---|
ShadowIndexShard(ShardId shardId,
IndexSettingsService indexSettingsService,
IndicesLifecycle indicesLifecycle,
Store store,
StoreRecoveryService storeRecoveryService,
ThreadPool threadPool,
MapperService mapperService,
IndexQueryParserService queryParserService,
IndexCache indexCache,
IndexAliasesService indexAliasesService,
IndicesQueryCache indicesQueryCache,
ShardPercolateService shardPercolateService,
CodecService codecService,
ShardTermVectorsService termVectorsService,
IndexFieldDataService indexFieldDataService,
IndexService indexService,
IndicesWarmer warmer,
SnapshotDeletionPolicy deletionPolicy,
SimilarityService similarityService,
EngineFactory factory,
ClusterService clusterService,
ShardPath path,
BigArrays bigArrays,
IndexSearcherWrappingService wrappingService,
IndexingMemoryController indexingMemoryController) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsPrimaryPromotion()
Returns
true iff this shard allows primary promotion, otherwise false |
boolean |
canIndex()
returns true if this shard supports indexing (i.e., write) operations.
|
MergeStats |
mergeStats() |
protected Engine |
newEngine(boolean skipInitialTranslogRecovery,
EngineConfig config) |
TranslogStats |
translogStats() |
void |
updateRoutingEntry(ShardRouting newRouting,
boolean persistState)
In addition to the regular accounting done in
IndexShard.updateRoutingEntry(org.elasticsearch.cluster.routing.ShardRouting, boolean),
if this shadow replica needs to be promoted to a primary, the shard is
failed in order to allow a new primary to be re-allocated. |
acquireSearcher, addFailedEngineListener, checkIdle, close, commitStats, completionStats, create, decrementOperationCounter, delete, deleteShardState, docStats, engine, engineUnsafe, failShard, fieldData, fieldDataStats, finalizeRecovery, flush, flushStats, forceMerge, get, getActive, getIndexingBufferSize, getOperationsCount, getQueryCachingPolicy, getService, getStats, getSuggestMetric, getTranslogDurability, ignoreRecoveryAttempt, incrementOperationCounter, index, indexFieldDataService, indexingService, indexingStats, indexService, isFlushOnClose, mapperService, minimumCompatibleVersion, percolateRegistry, performBatchRecovery, performRecoveryRestart, performTranslogRecovery, postRecovery, prepareCreateOnPrimary, prepareCreateOnReplica, prepareDeleteOnPrimary, prepareDeleteOnReplica, prepareForIndexRecovery, prepareIndexOnPrimary, prepareIndexOnReplica, queryCacheStats, readAllowed, recoverFromStore, recovering, recovering, recoveryState, recoveryStats, refresh, refreshStats, relocated, requestCache, routingEntry, searchService, searchStats, segmentStats, shardBitsetFilterCache, shardPath, shardPercolateService, skipTranslogRecovery, snapshotIndex, state, store, storeStats, suggestStats, sync, syncFlush, termVectorsService, updateBufferSize, upgrade, verifyStarted, verifyStartedOrRecovering, warmerService, warmerStatsindexSettings, nodeName, shardId@Inject public ShadowIndexShard(ShardId shardId, IndexSettingsService indexSettingsService, IndicesLifecycle indicesLifecycle, Store store, StoreRecoveryService storeRecoveryService, ThreadPool threadPool, MapperService mapperService, IndexQueryParserService queryParserService, IndexCache indexCache, IndexAliasesService indexAliasesService, IndicesQueryCache indicesQueryCache, ShardPercolateService shardPercolateService, CodecService codecService, ShardTermVectorsService termVectorsService, IndexFieldDataService indexFieldDataService, IndexService indexService, @Nullable IndicesWarmer warmer, SnapshotDeletionPolicy deletionPolicy, SimilarityService similarityService, EngineFactory factory, ClusterService clusterService, ShardPath path, BigArrays bigArrays, IndexSearcherWrappingService wrappingService, IndexingMemoryController indexingMemoryController) throws IOException
IOExceptionpublic void updateRoutingEntry(ShardRouting newRouting, boolean persistState)
IndexShard.updateRoutingEntry(org.elasticsearch.cluster.routing.ShardRouting, boolean),
if this shadow replica needs to be promoted to a primary, the shard is
failed in order to allow a new primary to be re-allocated.updateRoutingEntry in class IndexShardpublic MergeStats mergeStats()
mergeStats in class IndexShardpublic boolean canIndex()
IndexShardcanIndex in class IndexShardprotected Engine newEngine(boolean skipInitialTranslogRecovery, EngineConfig config)
newEngine in class IndexShardpublic boolean allowsPrimaryPromotion()
IndexShardtrue iff this shard allows primary promotion, otherwise falseallowsPrimaryPromotion in class IndexShardpublic TranslogStats translogStats()
translogStats in class IndexShardCopyright © 2009–2017. All rights reserved.