primaryTerm
protected long primaryTerm
ESIndexLevelReplicationTestCaseIndexShard instances easily,
containing utilities for shard creation and recoveries. See {newShard(boolean)} and
newStartedShard() for a good starting pointsESTestCase.DeprecationWarning, ESTestCase.GeohashGenerator, ESTestCase.TestAnalysis, ESTestCase.WithoutSecurityManagerorg.apache.lucene.tests.util.LuceneTestCase.AwaitsFix, org.apache.lucene.tests.util.LuceneTestCase.BadApple, org.apache.lucene.tests.util.LuceneTestCase.Monster, org.apache.lucene.tests.util.LuceneTestCase.Nightly, org.apache.lucene.tests.util.LuceneTestCase.SuppressCodecs, org.apache.lucene.tests.util.LuceneTestCase.SuppressFileSystems, org.apache.lucene.tests.util.LuceneTestCase.SuppressFsync, org.apache.lucene.tests.util.LuceneTestCase.SuppressReproduceLine, org.apache.lucene.tests.util.LuceneTestCase.SuppressSysoutChecks, org.apache.lucene.tests.util.LuceneTestCase.SuppressTempFileChecks, org.apache.lucene.tests.util.LuceneTestCase.ThrowingConsumer<T extends Object>, org.apache.lucene.tests.util.LuceneTestCase.ThrowingRunnable, org.apache.lucene.tests.util.LuceneTestCase.Weeklyprotected static AtomicLongstatic final IndexEventListenerprotected longprotected static final PeerRecoveryTargetService.RecoveryListenerprotected ThreadPoolcheckIndexFailures, DEFAULT_TEST_WORKER_ID, failureAndSuccessEvents, FIPS_SYSPROP, JAVA_TIMEZONE_IDS, JAVA_ZONE_IDS, logger, MIN_PRIVATE_PORT, TEST_WORKER_SYS_PROPERTY, TEST_WORKER_VM_IDassertsAreEnabled, classRules, DEFAULT_LINE_DOCS_FILE, INFOSTREAM, JENKINS_LARGE_LINE_DOCS_FILE, LEAVE_TEMPORARY, MAYBE_CACHE_POLICY, RANDOM_MULTIPLIER, ruleChain, suiteFailureMarker, SYSPROP_AWAITSFIX, SYSPROP_BADAPPLES, SYSPROP_FAILFAST, SYSPROP_MAXFAILURES, SYSPROP_MONSTER, SYSPROP_NIGHTLY, SYSPROP_WEEKLY, TEST_ASSERTS_ENABLED, TEST_AWAITSFIX, TEST_BADAPPLES, TEST_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_MONSTER, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_THROTTLING, TEST_WEEKLY, VERBOSEprotected voidstatic voidprotected voidassertDocCount(IndexShard shard,
int docDount) protected voidassertDocs(IndexShard shard,
String... ids) protected voidcloseShard(IndexShard shard,
boolean assertConsistencyBetweenTranslogAndLucene) protected voidcloseShards(Iterable<IndexShard> shards) protected voidcloseShards(IndexShard... shards) protected StorecreateStore(IndexSettings indexSettings,
ShardPath shardPath) protected StorecreateStore(ShardId shardId,
IndexSettings indexSettings,
org.apache.lucene.store.Directory directory) static Engine.WarmercreateTestWarmer(IndexSettings indexSettings) protected Engine.DeleteResultdeleteDoc(IndexShard shard,
String id) protected voidprotected voidflushShard(IndexShard shard) protected voidflushShard(IndexShard shard,
boolean force) static List<DocIdSeqNoAndSource>getDocIdAndSeqNos(IndexShard shard) static EnginegetEngine(IndexShard indexShard) protected DiscoveryNodestatic ReplicationTrackergetReplicationTracker(IndexShard indexShard) getShardDocUIDs(IndexShard shard) static TransloggetTranslog(IndexShard shard) protected Engine.IndexResultindexDoc(IndexShard shard,
String type,
String id) protected Engine.IndexResultindexDoc(IndexShard shard,
String type,
String id,
String source) protected Engine.IndexResultindexDoc(IndexShard shard,
String id,
String source,
org.elasticsearch.xcontent.XContentType xContentType,
String routing) protected IndexShardnewShard(boolean primary) protected IndexShardprotected IndexShardnewShard(boolean primary,
Settings settings,
EngineFactory engineFactory) protected IndexShardnewShard(ShardRouting routing,
IndexMetadata indexMetadata,
org.elasticsearch.core.CheckedFunction<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader,IOException> indexReaderWrapper,
EngineFactory engineFactory,
Runnable globalCheckpointSyncer,
RetentionLeaseSyncer retentionLeaseSyncer,
IndexingOperationListener... listeners) protected IndexShardnewShard(ShardRouting routing,
IndexMetadata indexMetadata,
org.elasticsearch.core.CheckedFunction<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader,IOException> indexReaderWrapper,
EngineFactory engineFactory,
IndexingOperationListener... listeners) protected IndexShardnewShard(ShardRouting shardRouting,
Settings settings,
EngineFactory engineFactory,
IndexingOperationListener... listeners) protected IndexShardnewShard(ShardRouting shardRouting,
Settings settings,
IndexingOperationListener... listeners) protected IndexShardnewShard(ShardRouting shardRouting,
IndexingOperationListener... listeners) protected IndexShardnewShard(ShardRouting routing,
ShardPath shardPath,
IndexMetadata indexMetadata,
org.elasticsearch.core.CheckedFunction<IndexSettings,Store,IOException> storeProvider,
org.elasticsearch.core.CheckedFunction<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader,IOException> indexReaderWrapper,
EngineFactory engineFactory,
Runnable globalCheckpointSyncer,
RetentionLeaseSyncer retentionLeaseSyncer,
IndexEventListener indexEventListener,
LongSupplier relativeTimeSupplier,
IndexingOperationListener... listeners) protected IndexShardnewShard(ShardRouting routing,
ShardPath shardPath,
IndexMetadata indexMetadata,
org.elasticsearch.core.CheckedFunction<IndexSettings,Store,IOException> storeProvider,
org.elasticsearch.core.CheckedFunction<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader,IOException> indexReaderWrapper,
EngineFactory engineFactory,
Runnable globalCheckpointSyncer,
RetentionLeaseSyncer retentionLeaseSyncer,
IndexEventListener indexEventListener,
IndexingOperationListener... listeners) protected IndexShardnewShard(ShardId shardId,
boolean primary,
String nodeId,
IndexMetadata indexMetadata,
org.elasticsearch.core.CheckedFunction<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader,IOException> readerWrapper) protected IndexShardnewShard(ShardId shardId,
boolean primary,
String nodeId,
IndexMetadata indexMetadata,
org.elasticsearch.core.CheckedFunction<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader,IOException> readerWrapper,
Runnable globalCheckpointSyncer) protected IndexShardnewShard(ShardId shardId,
boolean primary,
IndexingOperationListener... listeners) protected IndexShardprotected IndexShardnewStartedShard(boolean primary) protected IndexShardnewStartedShard(boolean primary,
Settings settings) protected IndexShardnewStartedShard(boolean primary,
Settings settings,
EngineFactory engineFactory) protected IndexShardnewStartedShard(Settings settings) protected IndexShardnewStartedShard(org.elasticsearch.core.CheckedFunction<Boolean,IndexShard,IOException> shardFunction,
boolean primary) protected voidpromoteReplica(IndexShard replica,
Set<String> inSyncIds,
IndexShardRoutingTable routingTable) static booleanrecoverFromStore(IndexShard newShard) protected voidrecoverReplica(IndexShard replica,
IndexShard primary,
boolean startReplica) protected voidrecoverReplica(IndexShard replica,
IndexShard primary,
BiFunction<IndexShard,DiscoveryNode,RecoveryTarget> targetSupplier,
boolean markAsRecovering,
boolean markAsStarted) protected voidrecoverShardFromSnapshot(IndexShard shard,
Snapshot snapshot,
Repository repository) protected voidrecoverShardFromStore(IndexShard primary) protected final voidrecoverUnstartedReplica(IndexShard replica,
IndexShard primary,
BiFunction<IndexShard,DiscoveryNode,RecoveryTarget> targetSupplier,
boolean markAsRecovering,
Set<String> inSyncIds,
IndexShardRoutingTable routingTable) protected voidrecoveryEmptyReplica(IndexShard replica,
boolean startReplica) protected IndexShardreinitShard(IndexShard current,
ShardRouting routing,
IndexMetadata indexMetadata,
EngineFactory engineFactory,
IndexingOperationListener... listeners) protected IndexShardreinitShard(IndexShard current,
ShardRouting routing,
IndexingOperationListener... listeners) protected IndexShardreinitShard(IndexShard current,
IndexingOperationListener... listeners) voidsetUp()protected ThreadPoolprotected ShardGenerationsnapshotShard(IndexShard shard,
Snapshot snapshot,
Repository repository) protected voidstartReplicaAfterRecovery(IndexShard replica,
IndexShard primary,
Set<String> inSyncIds,
IndexShardRoutingTable routingTable) voidtearDown()protected voidprotected voidupdateMappings(IndexShard shard,
IndexMetadata indexMetadata) static voidupdateRoutingEntry(IndexShard shard,
ShardRouting shardRouting) after, afterIfFailed, afterIfSuccessful, assertArrayEquals, assertBusy, assertBusy, assertCriticalWarnings, assertEquals, assertSettingDeprecationsAndWarnings, assertWarnings, assertWarnings, before, between, buildEnvSettings, buildNewFakeTransportAddress, checkStaticState, compatibleMediaType, copyInstance, copyInstance, copyNamedWriteable, copyNamedWriteable, copyNamedWriteable, copyWriteable, copyWriteable, copyWriteable, createDefaultIndexAnalyzers, createParser, createParser, createParser, createParser, createParser, createParser, createParserWithCompatibilityFor, createTestAnalysis, createTestAnalysis, createTestAnalysis, enableWarningsCheck, ensureAllSearchContextsReleased, ensureCheckIndexPassed, ensureNoWarnings, ensureSupportedLocale, filteredWarnings, frequently, generateRandomStringArray, generateRandomStringArray, getDataPath, getPortRange, getSuiteFailureMarker, getTestTransportPlugin, getTestTransportType, getWorkerBasePort, inFipsJvm, iterations, maybeRestoreClassSecurityManager, maybeSet, maybeStashClassSecurityManager, mockScript, newEnvironment, newEnvironment, newNodeEnvironment, newNodeEnvironment, parserConfig, randomAlphaOfLength, randomAlphaOfLengthBetween, randomArray, randomArray, randomBigInteger, randomBoolean, randomByte, randomByteArrayOfLength, randomCompatibleMediaType, randomDateFormatterPattern, randomDouble, randomDoubleBetween, randomDoubles, randomDoubles, randomFloat, randomFrom, randomFrom, randomFrom, randomFrom, randomFrom, randomFrom, randomGeohash, randomIdentifier, randomInt, randomInt, randomIntBetween, randomInts, randomInts, randomIp, randomList, randomList, randomLong, randomLongBetween, randomLongs, randomLongs, randomMap, randomMillisUpToYear9999, randomNonEmptySubsetOf, randomNonNegativeByte, randomNonNegativeLong, randomPositiveTimeValue, randomRealisticUnicodeOfCodepointLength, randomRealisticUnicodeOfCodepointLengthBetween, randomRealisticUnicodeOfLength, randomRealisticUnicodeOfLengthBetween, randomSet, randomShort, randomSubsetOf, randomSubsetOf, randomSubsetOf, randomTimeValue, randomTimeValue, randomTimeValue, randomTimeZone, randomUnicodeOfCodepointLength, randomUnicodeOfCodepointLengthBetween, randomUnicodeOfLength, randomUnicodeOfLengthBetween, randomUnique, randomValueOtherThan, randomValueOtherThanMany, randomVendorType, randomZone, removeHeaderWarningAppender, resetCheckIndexStatus, resetPortCounter, restoreContentType, restoreFileSystem, scaledRandomIntBetween, secureRandom, secureRandom, secureRandomFips, secureRandomFips, secureRandomNonFips, secureRandomNonFips, setContentType, setFileSystem, setHeaderWarningAppender, settings, shuffledList, shuffleMap, shuffleXContent, shuffleXContent, skipTestWaitingForLuceneFix, spinForAtLeastNMilliseconds, spinForAtLeastOneMillisecond, terminate, terminate, tmpPaths, toShuffledXContent, waitUntil, waitUntil, writableRegistry, xContentRegistryaddVirusChecker, assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertFieldInfosEquals, assertNormsEquals, assertPointsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, assumeWorkingMMapOnWindows, atLeast, atLeast, callStackContains, callStackContains, callStackContainsAnyOf, closeAfterSuite, closeAfterTest, collate, createTempDir, createTempDir, createTempFile, createTempFile, dumpArray, dumpIterator, ensureSaneIWCOnNightly, expectThrows, expectThrows, expectThrows, expectThrowsAnyOf, expectThrowsAnyOf, getDataInputStream, getJvmForkArguments, getOnlyLeafReader, getTestClass, getTestName, hasWorkingMMapOnWindows, isTestThread, localeForLanguageTag, maybeChangeLiveIndexWriterConfig, maybeWrapReader, newAlcoholicMergePolicy, newAlcoholicMergePolicy, newBytesRef, newBytesRef, newBytesRef, newBytesRef, newBytesRef, newBytesRef, newDirectory, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newIndexWriterConfig, newIOContext, newIOContext, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newMaybeVirusCheckingDirectory, newMaybeVirusCheckingFSDirectory, newMergePolicy, newMergePolicy, newMergePolicy, newMockDirectory, newMockDirectory, newMockDirectory, newMockFSDirectory, newMockFSDirectory, newSearcher, newSearcher, newSearcher, newSearcher, newStringField, newStringField, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, overrideDefaultQueryCache, overrideTestDefaultQueryCache, random, randomLocale, randomTimeZone, rarely, rarely, replaceMaxFailureRule, resetDefaultQueryCache, restoreCPUCoreCount, restoreIndexWriterMaxDocs, runWithRestrictedPermissions, setIndexWriterMaxDocs, setupCPUCoreCount, slowFileExists, usually, usually, wrapReaderassertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, failsetUp in class org.apache.lucene.tests.util.LuceneTestCaseExceptiontearDown in class org.apache.lucene.tests.util.LuceneTestCaseExceptionIOExceptionIOExceptionprimary - indicates whether to a primary shard (ready to recover from an empty store) or a replica (ready to recover from
another shard)IOExceptionprimary - indicates whether to a primary shard (ready to recover from an empty store) or a replica (ready to recover from
another shard)IOExceptionprimary - indicates whether to a primary shard (ready to recover from an empty store) or a replica (ready to recover from
another shard)settings - the settings to use for this shardengineFactory - the engine factory to use for this shardIOExceptionIOExceptionIOExceptionshardRouting - the ShardRouting to use for this shardsettings - the settings to use for this shardengineFactory - the engine factory to use for this shardlisteners - an optional set of listeners to add to the shardIOExceptionshardId - the shard id to useprimary - indicates whether to a primary shard (ready to recover from an empty store) or a replica
(ready to recover from another shard)listeners - an optional set of listeners to add to the shardIOExceptionshardId - the shard id to useprimary - indicates whether to a primary shard (ready to recover from an empty store) or a replica
(ready to recover from another shard)IOExceptionshardId - the shard id to useprimary - indicates whether to a primary shard (ready to recover from an empty store) or a replica
(ready to recover from another shard)IOExceptionrouting - shard routing to useindexMetadata - indexMetadata for the shard, including any mappinglisteners - an optional set of listeners to add to the shardIOExceptionrouting - shard routing to useindexMetadata - indexMetadata for the shard, including any mappingindexReaderWrapper - an optional wrapper to be used during searchglobalCheckpointSyncer - callback for syncing global checkpointslisteners - an optional set of listeners to add to the shardIOExceptionrouting - shard routing to useshardPath - path to use for shard dataindexMetadata - indexMetadata for the shard, including any mappingstoreProvider - an optional custom store provider to use. If null a default file based store will be createdindexReaderWrapper - an optional wrapper to be used during searchglobalCheckpointSyncer - callback for syncing global checkpointsindexEventListener - index event listenerlisteners - an optional set of listeners to add to the shardIOExceptionrouting - shard routing to useshardPath - path to use for shard dataindexMetadata - indexMetadata for the shard, including any mappingstoreProvider - an optional custom store provider to use. If null a default file based store will be createdindexReaderWrapper - an optional wrapper to be used during searchglobalCheckpointSyncer - callback for syncing global checkpointsindexEventListener - index event listenerrelativeTimeSupplier - the clock used to measure relative timelisteners - an optional set of listeners to add to the shardIOExceptionlisteners - new listerns to use for the newly created shardIOExceptionrouting - the shard routing to use for the newly created shard.listeners - new listerns to use for the newly created shardIOExceptionrouting - the shard routing to use for the newly created shard.listeners - new listerns to use for the newly created shardindexMetadata - the index metadata to use for the newly created shardengineFactory - the engine factory for the new shardIOExceptionIOExceptionsettings - the settings to use for this shardIOExceptionprimary - controls whether the shard will be a primary or a replica.IOExceptionprimary - controls whether the shard will be a primary or a replica.settings - the settings to use for this shardIOExceptionprimary - controls whether the shard will be a primary or a replica.settings - the settings to use for this shardengineFactory - the engine factory to use for this shardIOExceptionshardFunction - shard factory functionprimary - controls whether the shard will be a primary or a replica.IOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIndexShardState.POST_RECOVERY and doesn't start it.replica - the recovery target shardprimary - the recovery source shardtargetSupplier - supplies an instance of RecoveryTargetmarkAsRecovering - set to false if the replica is marked as recoveringIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOExceptionIOException