org.apache.solr.cloud

## Class AbstractFullDistribZkTestBase

- java.lang.Object
- - org.junit.Assert
  - - org.apache.lucene.util.LuceneTestCase
    - - org.apache.solr.SolrTestCaseJ4
      - - org.apache.solr.BaseDistributedSearchTestCase
        - - org.apache.solr.cloud.AbstractDistribZkTestBase
          - - org.apache.solr.cloud.AbstractFullDistribZkTestBase

-     @LuceneTestCase.Slow
      public abstract class AbstractFullDistribZkTestBase
      extends AbstractDistribZkTestBase

  TODO: we should still test this works as a custom update chain as well as what we test now - the default update chain

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AbstractFullDistribZkTestBase.CloudJettyRunner`

    - ### Nested classes/interfaces inherited from class org.apache.solr.BaseDistributedSearchTestCase

      `BaseDistributedSearchTestCase.RandDate, BaseDistributedSearchTestCase.RandVal, BaseDistributedSearchTestCase.ShardsFixed, BaseDistributedSearchTestCase.ShardsRepeat, BaseDistributedSearchTestCase.ShardsRepeatRule`

    - ### Nested classes/interfaces inherited from class org.apache.solr.SolrTestCaseJ4

      `SolrTestCaseJ4.CloudSolrClientBuilder, SolrTestCaseJ4.Doc, SolrTestCaseJ4.Fld, SolrTestCaseJ4.FldType, SolrTestCaseJ4.FVal, SolrTestCaseJ4.IRange, SolrTestCaseJ4.IVals, SolrTestCaseJ4.IValsPercent, SolrTestCaseJ4.SuppressObjectReleaseTracker, SolrTestCaseJ4.SuppressSSL, SolrTestCaseJ4.SVal, SolrTestCaseJ4.Vals, SolrTestCaseJ4.XmlDoc`

    - ### Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase

      `org.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`

  - ### Field Summary

    Fields
    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 String` | `defaultStateFormat`
    `protected boolean` | `printLayoutOnTearDown`
    `protected Map<URI,SocketProxy>` | `proxies`
    `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`

    - ### Fields inherited from class org.apache.solr.cloud.AbstractDistribZkTestBase

      `DEFAULT_COLLECTION, zkServer`

    - ### Fields inherited from class org.apache.solr.BaseDistributedSearchTestCase

      `clientConnectionTimeout, clients, clientSoTimeout, context, controlClient, controlJetty, deadServers, fieldNames, flags, FUZZY, handle, id, jettys, nThreads, ORDERED, r, randVals, rdate, rdouble, repeatRule, rfloat, rint, rlong, shards, shardsArr, SKIP, SKIPVAL, stress, testDir, UNORDERED, useExplicitNodeNames, verifyStress`

    - ### Fields inherited from class org.apache.solr.SolrTestCaseJ4

      `configString, CORE_PROPERTIES_FILENAME, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_TEST_COLLECTION_NAME, DEFAULT_TEST_CORENAME, h, hdfsDataDir, initCoreDataDir, lrf, ONE_ONE, schemaString, solrClassRules, solrConfig, solrTestRules, sslConfig, SYSTEM_PROPERTY_SOLR_TESTS_MERGEPOLICY, SYSTEM_PROPERTY_SOLR_TESTS_MERGEPOLICYFACTORY, SYSTEM_PROPERTY_SOLR_TESTS_USEMERGEPOLICY, SYSTEM_PROPERTY_SOLR_TESTS_USEMERGEPOLICYFACTORY, testSolrHome, ZERO_ONE, ZERO_TWO`

    - ### Fields inherited from class org.apache.lucene.util.LuceneTestCase

      `assertsAreEnabled, 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_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_SLOW, TEST_THROTTLING, TEST_WEEKLY, VERBOSE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractFullDistribZkTestBase()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `afterClass()`
    `protected void` | `assertCollectionNotExists(String collectionName, int timeoutSeconds)`
    `protected void` | `assertDocCounts(boolean verbose)`
    `static void` | `beforeClass()`
    `static void` | `beforeFullSolrCloudTest()`
    `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` | `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)`
    `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 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, int numShards, int replicationFactor, int maxShardsPerNode)`
    `protected void` | `createCollectionRetry(String testCollectionName, 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(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(String collection, String baseUrl)`
    `org.apache.solr.client.solrj.embedded.JettySolrRunner` | `createProxiedJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride)` 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 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)`
    `protected org.apache.solr.common.SolrInputDocument` | `getDoc(Object... fields)`
    `protected org.apache.solr.client.solrj.embedded.JettySolrRunner` | `getJettyOnPort(int port)`
    `protected int` | `getNextAvailablePort()`
    `protected SocketProxy` | `getProxyForReplica(org.apache.solr.common.cloud.Replica replica)`
    `protected int` | `getReplicaPort(org.apache.solr.common.cloud.Replica replica)`
    `protected org.apache.solr.common.cloud.Replica` | `getShardLeader(String testCollectionName, String shardId, int timeoutSecs)`
    `protected String` | `getStateFormat()`
    `protected int` | `getTotalReplicas(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 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 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()`
    `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 static void` | `waitForCollection(org.apache.solr.common.cloud.ZkStateReader reader, String collection, int slices)`
    `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)`
    `void` | `waitForThingsToLevelOut(int waitForRecTimeSeconds)`

    - ### Methods inherited from class org.apache.solr.cloud.AbstractDistribZkTestBase

      `assertAllActive, beforeThisClass, getCloudSchemaFile, getCloudSolrConfig, printLayout, restartZk, verifyReplicaStatus, waitForCollectionToDisappear, waitForRecoveriesToFinish, waitForRecoveriesToFinish, waitForRecoveriesToFinish`

    - ### Methods inherited from class org.apache.solr.BaseDistributedSearchTestCase

      `add, addFields, addRandFields, buildUrl, clearHostContext, 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, setupJettySolrHome, validateControlData`

    - ### Methods inherited from class org.apache.solr.SolrTestCaseJ4

      `add, addAndGetVersion, adoc, adoc, assertFailedU, assertFailedU, assertFieldValues, assertJQ, assertJQ, assertQ, assertQ, assertQEx, assertQEx, assertQEx, assertSolrInputFieldEquals, assertU, assertU, assertXmlFile, buildJettyConfig, buildUrl, chooseMPForMP, clearIndex, commit, compareSolrDocument, compareSolrDocumentList, compareSolrInputDocument, configset, copyMinConf, copyMinConf, copyMinFullSetup, copySolrHomeToTemp, createComparator, createComparator, createCore, createCoreContainer, createCoreContainer, createCoreContainer, createDefaultCoreContainer, createDoc, createSort, deleteAndGetVersion, deleteByQueryAndGetVersion, deleteCore, delI, delQ, doc, endTrackingSearchers, getClassName, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getConcurrentUpdateSolrClient, getConcurrentUpdateSolrClient, getFile, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getLBHttpSolrClient, getLBHttpSolrClient, getRootCause, getSchemaFile, getSimpleClassName, getSolrConfigFile, getWrappedException, hasInitException, hasInitException, ignoreException, indexDocs, initClassLogLevels, initCore, initCore, initCore, initCore, initMethodLogLevels, invertField, isSSLMode, JQ, json, json, json, jsonAdd, jsonDelId, jsonDelQ, map, newRandomConfig, optimize, params, postSetUp, preTearDown, randomDate, randomSkewedDate, randomXmlUsableUnicodeString, req, req, req, resetExceptionIgnores, resetFactory, restoreMethodLogLevels, sdoc, sdocs, setUp, setupNoCoreTest, setupTestCases, skewed, startTrackingSearchers, systemClearPropertySolrTestsMergePolicy, systemClearPropertySolrTestsMergePolicyFactory, systemSetPropertySolrTestsMergePolicy, systemSetPropertySolrTestsMergePolicyFactory, tearDown, teardownTestCases, TEST_HOME, TEST_PATH, toJSON, unchooseMPForMP, unIgnoreException, updateJ, useFactory, waitForWarming, whitespaceMockTokenizer, whitespaceMockTokenizer, writeCoreProperties, writeCoreProperties`

    - ### Methods inherited from class org.apache.lucene.util.LuceneTestCase

      `addVirusChecker, assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertFieldInfosEquals, assertFieldsEquals, assertFieldStatisticsEquals, assertNormsEquals, assertPointsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, closeAfterSuite, closeAfterTest, collate, createTempDir, createTempDir, createTempFile, createTempFile, dumpArray, dumpIterator, expectThrows, getBaseTempDirForTestClass, getDataInputStream, getDataPath, getOnlyLeafReader, getTestClass, getTestName, 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, 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, wrapReader`

    - ### Methods inherited from class org.junit.Assert

      `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, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SHARD1

          public static final String SHARD1

      See Also:
        Constant Field Values

    - #### SHARD2

          public static final String SHARD2

      See Also:
        Constant Field Values

    - #### printLayoutOnTearDown

          protected boolean printLayoutOnTearDown

    - #### sliceCount

          protected int sliceCount

    - #### controlClientCloud

          protected org.apache.solr.client.solrj.impl.CloudSolrClient controlClientCloud

    - #### cloudClient

          protected volatile org.apache.solr.client.solrj.impl.CloudSolrClient cloudClient

    - #### cloudJettys

          protected List<AbstractFullDistribZkTestBase.CloudJettyRunner> cloudJettys

    - #### shardToJetty

          protected Map<String,List<AbstractFullDistribZkTestBase.CloudJettyRunner>> shardToJetty

    - #### chaosMonkey

          protected ChaosMonkey chaosMonkey

    - #### shardToLeaderJetty

          protected Map<String,AbstractFullDistribZkTestBase.CloudJettyRunner> shardToLeaderJetty

    - #### useJettyDataDir

          protected boolean useJettyDataDir

    - #### proxies

          protected Map<URI,SocketProxy> proxies

    - #### defaultStateFormat

          protected String defaultStateFormat

  - ### Constructor Detail

    - #### AbstractFullDistribZkTestBase

          public AbstractFullDistribZkTestBase()

  - ### Method Detail

    - #### beforeFullSolrCloudTest

          public static void beforeFullSolrCloudTest()

    - #### setErrorHook

          protected static void setErrorHook()

    - #### clearErrorHook

          protected static void clearErrorHook()

    - #### distribSetUp

          public void distribSetUp()
                            throws Exception

      Overrides:
        `distribSetUp` in class `AbstractDistribZkTestBase`
      Throws:
        `Exception`

    - #### beforeClass

          public static void beforeClass()

    - #### afterClass

          public static void afterClass()
                                 throws Exception

      Throws:
        `Exception`

    - #### getDataDir

          protected String getDataDir(String dataDir)
                               throws IOException

      Throws:
        `IOException`

    - #### initCloud

          protected void initCloud()
                            throws Exception

      Throws:
        `Exception`

    - #### createCloudClient

          protected org.apache.solr.client.solrj.impl.CloudSolrClient createCloudClient(String defaultCollection)

    - #### createServers

          protected void createServers(int numServers)
                                throws Exception

      Overrides:
        `createServers` in class `AbstractDistribZkTestBase`
      Throws:
        `Exception`

    - #### waitForCollection

          protected static void waitForCollection(org.apache.solr.common.cloud.ZkStateReader reader,
                                                  String collection,
                                                  int slices)
                                           throws Exception

      Throws:
        `Exception`

    - #### getStateFormat

          protected String getStateFormat()

    - #### createJettys

          protected List<org.apache.solr.client.solrj.embedded.JettySolrRunner> createJettys(int numJettys)
                                                                                      throws Exception

      Throws:
        `Exception`

    - #### getTotalReplicas

          protected int getTotalReplicas(String collection)

    - #### createJetty

          public org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(String dataDir,
                                                                                   String ulogDir,
                                                                                   String shardList,
                                                                                   String solrConfigOverride)
                                                                            throws Exception

      Throws:
        `Exception`

    - #### createJetty

          public org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(File solrHome,
                                                                                   String dataDir,
                                                                                   String shardList,
                                                                                   String solrConfigOverride,
                                                                                   String schemaOverride)
                                                                            throws Exception

      Overrides:
        `createJetty` in class `BaseDistributedSearchTestCase`
      Throws:
        `Exception`

    - #### createProxiedJetty

          public org.apache.solr.client.solrj.embedded.JettySolrRunner createProxiedJetty(File solrHome,
                                                                                          String dataDir,
                                                                                          String shardList,
                                                                                          String solrConfigOverride,
                                                                                          String schemaOverride)
                                                                                   throws Exception

      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.
      Throws:
        `Exception`

    - #### getReplicaPort

          protected int getReplicaPort(org.apache.solr.common.cloud.Replica replica)

    - #### getJettyOnPort

          protected org.apache.solr.client.solrj.embedded.JettySolrRunner getJettyOnPort(int port)

    - #### getProxyForReplica

          protected SocketProxy getProxyForReplica(org.apache.solr.common.cloud.Replica replica)
                                            throws Exception

      Throws:
        `Exception`

    - #### getNextAvailablePort

          protected int getNextAvailablePort()
                                      throws Exception

      Throws:
        `Exception`

    - #### updateMappingsFromZk

          protected void updateMappingsFromZk(List<org.apache.solr.client.solrj.embedded.JettySolrRunner> jettys,
                                              List<org.apache.solr.client.solrj.SolrClient> clients)
                                       throws Exception

      Throws:
        `Exception`

    - #### updateMappingsFromZk

          protected void updateMappingsFromZk(List<org.apache.solr.client.solrj.embedded.JettySolrRunner> jettys,
                                              List<org.apache.solr.client.solrj.SolrClient> clients,
                                              boolean allowOverSharding)
                                       throws Exception

      Throws:
        `Exception`

    - #### setDistributedParams

          protected void setDistributedParams(org.apache.solr.common.params.ModifiableSolrParams params)

      Overrides:
        `setDistributedParams` in class `BaseDistributedSearchTestCase`

    - #### sendDocsWithRetry

          protected int sendDocsWithRetry(List<org.apache.solr.common.SolrInputDocument> batch,
                                          int minRf,
                                          int maxRetries,
                                          int waitBeforeRetry)
                                   throws Exception

      Throws:
        `Exception`

    - #### sendDocsWithRetry

          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)
                                          throws Exception

      Throws:
        `Exception`

    - #### indexDoc

          protected void indexDoc(org.apache.solr.common.SolrInputDocument doc)
                           throws IOException,
                                  org.apache.solr.client.solrj.SolrServerException

      Description copied from class: `BaseDistributedSearchTestCase`
      Indexes the document in both the control client, and a randomly selected client
      Overrides:
        `indexDoc` in class `BaseDistributedSearchTestCase`
      Throws:
        `IOException`
        `org.apache.solr.client.solrj.SolrServerException`

    - #### index_specific

          protected void index_specific(int serverNumber,
                                        Object... fields)
                                 throws Exception

      Overrides:
        `index_specific` in class `BaseDistributedSearchTestCase`
      Throws:
        `Exception`

    - #### index_specific

          protected void index_specific(org.apache.solr.client.solrj.SolrClient client,
                                        Object... fields)
                                 throws Exception

      Throws:
        `Exception`

    - #### del

          protected void del(String q)
                      throws Exception

      Overrides:
        `del` in class `BaseDistributedSearchTestCase`
      Throws:
        `Exception`

    - #### waitForRecoveriesToFinish

          protected void waitForRecoveriesToFinish(boolean verbose)
                                            throws Exception

      Throws:
        `Exception`

    - #### waitForRecoveriesToFinish

          protected void waitForRecoveriesToFinish(String collection,
                                                   boolean verbose)
                                            throws Exception

      Throws:
        `Exception`

    - #### waitForRecoveriesToFinish

          protected void waitForRecoveriesToFinish(boolean verbose,
                                                   int timeoutSeconds)
                                            throws Exception

      Throws:
        `Exception`

    - #### checkQueries

          protected void checkQueries()
                               throws Exception

      Throws:
        `Exception`

    - #### indexAbunchOfDocs

          protected void indexAbunchOfDocs()
                                    throws Exception

      Throws:
        `Exception`

    - #### queryAndCompareReplicas

          public org.apache.solr.client.solrj.response.QueryResponse queryAndCompareReplicas(org.apache.solr.common.params.SolrParams params,
                                                                                             String shard)
                                                                                      throws Exception

      Executes a query against each live and active replica of the specified shard and aserts that the results are identical.
      Throws:
        `Exception`
      See Also:
        `BaseDistributedSearchTestCase.queryAndCompare(org.apache.solr.common.params.SolrParams, org.apache.solr.client.solrj.SolrClient...)`

    - #### queryAndCompareShards

          public void queryAndCompareShards(org.apache.solr.common.params.SolrParams params)
                                     throws Exception

      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. Because results are not compared between replicas of different shards, this method should be safe for comparing the results of any query, even if it contains "distrib=false", because the replicas should all be identical.
      Throws:
        `Exception`
      See Also:
        `queryAndCompareReplicas(SolrParams, String)`

    - #### checkShardConsistency

          protected void checkShardConsistency(String shard)
                                        throws Exception

      Returns a non-null string if replicas within the same shard do not have a consistent number of documents.
      Throws:
        `Exception`

    - #### checkShardConsistency

          protected String checkShardConsistency(String shard,
                                                 boolean expectFailure,
                                                 boolean verbose)
                                          throws Exception

      Returns a non-null string if replicas within the same shard do not have a consistent number of documents. If expectFailure==false, the exact differences found will be logged since this would be an unexpected failure. verbose causes extra debugging into to be displayed, even if everything is consistent.
      Throws:
        `Exception`

    - #### showCounts

          public void showCounts()

    - #### randomlyEnableAutoSoftCommit

          protected void randomlyEnableAutoSoftCommit()

    - #### enableAutoSoftCommit

          protected void enableAutoSoftCommit(int time)

    - #### checkShardConsistency

          protected void checkShardConsistency()
                                        throws Exception

      Throws:
        `Exception`

    - #### checkShardConsistency

          protected void checkShardConsistency(boolean checkVsControl,
                                               boolean verbose)
                                        throws Exception

      Throws:
        `Exception`

    - #### checkShardConsistency

          protected void checkShardConsistency(boolean checkVsControl,
                                               boolean verbose,
                                               Set<String> addFails,
                                               Set<String> deleteFails)
                                        throws Exception

      Throws:
        `Exception`

    - #### getClient

          protected org.apache.solr.client.solrj.SolrClient getClient(String nodeName)

    - #### assertDocCounts

          protected void assertDocCounts(boolean verbose)
                                  throws Exception

      Throws:
        `Exception`

    - #### queryServer

          protected org.apache.solr.client.solrj.response.QueryResponse queryServer(org.apache.solr.common.params.ModifiableSolrParams params)
                                                                             throws org.apache.solr.client.solrj.SolrServerException,
                                                                                    IOException

      Overrides:
        `queryServer` in class `BaseDistributedSearchTestCase`
      Throws:
        `org.apache.solr.client.solrj.SolrServerException`
        `IOException`

    - #### waitForThingsToLevelOut

          public void waitForThingsToLevelOut(int waitForRecTimeSeconds)
                                       throws Exception

      Throws:
        `Exception`

    - #### waitForNoShardInconsistency

          public void waitForNoShardInconsistency()
                                           throws Exception

      Throws:
        `Exception`

    - #### distribTearDown

          public void distribTearDown()
                               throws Exception

      Overrides:
        `distribTearDown` in class `AbstractDistribZkTestBase`
      Throws:
        `Exception`

    - #### commit

          protected void commit()
                         throws Exception

      Overrides:
        `commit` in class `BaseDistributedSearchTestCase`
      Throws:
        `Exception`

    - #### destroyServers

          protected void destroyServers()
                                 throws Exception

      Overrides:
        `destroyServers` in class `BaseDistributedSearchTestCase`
      Throws:
        `Exception`

    - #### createCollection

          protected org.apache.solr.client.solrj.response.CollectionAdminResponse createCollection(String collectionName,
                                                                                                   int numShards,
                                                                                                   int replicationFactor,
                                                                                                   int maxShardsPerNode)
                                                                                            throws org.apache.solr.client.solrj.SolrServerException,
                                                                                                   IOException

      Throws:
        `org.apache.solr.client.solrj.SolrServerException`
        `IOException`

    - #### createCollection

          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)
                                                                                            throws org.apache.solr.client.solrj.SolrServerException,
                                                                                                   IOException

      Throws:
        `org.apache.solr.client.solrj.SolrServerException`
        `IOException`

    - #### createCollection

          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)
                                                                                            throws org.apache.solr.client.solrj.SolrServerException,
                                                                                                   IOException

      Throws:
        `org.apache.solr.client.solrj.SolrServerException`
        `IOException`

    - #### createCollection

          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)
                                                                                            throws org.apache.solr.client.solrj.SolrServerException,
                                                                                                   IOException

      Throws:
        `org.apache.solr.client.solrj.SolrServerException`
        `IOException`

    - #### createCollection

          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)
                                                                                            throws org.apache.solr.client.solrj.SolrServerException,
                                                                                                   IOException

      Throws:
        `org.apache.solr.client.solrj.SolrServerException`
        `IOException`

    - #### createNewSolrClient

          protected org.apache.solr.client.solrj.SolrClient createNewSolrClient(int port)

      Overrides:
        `createNewSolrClient` in class `BaseDistributedSearchTestCase`

    - #### createNewSolrClient

          protected org.apache.solr.client.solrj.SolrClient createNewSolrClient(String collection,
                                                                                String baseUrl)

    - #### getBaseUrl

          protected String getBaseUrl(org.apache.solr.client.solrj.impl.HttpSolrClient client)

    - #### getDoc

          protected org.apache.solr.common.SolrInputDocument getDoc(Object... fields)
                                                             throws Exception

      Throws:
        `Exception`

    - #### checkForCollection

          protected void checkForCollection(String collectionName,
                                            List<Integer> numShardsNumReplicaList,
                                            List<String> nodesAllowedToRunShards)
                                     throws Exception

      Throws:
        `Exception`

    - #### getCommonCloudSolrClient

          protected org.apache.solr.client.solrj.impl.CloudSolrClient getCommonCloudSolrClient()

    - #### getUrlFromZk

          public static String getUrlFromZk(org.apache.solr.common.cloud.ClusterState clusterState,
                                            String collection)

    - #### waitForNon403or404or503

          public static void waitForNon403or404or503(org.apache.solr.client.solrj.impl.HttpSolrClient collectionClient)
                                              throws Exception

      Throws:
        `Exception`

    - #### assertCollectionNotExists

          protected void assertCollectionNotExists(String collectionName,
                                                   int timeoutSeconds)
                                            throws Exception

      Throws:
        `Exception`

    - #### createCollection

          protected void createCollection(String collName,
                                          org.apache.solr.client.solrj.impl.CloudSolrClient client,
                                          int replicationFactor,
                                          int numShards)
                                   throws Exception

      Throws:
        `Exception`

    - #### createCollectionRetry

          protected void createCollectionRetry(String testCollectionName,
                                               int numShards,
                                               int replicationFactor,
                                               int maxShardsPerNode)
                                        throws org.apache.solr.client.solrj.SolrServerException,
                                               IOException

      Throws:
        `org.apache.solr.client.solrj.SolrServerException`
        `IOException`

    - #### getShardLeader

          protected org.apache.solr.common.cloud.Replica getShardLeader(String testCollectionName,
                                                                        String shardId,
                                                                        int timeoutSecs)
                                                                 throws Exception

      Throws:
        `Exception`

    - #### ensureAllReplicasAreActive

          protected List<org.apache.solr.common.cloud.Replica> ensureAllReplicasAreActive(String testCollectionName,
                                                                                          String shardId,
                                                                                          int shards,
                                                                                          int rf,
                                                                                          int maxWaitSecs)
                                                                                   throws Exception

      Throws:
        `Exception`

    - #### printClusterStateInfo

          protected String printClusterStateInfo()
                                          throws Exception

      Throws:
        `Exception`

    - #### printClusterStateInfo

          protected String printClusterStateInfo(String collection)
                                          throws Exception

      Throws:
        `Exception`

    - #### reloadCollection

          protected boolean reloadCollection(org.apache.solr.common.cloud.Replica replica,
                                             String testCollectionName)
                                      throws Exception

      Throws:
        `Exception`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.