@LuceneTestCase.Slow public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTestBase
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractFullDistribZkTestBase.CloudJettyRunner |
static class |
AbstractFullDistribZkTestBase.CloudSolrServerClient |
BaseDistributedSearchTestCase.RandDate, BaseDistributedSearchTestCase.RandVal, BaseDistributedSearchTestCase.ShardsFixed, BaseDistributedSearchTestCase.ShardsRepeat, BaseDistributedSearchTestCase.ShardsRepeatRuleSolrTestCaseJ4.BVal, SolrTestCaseJ4.CloudHttp2SolrClientBuilder, SolrTestCaseJ4.CloudSolrClientBuilder, SolrTestCaseJ4.Doc, SolrTestCaseJ4.Fld, SolrTestCaseJ4.FldType, SolrTestCaseJ4.FVal, SolrTestCaseJ4.IRange, SolrTestCaseJ4.IVals, SolrTestCaseJ4.IValsPercent, SolrTestCaseJ4.SuppressPointFields, SolrTestCaseJ4.SuppressSSL, SolrTestCaseJ4.SVal, SolrTestCaseJ4.Vals, SolrTestCaseJ4.XmlDocorg.apache.lucene.util.LuceneTestCase.AwaitsFix, org.apache.lucene.util.LuceneTestCase.BadApple, org.apache.lucene.util.LuceneTestCase.Monster, org.apache.lucene.util.LuceneTestCase.Nightly, org.apache.lucene.util.LuceneTestCase.Slow, org.apache.lucene.util.LuceneTestCase.SuppressCodecs, org.apache.lucene.util.LuceneTestCase.SuppressFileSystems, org.apache.lucene.util.LuceneTestCase.SuppressFsync, org.apache.lucene.util.LuceneTestCase.SuppressReproduceLine, org.apache.lucene.util.LuceneTestCase.SuppressSysoutChecks, org.apache.lucene.util.LuceneTestCase.SuppressTempFileChecks, org.apache.lucene.util.LuceneTestCase.ThrowingRunnable, org.apache.lucene.util.LuceneTestCase.Weekly| Modifier and Type | Field and Description |
|---|---|
protected ChaosMonkey |
chaosMonkey |
protected org.apache.solr.client.solrj.impl.CloudSolrClient |
cloudClient |
protected List<AbstractFullDistribZkTestBase.CloudJettyRunner> |
cloudJettys |
protected org.apache.solr.client.solrj.impl.CloudSolrClient |
controlClientCloud |
protected List<org.apache.solr.client.solrj.SolrClient> |
coreClients |
protected String |
defaultStateFormat |
protected boolean |
printLayoutOnTearDown |
static String |
SHARD1 |
static String |
SHARD2 |
protected Map<String,List<AbstractFullDistribZkTestBase.CloudJettyRunner>> |
shardToJetty |
protected Map<String,AbstractFullDistribZkTestBase.CloudJettyRunner> |
shardToLeaderJetty |
protected int |
sliceCount |
protected boolean |
useJettyDataDir |
DEFAULT_COLLECTION, zkServerclients, context, controlClient, controlJetty, deadServers, executor, fieldNames, flags, FUZZY, handle, id, jettys, nThreads, ORDERED, r, randVals, rdate, rdouble, repeatRule, rfloat, rint, rlong, shards, shardsArr, SKIP, SKIPVAL, stress, testDir, UNORDERED, useExplicitNodeNames, verifyStressconfigString, CORE_PROPERTIES_FILENAME, coreName, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_TEST_COLLECTION_NAME, DEFAULT_TEST_CORENAME, h, hdfsDataDir, initCoreDataDir, lrf, NUMERIC_DOCVALUES_SYSPROP, NUMERIC_POINTS_SYSPROP, ONE_ONE, RANDOMIZED_NUMERIC_FIELDTYPES, schemaString, solrClassRules, solrConfig, solrTestRules, sslConfig, SYSTEM_PROPERTY_SOLR_DISABLE_SHARDS_WHITELIST, SYSTEM_PROPERTY_SOLR_TESTS_MERGEPOLICYFACTORY, testExecutor, testSolrHome, UPDATELOG_SYSPROP, USE_NUMERIC_POINTS_SYSPROP, ZERO_ONE, ZERO_TWOassertsAreEnabled, 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_SLOW, 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_SLOW, TEST_THROTTLING, TEST_WEEKLY, VERBOSE| Constructor and Description |
|---|
AbstractFullDistribZkTestBase() |
| Modifier and Type | Method and Description |
|---|---|
static void |
afterClass() |
protected void |
assertCollectionNotExists(String collectionName,
int timeoutSeconds) |
protected void |
assertDocCounts(boolean verbose) |
protected static boolean |
attemptCollectionDelete(org.apache.solr.client.solrj.impl.CloudSolrClient client,
String collectionName)
Logs a WARN if collection can't be deleted, but does not fail or throw an exception
|
static void |
beforeClass() |
static void |
beforeFullSolrCloudTest() |
void |
beforeTest() |
protected void |
checkForCollection(String collectionName,
List<Integer> numShardsNumReplicaList,
List<String> nodesAllowedToRunShards) |
protected void |
checkQueries() |
protected void |
checkShardConsistency() |
protected void |
checkShardConsistency(boolean checkVsControl,
boolean verbose) |
protected void |
checkShardConsistency(boolean checkVsControl,
boolean verbose,
Set<String> addFails,
Set<String> deleteFails) |
protected void |
checkShardConsistency(String shard)
Returns a non-null string if replicas within the same shard do not have a
consistent number of documents.
|
protected String |
checkShardConsistency(String shard,
boolean expectFailure,
boolean verbose)
Returns a non-null string if replicas within the same shard do not have a
consistent number of documents.
|
protected static void |
clearErrorHook() |
protected void |
closeRestTestHarnesses() |
protected void |
commit() |
protected org.apache.solr.client.solrj.impl.CloudSolrClient |
createCloudClient(String defaultCollection) |
protected org.apache.solr.client.solrj.response.CollectionAdminResponse |
createCollection(Map<String,List<Integer>> collectionInfos,
String collectionName,
int numShards,
int replicationFactor,
int maxShardsPerNode,
org.apache.solr.client.solrj.SolrClient client,
String createNodeSetStr,
String configName) |
protected org.apache.solr.client.solrj.response.CollectionAdminResponse |
createCollection(Map<String,List<Integer>> collectionInfos,
String collectionName,
Map<String,Object> collectionProps,
org.apache.solr.client.solrj.SolrClient client) |
protected org.apache.solr.client.solrj.response.CollectionAdminResponse |
createCollection(Map<String,List<Integer>> collectionInfos,
String collectionName,
Map<String,Object> collectionProps,
org.apache.solr.client.solrj.SolrClient client,
String confSetName) |
protected org.apache.solr.client.solrj.response.CollectionAdminResponse |
createCollection(Map<String,List<Integer>> collectionInfos,
String collectionName,
String configSetName,
int numShards,
int replicationFactor,
int maxShardsPerNode,
org.apache.solr.client.solrj.SolrClient client,
String createNodeSetStr) |
protected void |
createCollection(String collName,
org.apache.solr.client.solrj.impl.CloudSolrClient client,
int replicationFactor,
int numShards) |
protected org.apache.solr.client.solrj.response.CollectionAdminResponse |
createCollection(String collectionName,
String configSetName,
int numShards,
int replicationFactor,
int maxShardsPerNode) |
protected void |
createCollectionRetry(String testCollectionName,
String configSetName,
int numShards,
int replicationFactor,
int maxShardsPerNode) |
org.apache.solr.client.solrj.embedded.JettySolrRunner |
createJetty(File solrHome,
String dataDir,
String shardList,
String solrConfigOverride,
String schemaOverride) |
org.apache.solr.client.solrj.embedded.JettySolrRunner |
createJetty(File solrHome,
String dataDir,
String shardList,
String solrConfigOverride,
String schemaOverride,
org.apache.solr.common.cloud.Replica.Type replicaType) |
org.apache.solr.client.solrj.embedded.JettySolrRunner |
createJetty(String dataDir,
String ulogDir,
String shardList,
String solrConfigOverride) |
protected List<org.apache.solr.client.solrj.embedded.JettySolrRunner> |
createJettys(int numJettys) |
protected org.apache.solr.client.solrj.SolrClient |
createNewSolrClient(int port) |
protected org.apache.solr.client.solrj.SolrClient |
createNewSolrClient(int port,
int connectionTimeoutMillis,
int socketTimeoutMillis) |
protected org.apache.solr.client.solrj.SolrClient |
createNewSolrClient(String coreName,
int port) |
protected org.apache.solr.client.solrj.SolrClient |
createNewSolrClient(String coreName,
int port,
int connectionTimeoutMillis,
int socketTimeoutMillis) |
protected org.apache.solr.client.solrj.SolrClient |
createNewSolrClient(String collection,
String baseUrl) |
org.apache.solr.client.solrj.embedded.JettySolrRunner |
createProxiedJetty(File solrHome,
String dataDir,
String shardList,
String solrConfigOverride,
String schemaOverride,
org.apache.solr.common.cloud.Replica.Type replicaType)
Creates a JettySolrRunner with a socket proxy sitting infront of the Jetty server,
which gives us the ability to simulate network partitions without having to fuss
with IPTables.
|
protected void |
createServers(int numServers) |
protected void |
del(String q) |
protected void |
destroyServers() |
void |
distribSetUp() |
void |
distribTearDown() |
protected void |
enableAutoSoftCommit(int time) |
protected List<org.apache.solr.common.cloud.Replica> |
ensureAllReplicasAreActive(String testCollectionName,
String shardId,
int shards,
int rf,
int maxWaitSecs) |
protected void |
forAllRestTestHarnesses(UnaryOperator<RestTestHarness> op) |
protected String |
getBaseUrl(org.apache.solr.client.solrj.impl.HttpSolrClient client) |
protected org.apache.solr.client.solrj.SolrClient |
getClient(String nodeName) |
protected org.apache.solr.client.solrj.impl.CloudSolrClient |
getCommonCloudSolrClient() |
protected String |
getDataDir(String dataDir) |
static org.apache.solr.common.SolrInputDocument |
getDoc(Object... fields) |
protected long |
getIndexVersion(org.apache.solr.common.cloud.Replica replica) |
protected org.apache.solr.client.solrj.embedded.JettySolrRunner |
getJettyOnPort(int port) |
protected org.apache.solr.common.cloud.ZkCoreNodeProps |
getLeaderUrlFromZk(String collection,
String slice) |
protected org.apache.solr.client.solrj.cloud.SocketProxy |
getProxyForReplica(org.apache.solr.common.cloud.Replica replica) |
protected int |
getPullReplicaCount() |
protected int |
getReplicaPort(org.apache.solr.common.cloud.Replica replica) |
static org.apache.solr.client.solrj.response.RequestStatusState |
getRequestStateAfterCompletion(String requestId,
int waitForSeconds,
org.apache.solr.client.solrj.SolrClient client) |
protected org.apache.solr.common.cloud.Replica |
getShardLeader(String testCollectionName,
String shardId,
int timeoutSecs) |
protected String |
getStateFormat() |
protected int |
getTotalReplicas(org.apache.solr.common.cloud.DocCollection c,
String collection) |
static String |
getUrlFromZk(org.apache.solr.common.cloud.ClusterState clusterState,
String collection) |
protected void |
index_specific(int serverNumber,
Object... fields) |
protected void |
index_specific(org.apache.solr.client.solrj.SolrClient client,
Object... fields) |
protected void |
indexAbunchOfDocs() |
protected void |
indexDoc(org.apache.solr.common.SolrInputDocument doc)
Indexes the document in both the control client, and a randomly selected client
|
protected void |
initCloud() |
protected void |
logReplicationDetails(org.apache.solr.common.cloud.Replica replica,
StringBuilder builder) |
protected void |
logReplicaTypesReplicationInfo(String collectionName,
org.apache.solr.common.cloud.ZkStateReader zkStateReader) |
protected String |
printClusterStateInfo() |
protected String |
printClusterStateInfo(String collection) |
org.apache.solr.client.solrj.response.QueryResponse |
queryAndCompareReplicas(org.apache.solr.common.params.SolrParams params,
String shard)
Executes a query against each live and active replica of the specified shard
and aserts that the results are identical.
|
void |
queryAndCompareShards(org.apache.solr.common.params.SolrParams params)
For each Shard, executes a query against each live and active replica of that shard
and asserts that the results are identical for each replica of the same shard.
|
protected org.apache.solr.client.solrj.response.QueryResponse |
queryServer(org.apache.solr.common.params.ModifiableSolrParams params) |
protected void |
randomlyEnableAutoSoftCommit() |
protected RestTestHarness |
randomRestTestHarness() |
protected RestTestHarness |
randomRestTestHarness(Random random) |
protected boolean |
reloadCollection(org.apache.solr.common.cloud.Replica replica,
String testCollectionName) |
protected static int |
sendDocsWithRetry(org.apache.solr.client.solrj.impl.CloudSolrClient cloudClient,
String collection,
List<org.apache.solr.common.SolrInputDocument> batch,
int minRf,
int maxRetries,
int waitBeforeRetry) |
protected int |
sendDocsWithRetry(List<org.apache.solr.common.SolrInputDocument> batch,
int minRf,
int maxRetries,
int waitBeforeRetry) |
protected void |
setDistributedParams(org.apache.solr.common.params.ModifiableSolrParams params) |
protected static void |
setErrorHook() |
protected void |
setupRestTestHarnesses() |
void |
showCounts() |
protected void |
updateMappingsFromZk(List<org.apache.solr.client.solrj.embedded.JettySolrRunner> jettys,
List<org.apache.solr.client.solrj.SolrClient> clients) |
protected void |
updateMappingsFromZk(List<org.apache.solr.client.solrj.embedded.JettySolrRunner> jettys,
List<org.apache.solr.client.solrj.SolrClient> clients,
boolean allowOverSharding) |
protected boolean |
useTlogReplicas() |
protected void |
waitForActiveReplicaCount(org.apache.solr.client.solrj.impl.CloudSolrClient client,
String collection,
int expectedNumReplicas) |
protected void |
waitForAllWarmingSearchers() |
static void |
waitForCollection(org.apache.solr.common.cloud.ZkStateReader reader,
String collection,
int slices) |
protected void |
waitForLiveNode(org.apache.solr.client.solrj.embedded.JettySolrRunner j) |
static void |
waitForNon403or404or503(org.apache.solr.client.solrj.impl.HttpSolrClient collectionClient) |
void |
waitForNoShardInconsistency() |
protected void |
waitForRecoveriesToFinish(boolean verbose) |
protected void |
waitForRecoveriesToFinish(boolean verbose,
int timeoutSeconds) |
protected void |
waitForRecoveriesToFinish(String collection,
boolean verbose) |
protected void |
waitForReplicationFromReplicas(String collectionName,
org.apache.solr.common.cloud.ZkStateReader zkStateReader,
org.apache.solr.util.TimeOut timeout) |
void |
waitForThingsToLevelOut(int waitForRecTimeSeconds) |
assertAllActive, beforeThisClass, copyConfigUp, getCloudSchemaFile, getCloudSolrConfig, printLayout, restartZk, verifyReplicaStatus, waitForCollectionToDisappear, waitForRecoveriesToFinish, waitForRecoveriesToFinish, waitForRecoveriesToFinishadd, addFields, addRandFields, buildUrl, clearHostContext, clearSolrDisableShardsWhitelist, compare, compare, compare, compare, compare, compare, compare1, compareResponses, compareSolrResponses, createControlJetty, createJetty, createJetty, createJetty, del, delQ, eq, fixShardCount, flags, getExtraRequestFilters, getExtraServlets, getFieldNames, getRandFields, getRandValues, getShardCount, getShardsString, getSolrHome, getSolrXml, index, indexDoc, indexr, initHostContext, initialize, query, query, query, query, queryAndCompare, queryAndCompare, seedSolrHome, setSolrDisableShardsWhitelist, setupJettySolrHome, validateControlDataadd, addAndGetVersion, addDoc, adoc, adoc, assertFailedU, assertFailedU, assertFieldValues, assertJQ, assertJQ, assertNonBlockingRandomGeneratorAvailable, assertQ, assertQ, assertQEx, assertQEx, assertQEx, assertResponseValues, assertSolrInputFieldEquals, assertU, assertU, assertXmlFile, assumeWorkingMockito, buildJettyConfig, buildUrl, clearIndex, clearObjectTrackerAndCheckEmpty, clearObjectTrackerAndCheckEmpty, commit, compareSolrDocument, compareSolrDocumentList, compareSolrInputDocument, configset, copyMinConf, copyMinConf, copyMinConf, copyMinFullSetup, copySolrHomeToTemp, copyXmlToHome, createComparator, createComparator, createCore, createCoreContainer, createCoreContainer, createCoreContainer, createDefaultCoreContainer, createDistributedUpdateProcessor, createDoc, createSort, deleteAndGetVersion, deleteByQueryAndGetVersion, deleteCore, delI, delQ, doc, getClassName, getCloudHttp2SolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getConcurrentUpdateSolrClient, getConcurrentUpdateSolrClient, getConcurrentUpdateSolrClient, getFile, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getLBHttpSolrClient, getLBHttpSolrClient, getLBHttpSolrClient, getNextAvailablePort, getRootCause, getSaferTestName, getSchemaFile, getSimpleClassName, getSolrConfigFile, getWrappedException, hasInitException, hasInitException, ignoreException, indexDocs, initClassLogLevels, initCore, initCore, initCore, initCore, initMethodLogLevels, invertField, isSSLMode, JQ, json, json, json, jsonAdd, jsonDelId, jsonDelQ, map, newCloudSolrClient, newRandomConfig, optimize, params, pickRandom, postSetUp, preTearDown, randomDate, randomizeUpdateLogImpl, randomSkewedDate, randomXmlUsableUnicodeString, req, req, req, resetExceptionIgnores, resetFactory, restoreMethodLogLevels, sdoc, sdocs, sdocWithChildren, sdocWithChildren, sdocWithChildren, setUp, setupNoCoreTest, setupTestCases, skewed, Solr11035BandAid, Solr11035BandAid, startTrackingSearchers, systemClearPropertySolrDisableShardsWhitelist, systemClearPropertySolrTestsMergePolicyFactory, systemSetPropertySolrDisableShardsWhitelist, systemSetPropertySolrTestsMergePolicyFactory, tearDown, teardownTestCases, TEST_HOME, TEST_PATH, toJSON, unIgnoreException, updateJ, useFactory, waitForWarming, waitForWarming, whitespaceMockTokenizer, whitespaceMockTokenizer, writeCoreProperties, writeCorePropertiescheckSyspropForceBeforeAssumptionFailure, checkSyspropForceBeforeClassAssumptionFailure, shutdownLoggeraddVirusChecker, 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, closeAfterSuite, closeAfterTest, collate, createTempDir, createTempDir, createTempFile, createTempFile, dumpArray, dumpIterator, expectThrows, expectThrows, expectThrows, expectThrowsAnyOf, expectThrowsAnyOf, getBaseTempDirForTestClass, getDataInputStream, getDataPath, getOnlyLeafReader, getTestClass, getTestName, hasWorkingMMapOnWindows, isTestThread, localeForLanguageTag, maybeChangeLiveIndexWriterConfig, maybeWrapReader, newAlcoholicMergePolicy, newAlcoholicMergePolicy, 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, newStringField, newStringField, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, overrideDefaultQueryCache, overrideTestDefaultQueryCache, random, randomLocale, randomTimeZone, rarely, rarely, replaceMaxFailureRule, resetDefaultQueryCache, restoreCPUCoreCount, restoreIndexWriterMaxDocs, restoreSpins, runWithRestrictedPermissions, setIndexWriterMaxDocs, setupCPUCoreCount, setupSpins, 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, failpublic static final String SHARD1
public static final String SHARD2
protected boolean printLayoutOnTearDown
protected int sliceCount
protected volatile org.apache.solr.client.solrj.impl.CloudSolrClient controlClientCloud
protected volatile org.apache.solr.client.solrj.impl.CloudSolrClient cloudClient
protected final List<org.apache.solr.client.solrj.SolrClient> coreClients
protected final List<AbstractFullDistribZkTestBase.CloudJettyRunner> cloudJettys
protected final Map<String,List<AbstractFullDistribZkTestBase.CloudJettyRunner>> shardToJetty
protected volatile ChaosMonkey chaosMonkey
protected Map<String,AbstractFullDistribZkTestBase.CloudJettyRunner> shardToLeaderJetty
protected volatile boolean useJettyDataDir
protected String defaultStateFormat
public static void beforeFullSolrCloudTest()
public void beforeTest()
protected static void setErrorHook()
protected static void clearErrorHook()
public void distribSetUp()
throws Exception
distribSetUp in class AbstractDistribZkTestBaseExceptionpublic static void beforeClass()
protected String getDataDir(String dataDir) throws IOException
IOExceptionprotected boolean useTlogReplicas()
protected org.apache.solr.client.solrj.impl.CloudSolrClient createCloudClient(String defaultCollection)
protected void createServers(int numServers)
throws Exception
createServers in class AbstractDistribZkTestBaseExceptionpublic static void waitForCollection(org.apache.solr.common.cloud.ZkStateReader reader,
String collection,
int slices)
throws Exception
Exceptionprotected String getStateFormat()
protected List<org.apache.solr.client.solrj.embedded.JettySolrRunner> createJettys(int numJettys) throws Exception
Exceptionprotected void waitForLiveNode(org.apache.solr.client.solrj.embedded.JettySolrRunner j)
throws InterruptedException,
TimeoutException
InterruptedExceptionTimeoutExceptionprotected void waitForActiveReplicaCount(org.apache.solr.client.solrj.impl.CloudSolrClient client,
String collection,
int expectedNumReplicas)
throws TimeoutException,
org.apache.solr.cloud.ZkController.NotInClusterStateException
TimeoutExceptionorg.apache.solr.cloud.ZkController.NotInClusterStateExceptionprotected int getPullReplicaCount()
protected int getTotalReplicas(org.apache.solr.common.cloud.DocCollection c,
String collection)
public org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(String dataDir, String ulogDir, String shardList, String solrConfigOverride) throws Exception
Exceptionpublic final org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride) throws Exception
createJetty in class BaseDistributedSearchTestCaseExceptionpublic org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride, org.apache.solr.common.cloud.Replica.Type replicaType) throws Exception
Exceptionpublic org.apache.solr.client.solrj.embedded.JettySolrRunner createProxiedJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride, org.apache.solr.common.cloud.Replica.Type replicaType) throws Exception
Exceptionprotected int getReplicaPort(org.apache.solr.common.cloud.Replica replica)
protected org.apache.solr.client.solrj.embedded.JettySolrRunner getJettyOnPort(int port)
protected org.apache.solr.client.solrj.cloud.SocketProxy getProxyForReplica(org.apache.solr.common.cloud.Replica replica)
throws Exception
Exceptionprotected void updateMappingsFromZk(List<org.apache.solr.client.solrj.embedded.JettySolrRunner> jettys, List<org.apache.solr.client.solrj.SolrClient> clients) throws Exception
Exceptionprotected void updateMappingsFromZk(List<org.apache.solr.client.solrj.embedded.JettySolrRunner> jettys, List<org.apache.solr.client.solrj.SolrClient> clients, boolean allowOverSharding) throws Exception
Exceptionprotected void setDistributedParams(org.apache.solr.common.params.ModifiableSolrParams params)
setDistributedParams in class BaseDistributedSearchTestCaseprotected int sendDocsWithRetry(List<org.apache.solr.common.SolrInputDocument> batch, int minRf, int maxRetries, int waitBeforeRetry) throws Exception
Exceptionprotected static int sendDocsWithRetry(org.apache.solr.client.solrj.impl.CloudSolrClient cloudClient,
String collection,
List<org.apache.solr.common.SolrInputDocument> batch,
int minRf,
int maxRetries,
int waitBeforeRetry)
throws Exception
Exceptionprotected void indexDoc(org.apache.solr.common.SolrInputDocument doc)
throws IOException,
org.apache.solr.client.solrj.SolrServerException
BaseDistributedSearchTestCaseindexDoc in class BaseDistributedSearchTestCaseIOExceptionorg.apache.solr.client.solrj.SolrServerExceptionprotected void index_specific(int serverNumber,
Object... fields)
throws Exception
index_specific in class BaseDistributedSearchTestCaseExceptionprotected void index_specific(org.apache.solr.client.solrj.SolrClient client,
Object... fields)
throws Exception
Exceptionprotected org.apache.solr.common.cloud.ZkCoreNodeProps getLeaderUrlFromZk(String collection, String slice)
protected void del(String q) throws Exception
del in class BaseDistributedSearchTestCaseExceptionprotected void waitForRecoveriesToFinish(boolean verbose)
throws Exception
Exceptionprotected void waitForRecoveriesToFinish(String collection, boolean verbose) throws Exception
Exceptionprotected void waitForRecoveriesToFinish(boolean verbose,
int timeoutSeconds)
throws Exception
Exceptionpublic org.apache.solr.client.solrj.response.QueryResponse queryAndCompareReplicas(org.apache.solr.common.params.SolrParams params,
String shard)
throws Exception
public void queryAndCompareShards(org.apache.solr.common.params.SolrParams params)
throws Exception
ExceptionqueryAndCompareReplicas(SolrParams, String)protected void checkShardConsistency(String shard) throws Exception
Exceptionprotected String checkShardConsistency(String shard, boolean expectFailure, boolean verbose) throws Exception
Exceptionpublic void showCounts()
protected void randomlyEnableAutoSoftCommit()
protected void enableAutoSoftCommit(int time)
protected void checkShardConsistency(boolean checkVsControl,
boolean verbose)
throws Exception
Exceptionprotected void checkShardConsistency(boolean checkVsControl,
boolean verbose,
Set<String> addFails,
Set<String> deleteFails)
throws Exception
Exceptionprotected org.apache.solr.client.solrj.SolrClient getClient(String nodeName)
protected org.apache.solr.client.solrj.response.QueryResponse queryServer(org.apache.solr.common.params.ModifiableSolrParams params)
throws org.apache.solr.client.solrj.SolrServerException,
IOException
queryServer in class BaseDistributedSearchTestCaseorg.apache.solr.client.solrj.SolrServerExceptionIOExceptionpublic void waitForThingsToLevelOut(int waitForRecTimeSeconds)
throws Exception
Exceptionpublic void waitForNoShardInconsistency()
throws Exception
Exceptionpublic void distribTearDown()
throws Exception
distribTearDown in class AbstractDistribZkTestBaseExceptionprotected void destroyServers()
throws Exception
destroyServers in class BaseDistributedSearchTestCaseExceptionprotected void commit()
throws Exception
commit in class BaseDistributedSearchTestCaseExceptionprotected org.apache.solr.client.solrj.response.CollectionAdminResponse createCollection(String collectionName, String configSetName, int numShards, int replicationFactor, int maxShardsPerNode) throws org.apache.solr.client.solrj.SolrServerException, IOException, InterruptedException, TimeoutException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionInterruptedExceptionTimeoutExceptionprotected org.apache.solr.client.solrj.response.CollectionAdminResponse createCollection(Map<String,List<Integer>> collectionInfos, String collectionName, Map<String,Object> collectionProps, org.apache.solr.client.solrj.SolrClient client) throws org.apache.solr.client.solrj.SolrServerException, IOException, InterruptedException, TimeoutException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionInterruptedExceptionTimeoutExceptionprotected org.apache.solr.client.solrj.response.CollectionAdminResponse createCollection(Map<String,List<Integer>> collectionInfos, String collectionName, Map<String,Object> collectionProps, org.apache.solr.client.solrj.SolrClient client, String confSetName) throws org.apache.solr.client.solrj.SolrServerException, IOException, InterruptedException, TimeoutException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionInterruptedExceptionTimeoutExceptionprotected org.apache.solr.client.solrj.response.CollectionAdminResponse createCollection(Map<String,List<Integer>> collectionInfos, String collectionName, String configSetName, int numShards, int replicationFactor, int maxShardsPerNode, org.apache.solr.client.solrj.SolrClient client, String createNodeSetStr) throws org.apache.solr.client.solrj.SolrServerException, IOException, InterruptedException, TimeoutException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionInterruptedExceptionTimeoutExceptionprotected org.apache.solr.client.solrj.response.CollectionAdminResponse createCollection(Map<String,List<Integer>> collectionInfos, String collectionName, int numShards, int replicationFactor, int maxShardsPerNode, org.apache.solr.client.solrj.SolrClient client, String createNodeSetStr, String configName) throws org.apache.solr.client.solrj.SolrServerException, IOException, InterruptedException, TimeoutException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionInterruptedExceptionTimeoutExceptionprotected org.apache.solr.client.solrj.SolrClient createNewSolrClient(int port)
createNewSolrClient in class BaseDistributedSearchTestCaseprotected org.apache.solr.client.solrj.SolrClient createNewSolrClient(int port,
int connectionTimeoutMillis,
int socketTimeoutMillis)
protected org.apache.solr.client.solrj.SolrClient createNewSolrClient(String coreName, int port)
protected org.apache.solr.client.solrj.SolrClient createNewSolrClient(String coreName, int port, int connectionTimeoutMillis, int socketTimeoutMillis)
protected org.apache.solr.client.solrj.SolrClient createNewSolrClient(String collection, String baseUrl)
protected String getBaseUrl(org.apache.solr.client.solrj.impl.HttpSolrClient client)
public static org.apache.solr.common.SolrInputDocument getDoc(Object... fields) throws Exception
Exceptionprotected void checkForCollection(String collectionName, List<Integer> numShardsNumReplicaList, List<String> nodesAllowedToRunShards) throws Exception
Exceptionprotected org.apache.solr.client.solrj.impl.CloudSolrClient getCommonCloudSolrClient()
public static String getUrlFromZk(org.apache.solr.common.cloud.ClusterState clusterState, String collection)
public static void waitForNon403or404or503(org.apache.solr.client.solrj.impl.HttpSolrClient collectionClient)
throws Exception
Exceptionprotected void assertCollectionNotExists(String collectionName, int timeoutSeconds) throws Exception
Exceptionprotected void createCollection(String collName, org.apache.solr.client.solrj.impl.CloudSolrClient client, int replicationFactor, int numShards) throws Exception
Exceptionprotected void createCollectionRetry(String testCollectionName, String configSetName, int numShards, int replicationFactor, int maxShardsPerNode) throws org.apache.solr.client.solrj.SolrServerException, IOException, InterruptedException, TimeoutException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionInterruptedExceptionTimeoutExceptionprotected org.apache.solr.common.cloud.Replica getShardLeader(String testCollectionName, String shardId, int timeoutSecs) throws Exception
Exceptionprotected List<org.apache.solr.common.cloud.Replica> ensureAllReplicasAreActive(String testCollectionName, String shardId, int shards, int rf, int maxWaitSecs) throws Exception
Exceptionprotected String printClusterStateInfo(String collection) throws Exception
Exceptionprotected boolean reloadCollection(org.apache.solr.common.cloud.Replica replica,
String testCollectionName)
throws Exception
Exceptionprotected void logReplicaTypesReplicationInfo(String collectionName, org.apache.solr.common.cloud.ZkStateReader zkStateReader) throws org.apache.zookeeper.KeeperException, InterruptedException, IOException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionIOExceptionprotected void waitForReplicationFromReplicas(String collectionName, org.apache.solr.common.cloud.ZkStateReader zkStateReader, org.apache.solr.util.TimeOut timeout) throws org.apache.zookeeper.KeeperException, InterruptedException, IOException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionIOExceptionprotected void waitForAllWarmingSearchers()
throws InterruptedException
InterruptedExceptionprotected long getIndexVersion(org.apache.solr.common.cloud.Replica replica)
throws IOException
IOExceptionprotected static boolean attemptCollectionDelete(org.apache.solr.client.solrj.impl.CloudSolrClient client,
String collectionName)
protected void logReplicationDetails(org.apache.solr.common.cloud.Replica replica,
StringBuilder builder)
throws IOException
IOExceptionpublic static org.apache.solr.client.solrj.response.RequestStatusState getRequestStateAfterCompletion(String requestId, int waitForSeconds, org.apache.solr.client.solrj.SolrClient client) throws IOException, org.apache.solr.client.solrj.SolrServerException
IOExceptionorg.apache.solr.client.solrj.SolrServerExceptionprotected void setupRestTestHarnesses()
protected void closeRestTestHarnesses()
throws IOException
IOExceptionprotected RestTestHarness randomRestTestHarness()
protected RestTestHarness randomRestTestHarness(Random random)
protected void forAllRestTestHarnesses(UnaryOperator<RestTestHarness> op)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.