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.config, currentEngineReference, engineFactory, INDEX_FLUSH_ON_CLOSE, INDEX_REFRESH_INTERVAL, shardRouting, state
componentSettings, indexSettings, logger, shardId
Constructor and Description |
---|
ShadowIndexShard(ShardId shardId,
Settings indexSettings,
IndexSettingsService indexSettingsService,
IndicesLifecycle indicesLifecycle,
Store store,
MergeSchedulerProvider mergeScheduler,
Translog translog,
ThreadPool threadPool,
MapperService mapperService,
IndexQueryParserService queryParserService,
IndexCache indexCache,
IndexAliasesService indexAliasesService,
ShardIndexingService indexingService,
ShardGetService getService,
ShardSearchService searchService,
ShardIndexWarmerService shardWarmerService,
ShardFilterCache shardFilterCache,
ShardFieldData shardFieldData,
PercolatorQueriesRegistry percolatorQueriesRegistry,
ShardPercolateService shardPercolateService,
CodecService codecService,
ShardTermVectorService termVectorService,
IndexFieldDataService indexFieldDataService,
IndexService indexService,
ShardSuggestService shardSuggestService,
ShardQueryCache shardQueryCache,
ShardFixedBitSetFilterCache shardFixedBitSetFilterCache,
AnalysisService analysisService,
IndicesWarmer warmer,
SnapshotDeletionPolicy deletionPolicy,
SimilarityService similarityService,
MergePolicyProvider mergePolicyProvider,
EngineFactory factory,
ClusterService clusterService) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsPrimaryPromotion()
Returns
true iff this shard allows primary promotion, otherwise false |
protected void |
clearUnreferencedTranslogs() |
protected Engine |
newEngine() |
IndexShard |
routingEntry(ShardRouting newRouting)
In addition to the regular accounting done in
IndexShard.routingEntry(org.elasticsearch.cluster.routing.ShardRouting) ,
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, acquireSearcher, addFailedEngineListener, close, completionStats, create, delete, deleteByQuery, docStats, engine, engineUnsafe, failShard, fieldData, fieldDataStats, filterCache, filterCacheStats, finalizeRecovery, flush, flushStats, get, getService, getStats, idCacheStats, ignoreRecoveryAttempt, index, indexFieldDataService, indexingService, indexingStats, indexService, isFlushOnClose, mapperService, markAsInactive, mergeScheduler, mergeStats, optimize, percolateRegistry, performRecoveryOperation, performRecoveryRestart, postRecovery, prepareCreate, prepareDelete, prepareDeleteByQuery, prepareForIndexRecovery, prepareForTranslogRecovery, prepareIndex, queryCache, readAllowed, recover, recovering, recovering, recoveryState, recoveryStats, refresh, refreshStats, relocated, routingEntry, searchService, searchStats, segmentStats, shardFixedBitSetFilterCache, shardPercolateService, shardSuggestService, snapshotIndex, state, store, storeStats, suggestStats, termVectorService, translog, translogStats, updateBufferSize, verifyStarted, verifyStartedOrRecovering, warmerService, warmerStats
indexSettings, nodeName, shardId
@Inject public ShadowIndexShard(ShardId shardId, @IndexSettings Settings indexSettings, IndexSettingsService indexSettingsService, IndicesLifecycle indicesLifecycle, Store store, MergeSchedulerProvider mergeScheduler, Translog translog, ThreadPool threadPool, MapperService mapperService, IndexQueryParserService queryParserService, IndexCache indexCache, IndexAliasesService indexAliasesService, ShardIndexingService indexingService, ShardGetService getService, ShardSearchService searchService, ShardIndexWarmerService shardWarmerService, ShardFilterCache shardFilterCache, ShardFieldData shardFieldData, PercolatorQueriesRegistry percolatorQueriesRegistry, ShardPercolateService shardPercolateService, CodecService codecService, ShardTermVectorService termVectorService, IndexFieldDataService indexFieldDataService, IndexService indexService, ShardSuggestService shardSuggestService, ShardQueryCache shardQueryCache, ShardFixedBitSetFilterCache shardFixedBitSetFilterCache, AnalysisService analysisService, @Nullable IndicesWarmer warmer, SnapshotDeletionPolicy deletionPolicy, SimilarityService similarityService, MergePolicyProvider mergePolicyProvider, EngineFactory factory, ClusterService clusterService)
public IndexShard routingEntry(ShardRouting newRouting)
IndexShard.routingEntry(org.elasticsearch.cluster.routing.ShardRouting)
,
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.routingEntry
in class IndexShard
protected Engine newEngine()
newEngine
in class IndexShard
protected void clearUnreferencedTranslogs()
clearUnreferencedTranslogs
in class IndexShard
public boolean allowsPrimaryPromotion()
IndexShard
true
iff this shard allows primary promotion, otherwise false
allowsPrimaryPromotion
in class IndexShard
Copyright © 2009–2015. All rights reserved.