From 08b8c573bc2cb80b07640bdd436887fe19869320 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Wed, 22 Jul 2020 00:10:03 +0200 Subject: [PATCH 01/52] SOLR-14660 - Moving HDFS to a Contrib module This commit - moves the code implementing HDFS support to a contrib module which has its own build and tests. - moves block caching implementation to the HDFS contrib module - removes direct references from Solr Core to HDFS - moves test classes which are required both by Core and the HDFS contrib to the test framework - updates the documentation link to refer the HdfsDirectoryFactory from the new location - adds an AwaitsFix annotation to the HDFSRecoveryZKTest which was failing before these changes, needs to be fixed separately - removes the deprecated flags from HDFS classes - removes the deprecated notice from the reference guide After ensuring that the contrib module is on the classpath, HDFS support can be used as before, no changes need to be done to the configuration files. The contrib module is planned to be implemented as a Solr package in a next phase. --- gradle/validation/rat-sources.gradle | 6 + gradle/validation/spotless.gradle | 1 + settings.gradle | 1 + solr/contrib/hdfs/.gitignore | 2 + solr/contrib/hdfs/README.md | 2 + solr/contrib/hdfs/build.gradle | 29 + .../solr/core/HdfsDirectoryFactory.java | 0 .../repository/HdfsBackupRepository.java | 0 .../solr/index/hdfs/CheckHdfsIndex.java | 0 .../apache/solr/index/hdfs/package-info.java | 0 .../apache/solr/store/hdfs/HdfsDirectory.java | 0 .../solr/store/hdfs/HdfsFileWriter.java | 0 .../solr/store/hdfs/HdfsLocalityReporter.java | 0 .../solr/store/hdfs/HdfsLockFactory.java | 0 .../apache/solr/store/hdfs/package-info.java | 0 .../solr/update/HdfsTransactionLog.java | 0 .../org/apache/solr/update/HdfsUpdateLog.java | 0 .../org/apache/solr/util/FSHDFSUtils.java | 0 .../java/org/apache/solr/util/HdfsUtil.java | 0 solr/contrib/hdfs/src/test-files/README | 21 + .../contrib/hdfs/src/test-files/core-site.xml | 23 + solr/contrib/hdfs/src/test-files/log4j2.xml | 43 + .../conf/analyzingInfixSuggest.txt | 5 + .../solr/collection1/conf/bad-currency.xml | 31 + .../collection1/conf/bad-error-solrconfig.xml | 30 + .../collection1/conf/bad-mpf-solrconfig.xml | 37 + .../conf/bad-schema-analyzer-by-name.xml | 32 + .../bad-schema-analyzer-class-and-name-cf.xml | 33 + .../bad-schema-analyzer-class-and-name-tf.xml | 33 + ...bad-schema-analyzer-class-and-name-tok.xml | 32 + .../bad-schema-analyzer-class-and-nested.xml | 35 + .../bad-schema-bogus-analysis-parameters.xml | 28 + .../bad-schema-bogus-field-parameters.xml | 25 + ...bad-schema-codec-global-vs-ft-mismatch.xml | 31 + ...ad-schema-currency-dynamic-multivalued.xml | 30 + .../bad-schema-currency-ft-amount-suffix.xml | 34 + ...d-schema-currency-ft-bogus-code-in-xml.xml | 33 + ...-schema-currency-ft-bogus-default-code.xml | 33 + .../bad-schema-currency-ft-code-suffix.xml | 33 + .../bad-schema-currency-ft-multivalued.xml | 29 + .../bad-schema-currency-ft-oer-norates.xml | 32 + .../conf/bad-schema-currency-multivalued.xml | 30 + ...-currencyfieldtype-bogus-amount-suffix.xml | 34 + ...ma-currencyfieldtype-bogus-code-suffix.xml | 35 + ...-currencyfieldtype-dynamic-multivalued.xml | 36 + ...currencyfieldtype-ft-bogus-code-in-xml.xml | 41 + ...urrencyfieldtype-ft-bogus-default-code.xml | 41 + ...chema-currencyfieldtype-ft-multivalued.xml | 36 + ...chema-currencyfieldtype-ft-oer-norates.xml | 40 + ...urrencyfieldtype-missing-amount-suffix.xml | 34 + ...-currencyfieldtype-missing-code-suffix.xml | 35 + ...d-schema-currencyfieldtype-multivalued.xml | 36 + ...hema-currencyfieldtype-wrong-amount-ft.xml | 36 + ...schema-currencyfieldtype-wrong-code-ft.xml | 35 + ...schema-daterangefield-instance-options.xml | 34 + ...bad-schema-daterangefield-type-options.xml | 35 + .../conf/bad-schema-default-operator.xml | 26 + .../conf/bad-schema-defaultsearchfield.xml | 26 + .../conf/bad-schema-dup-dynamicField.xml | 35 + .../collection1/conf/bad-schema-dup-field.xml | 38 + .../conf/bad-schema-dup-fieldType.xml | 37 + .../bad-schema-dynamicfield-default-val.xml | 29 + .../conf/bad-schema-dynamicfield-required.xml | 29 + .../solr/collection1/conf/bad-schema-eff.xml | 44 + .../collection1/conf/bad-schema-enums.xml | 34 + ...terisk-copyfield-dest-should-fail-test.xml | 27 + ...risk-copyfield-source-should-fail-test.xml | 27 + ...terisk-copyfield-dest-should-fail-test.xml | 25 + ...risk-copyfield-source-should-fail-test.xml | 25 + ...urce-matching-nothing-should-fail-test.xml | 31 + .../conf/bad-schema-nontext-analyzer.xml | 33 + .../conf/bad-schema-not-indexed-but-norms.xml | 35 + .../conf/bad-schema-not-indexed-but-pos.xml | 35 + .../conf/bad-schema-not-indexed-but-tf.xml | 34 + ...ad-schema-not-indexed-but-uninvertible.xml | 35 + .../conf/bad-schema-omit-tf-but-not-pos.xml | 35 + .../bad-schema-sim-default-does-not-exist.xml | 41 + ...schema-sim-default-has-no-explicit-sim.xml | 41 + .../bad-schema-sim-global-vs-ft-mismatch.xml | 34 + .../conf/bad-schema-sweetspot-both-tf.xml | 43 + .../bad-schema-sweetspot-partial-baseline.xml | 39 + ...ad-schema-sweetspot-partial-hyperbolic.xml | 41 + .../bad-schema-sweetspot-partial-norms.xml | 40 + ...chema-uniquekey-diff-type-dynamic-root.xml | 36 + .../bad-schema-uniquekey-diff-type-root.xml | 35 + ...bad-schema-uniquekey-is-copyfield-dest.xml | 31 + .../conf/bad-schema-uniquekey-multivalued.xml | 28 + .../bad-schema-uniquekey-uses-default.xml | 28 + .../conf/bad-schema-uniquekey-uses-points.xml | 28 + .../conf/bad-schema-unsupported-docValues.xml | 26 + ...config-managed-schema-named-schema.xml.xml | 30 + .../conf/bad-solrconfig-multiple-cfs.xml | 32 + .../bad-solrconfig-multiple-dirfactory.xml | 34 + .../bad-solrconfig-multiple-indexconfigs.xml | 35 + .../conf/bad-solrconfig-no-autocommit-tag.xml | 52 + .../conf/bad-solrconfig-nrtmode.xml | 37 + ...rconfig-schema-mutable-but-not-managed.xml | 32 + ...solrconfig-unexpected-schema-attribute.xml | 32 + .../solr/collection1/conf/bad_solrconfig.xml | 28 + .../collection1/conf/blendedInfixSuggest.txt | 3 + .../collection1/conf/compoundDictionary.txt | 19 + .../solr/collection1/conf/currency.xml | 37 + .../solr/collection1/conf/da_UTF8.xml | 1208 +++++++++++++++++ .../conf/da_compoundDictionary.txt | 19 + .../solr/collection1/conf/elevate.xml | 76 ++ .../solr/collection1/conf/enumsConfig.xml | 52 + .../solr/collection1/conf/foo/bar.txt | 1 + .../solr/collection1/conf/freeTextSuggest.txt | 2 + .../solr/collection1/conf/frenchArticles.txt | 24 + .../solr/collection1/conf/fuzzysuggest.txt | 4 + .../solr/collection1/conf/hunspell-test.aff | 13 + .../solr/collection1/conf/hunspell-test.dic | 6 + .../solr/collection1/conf/hyphenation.dtd | 68 + .../solr/collection1/conf/jasuggest.txt | 5 + .../solr/collection1/conf/keep-1.txt | 17 + .../solr/collection1/conf/keep-2.txt | 17 + .../conf/mapping-ISOLatin1Accent.txt | 246 ++++ .../collection1/conf/multiword-synonyms.txt | 15 + .../solr/collection1/conf/old_synonyms.txt | 22 + .../collection1/conf/open-exchange-rates.json | 18 + .../solr/collection1/conf/phrasesuggest.txt | 8 + .../solr/collection1/conf/protected-1.txt | 17 + .../solr/collection1/conf/protected-2.txt | 17 + .../solr/collection1/conf/protwords.txt | 23 + .../conf/regex-boost-processor-test.txt | 10 + .../conf/schema-HighlighterMaxOffsetTest.xml | 85 ++ .../conf/schema-SimpleTextCodec.xml | 32 + ...ema-add-schema-fields-update-processor.xml | 72 + .../conf/schema-analyzer-by-name.xml | 78 ++ .../solr/collection1/conf/schema-behavior.xml | 145 ++ .../collection1/conf/schema-binaryfield.xml | 41 + .../solr/collection1/conf/schema-bm25.xml | 63 + .../conf/schema-booleansimilarity.xml | 35 + .../collection1/conf/schema-charfilters.xml | 47 + ...class-name-shortening-on-serialization.xml | 44 + .../conf/schema-classification.xml | 43 + .../collection1/conf/schema-collate-dv.xml | 59 + .../solr/collection1/conf/schema-collate.xml | 58 + .../conf/schema-copyfield-test.xml | 456 +++++++ .../collection1/conf/schema-custom-field.xml | 44 + .../collection1/conf/schema-customfield.xml | 55 + .../collection1/conf/schema-deprecations.xml | 36 + .../solr/collection1/conf/schema-dfi.xml | 50 + .../solr/collection1/conf/schema-dfr.xml | 64 + .../conf/schema-distrib-interval-faceting.xml | 78 ++ .../conf/schema-distributed-missing-sort.xml | 86 ++ .../collection1/conf/schema-docValues.xml | 81 ++ .../conf/schema-docValuesFaceting.xml | 96 ++ .../collection1/conf/schema-docValuesJoin.xml | 105 ++ .../conf/schema-docValuesMissing.xml | 116 ++ .../conf/schema-docValuesMulti.xml | 49 + .../solr/collection1/conf/schema-eff.xml | 40 + .../solr/collection1/conf/schema-enums.xml | 49 + .../conf/schema-field-sort-values.xml | 36 + .../solr/collection1/conf/schema-folding.xml | 262 ++++ .../solr/collection1/conf/schema-hash.xml | 614 +++++++++ .../solr/collection1/conf/schema-ib.xml | 51 + .../schema-id-and-version-fields-only.xml | 25 + .../conf/schema-inplace-required-field.xml | 35 + .../conf/schema-inplace-updates.xml | 69 + .../collection1/conf/schema-lmdirichlet.xml | 44 + .../conf/schema-lmjelinekmercer.xml | 44 + .../conf/schema-luceneMatchVersion.xml | 52 + .../solr/collection1/conf/schema-minhash.xml | 630 +++++++++ .../conf/schema-minimal-atomic-stress.xml | 38 + .../schema-minimal-with-another-uniqkey.xml | 23 + .../solr/collection1/conf/schema-minimal.xml | 21 + .../conf/schema-multiword-synonyms.xml | 52 + .../solr/collection1/conf/schema-nest.xml | 63 + .../conf/schema-non-stored-docvalues.xml | 74 + .../conf/schema-not-required-unique-key.xml | 38 + .../conf/schema-null-charfilters-analyzer.xml | 27 + .../solr/collection1/conf/schema-numeric.xml | 85 ++ ...-one-field-no-dynamic-field-unique-key.xml | 25 + .../schema-one-field-no-dynamic-field.xml | 24 + .../conf/schema-phrases-identification.xml | 97 ++ .../collection1/conf/schema-phrasesuggest.xml | 56 + .../solr/collection1/conf/schema-point.xml | 187 +++ .../conf/schema-postingshighlight.xml | 46 + .../collection1/conf/schema-preanalyzed.xml | 44 + .../conf/schema-protected-term.xml | 86 ++ .../collection1/conf/schema-pseudo-fields.xml | 74 + .../collection1/conf/schema-rank-fields.xml | 27 + .../collection1/conf/schema-replication1.xml | 38 + .../collection1/conf/schema-replication2.xml | 40 + .../conf/schema-required-fields.xml | 401 ++++++ .../conf/schema-rest-lucene-match-version.xml | 36 + .../solr/collection1/conf/schema-rest.xml | 747 ++++++++++ .../solr/collection1/conf/schema-reversed.xml | 80 ++ .../solr/collection1/conf/schema-root.xml | 34 + .../conf/schema-sim-default-override.xml | 66 + .../solr/collection1/conf/schema-sim.xml | 69 + .../conf/schema-simpleqpplugin.xml | 60 + .../collection1/conf/schema-snippet-field.xml | 3 + .../collection1/conf/schema-snippet-type.xml | 3 + .../conf/schema-snippet-types.incl | 19 + .../collection1/conf/schema-sorting-text.xml | 149 ++ .../conf/schema-sortingresponse.xml | 133 ++ .../solr/collection1/conf/schema-sorts.xml | 314 +++++ .../solr/collection1/conf/schema-spatial.xml | 109 ++ .../collection1/conf/schema-spellchecker.xml | 71 + .../solr/collection1/conf/schema-sql.xml | 650 +++++++++ .../collection1/conf/schema-sweetspot.xml | 69 + .../conf/schema-synonym-tokenizer.xml | 40 + .../solr/collection1/conf/schema-tagger.xml | 187 +++ .../solr/collection1/conf/schema-tfidf.xml | 44 + .../solr/collection1/conf/schema-tiny.xml | 37 + .../conf/schema-tokenizer-test.xml | 125 ++ .../solr/collection1/conf/schema-trie.xml | 324 +++++ .../conf/schema-unifiedhighlight.xml | 45 + .../collection1/conf/schema-version-dv.xml | 33 + .../conf/schema-version-indexed.xml | 33 + .../solr/collection1/conf/schema-xinclude.xml | 26 + .../solr/collection1/conf/schema.xml | 897 ++++++++++++ .../solr/collection1/conf/schema11.xml | 542 ++++++++ .../solr/collection1/conf/schema12.xml | 812 +++++++++++ .../solr/collection1/conf/schema15.xml | 645 +++++++++ .../solr/collection1/conf/schema_codec.xml | 54 + .../solr/collection1/conf/schema_latest.xml | 811 +++++++++++ .../conf/schema_postingsformat.xml | 41 + .../solr/collection1/conf/schemasurround.xml | 609 +++++++++ .../collection1/conf/solrconfig-SOLR-749.xml | 35 + ...-schema-fields-update-processor-chains.xml | 223 +++ .../conf/solrconfig-altdirectory.xml | 27 + .../conf/solrconfig-analytics-query.xml | 276 ++++ .../collection1/conf/solrconfig-basic.xml | 29 + .../conf/solrconfig-cache-enable-disable.xml | 87 ++ .../conf/solrconfig-classification.xml | 68 + .../conf/solrconfig-collapseqparser.xml | 284 ++++ .../conf/solrconfig-components-name.xml | 74 + .../solrconfig-concurrentmergescheduler.xml | 37 + .../solrconfig-configurerecoverystrategy.xml | 28 + .../solrconfig-customrecoverystrategy.xml | 32 + .../conf/solrconfig-dedup-overwrites.xml | 81 ++ .../conf/solrconfig-deeppaging.xml | 76 ++ .../collection1/conf/solrconfig-defaults.xml | 43 + .../conf/solrconfig-delaying-component.xml | 59 + .../conf/solrconfig-delpolicy1.xml | 51 + .../conf/solrconfig-delpolicy2.xml | 48 + ...config-distrib-update-processor-chains.xml | 84 ++ ...solrconfig-doc-expire-update-processor.xml | 96 ++ .../conf/solrconfig-doctransformers.xml | 52 + .../collection1/conf/solrconfig-elevate.xml | 141 ++ .../solrconfig-externalversionconstraint.xml | 174 +++ .../collection1/conf/solrconfig-follower.xml | 59 + .../collection1/conf/solrconfig-follower1.xml | 52 + .../conf/solrconfig-functionquery.xml | 48 + .../solr/collection1/conf/solrconfig-hash.xml | 61 + .../collection1/conf/solrconfig-headers.xml | 32 + .../collection1/conf/solrconfig-highlight.xml | 61 + .../conf/solrconfig-implicitproperties.xml | 69 + ...rconfig-indexconfig-mergepolicyfactory.xml | 31 + .../conf/solrconfig-indexmetrics.xml | 61 + .../conf/solrconfig-infixsuggesters.xml | 101 ++ .../conf/solrconfig-infostream-logging.xml | 29 + .../conf/solrconfig-leader-throttled.xml | 66 + .../collection1/conf/solrconfig-leader.xml | 70 + .../conf/solrconfig-leader1-keepOneBackup.xml | 49 + .../collection1/conf/solrconfig-leader1.xml | 68 + .../collection1/conf/solrconfig-leader2.xml | 66 + .../collection1/conf/solrconfig-leader3.xml | 67 + .../conf/solrconfig-logmergepolicyfactory.xml | 37 + .../conf/solrconfig-managed-schema-test.xml | 27 + .../conf/solrconfig-managed-schema.xml | 83 ++ .../conf/solrconfig-memory-circuitbreaker.xml | 94 ++ .../conf/solrconfig-mergepolicy-defaults.xml | 33 + .../conf/solrconfig-mergepolicy-legacy.xml | 31 + .../solrconfig-mergepolicyfactory-nocfs.xml | 34 + .../collection1/conf/solrconfig-minhash.xml | 516 +++++++ .../collection1/conf/solrconfig-minimal.xml | 65 + .../collection1/conf/solrconfig-nocache.xml | 48 + .../conf/solrconfig-nomergepolicyfactory.xml | 32 + .../collection1/conf/solrconfig-noopregen.xml | 36 + .../collection1/conf/solrconfig-paramset.xml | 89 ++ ...config-parsing-update-processor-chains.xml | 234 ++++ .../solrconfig-phrases-identification.xml | 53 + .../conf/solrconfig-phrasesuggest.xml | 468 +++++++ .../conf/solrconfig-plugcollector.xml | 494 +++++++ .../conf/solrconfig-postingshighlight.xml | 36 + .../conf/solrconfig-query-parser-init.xml | 37 + .../conf/solrconfig-querysender-noquery.xml | 75 + .../conf/solrconfig-querysender.xml | 71 + .../collection1/conf/solrconfig-repeater.xml | 61 + .../conf/solrconfig-replication-legacy.xml | 62 + .../conf/solrconfig-reqHandler.incl | 5 + .../solrconfig-response-log-component.xml | 61 + .../conf/solrconfig-schemaless.xml | 98 ++ .../conf/solrconfig-searcher-listeners1.xml | 51 + .../conf/solrconfig-snippet-processor.xml | 6 + .../conf/solrconfig-solcoreproperties.xml | 36 + .../solrconfig-sortingmergepolicyfactory.xml | 56 + .../conf/solrconfig-sortingresponse.xml | 44 + .../collection1/conf/solrconfig-spatial.xml | 42 + .../conf/solrconfig-spellcheckcomponent.xml | 197 +++ .../conf/solrconfig-spellchecker.xml | 143 ++ .../solr/collection1/conf/solrconfig-sql.xml | 72 + ...uggestercomponent-context-filter-query.xml | 122 ++ .../conf/solrconfig-suggestercomponent.xml | 146 ++ .../collection1/conf/solrconfig-tagger.xml | 59 + .../collection1/conf/solrconfig-test-misc.xml | 53 + .../conf/solrconfig-testxmlparser.xml | 33 + .../solrconfig-tieredmergepolicyfactory.xml | 41 + .../solr/collection1/conf/solrconfig-tlog.xml | 153 +++ .../conf/solrconfig-tolerant-search.xml | 53 + .../solrconfig-tolerant-update-minimal.xml | 40 + .../conf/solrconfig-transformers.xml | 89 ++ .../solrconfig-update-processor-chains.xml | 652 +++++++++ ...config-warmer-randommergepolicyfactory.xml | 46 + .../conf/solrconfig-withgethandler.xml | 52 + .../collection1/conf/solrconfig-xinclude.xml | 36 + .../solrconfig.snippet.randomindexconfig.xml | 51 + .../solr/collection1/conf/solrconfig.xml | 532 ++++++++ .../conf/solrconfig_SimpleTextCodec.xml | 26 + .../collection1/conf/solrconfig_codec.xml | 28 + .../collection1/conf/solrconfig_codec2.xml | 26 + .../solr/collection1/conf/solrconfig_perf.xml | 70 + .../solr/collection1/conf/stemdict.txt | 22 + .../solr/collection1/conf/stop-1.txt | 17 + .../solr/collection1/conf/stop-2.txt | 17 + .../solr/collection1/conf/stop-snowball.txt | 10 + .../solr/collection1/conf/stoptypes-1.txt | 17 + .../solr/collection1/conf/stoptypes-2.txt | 17 + .../solr/collection1/conf/stopwithbom.txt | 1 + .../solr/collection1/conf/stopwords.txt | 58 + .../conf/stopwordsWrongEncoding.txt | 18 + .../solr/collection1/conf/synonyms.txt | 54 + .../solr/collection1/conf/wdftypes.txt | 32 + .../fsdataset/impl/BlockPoolSlice.java | 0 .../namenode/NameNodeResourceChecker.java | 0 .../cloud/MoveReplicaHDFSFailoverTest.java | 0 .../solr/cloud/MoveReplicaHDFSTest.java | 2 +- .../SharedFSAutoReplicaFailoverTest.java | 0 .../HdfsCloudIncrementalBackupTest.java | 0 .../HdfsCollectionsAPIDistributedZkTest.java | 0 .../TestHdfsCloudBackupRestore.java | 0 .../solr/cloud/hdfs/FakeGroupMapping.java | 0 .../cloud/hdfs/HDFSCollectionsAPITest.java | 0 .../hdfs/HdfsBasicDistributedZk2Test.java | 0 .../hdfs/HdfsBasicDistributedZkTest.java | 0 .../HdfsChaosMonkeyNothingIsSafeTest.java | 0 .../hdfs/HdfsChaosMonkeySafeLeaderTest.java | 0 .../solr/cloud/hdfs/HdfsNNFailoverTest.java | 0 .../solr/cloud/hdfs/HdfsRecoverLeaseTest.java | 0 .../solr/cloud/hdfs/HdfsRecoveryZkTest.java | 0 .../hdfs/HdfsRestartWhileUpdatingTest.java | 0 .../solr/cloud/hdfs/HdfsSyncSliceTest.java | 0 .../apache/solr/cloud/hdfs/HdfsTestUtil.java | 0 .../solr/cloud/hdfs/HdfsThreadLeakTest.java | 0 ...fsTlogReplayBufferedWhileIndexingTest.java | 0 .../hdfs/HdfsUnloadDistributedZkTest.java | 0 .../HdfsWriteToMultipleCollectionsTest.java | 0 .../solr/cloud/hdfs/StressHdfsTest.java | 0 .../solr/core/HdfsDirectoryFactoryTest.java | 0 .../HdfsBackupRepositoryIntegrationTest.java | 5 +- .../repository/HdfsBackupRepositoryTest.java | 0 .../handler/TestHdfsBackupRestoreCore.java | 0 .../solr/index/hdfs/CheckHdfsIndexTest.java | 2 +- .../apache/solr/search/TestRecoveryHdfs.java | 0 .../solr/store/blockcache/BlockCacheTest.java | 18 +- .../store/blockcache/BlockDirectoryTest.java | 38 +- .../store/blockcache/BufferStoreTest.java | 8 +- .../solr/store/hdfs/HdfsDirectoryTest.java | 0 .../solr/store/hdfs/HdfsLockFactoryTest.java | 0 .../apache/solr/update/TestHdfsUpdateLog.java | 0 solr/core/build.gradle | 4 +- 365 files changed, 27415 insertions(+), 39 deletions(-) create mode 100644 solr/contrib/hdfs/.gitignore create mode 100644 solr/contrib/hdfs/README.md create mode 100644 solr/contrib/hdfs/build.gradle rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/core/HdfsDirectoryFactory.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/index/hdfs/CheckHdfsIndex.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/index/hdfs/package-info.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/hdfs/package-info.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/update/HdfsTransactionLog.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/update/HdfsUpdateLog.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/util/FSHDFSUtils.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/util/HdfsUtil.java (100%) create mode 100644 solr/contrib/hdfs/src/test-files/README create mode 100644 solr/contrib/hdfs/src/test-files/core-site.xml create mode 100644 solr/contrib/hdfs/src/test-files/log4j2.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-currency.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-error-solrconfig.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-mpf-solrconfig.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-by-name.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-cf.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tf.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tok.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-nested.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-analysis-parameters.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-field-parameters.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-codec-global-vs-ft-mismatch.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-dynamic-multivalued.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-amount-suffix.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-code-in-xml.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-default-code.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-code-suffix.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-multivalued.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-oer-norates.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-multivalued.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-amount-suffix.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-code-suffix.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-dynamic-multivalued.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-code-in-xml.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-default-code.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-multivalued.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-oer-norates.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-amount-suffix.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-code-suffix.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-multivalued.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-amount-ft.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-code-ft.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-instance-options.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-type-options.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-default-operator.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-dynamicField.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-field.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-fieldType.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-default-val.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-required.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-eff.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-enums.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-dest-should-fail-test.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-source-should-fail-test.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-dest-should-fail-test.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-source-should-fail-test.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-non-glob-copyfield-source-matching-nothing-should-fail-test.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-nontext-analyzer.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-norms.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-pos.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-tf.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-uninvertible.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-omit-tf-but-not-pos.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-does-not-exist.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-has-no-explicit-sim.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-global-vs-ft-mismatch.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-both-tf.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-baseline.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-hyperbolic.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-norms.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-dynamic-root.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-root.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-is-copyfield-dest.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-multivalued.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-default.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-points.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-unsupported-docValues.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-managed-schema-named-schema.xml.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-cfs.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-dirfactory.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-indexconfigs.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-no-autocommit-tag.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-nrtmode.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-schema-mutable-but-not-managed.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-unexpected-schema-attribute.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad_solrconfig.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/blendedInfixSuggest.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/compoundDictionary.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/currency.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/da_UTF8.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/da_compoundDictionary.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/elevate.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/enumsConfig.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/foo/bar.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/freeTextSuggest.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/frenchArticles.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/fuzzysuggest.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/hunspell-test.aff create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/hunspell-test.dic create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/hyphenation.dtd create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/jasuggest.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/keep-1.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/keep-2.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/multiword-synonyms.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/old_synonyms.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/open-exchange-rates.json create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/phrasesuggest.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/protected-1.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/protected-2.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/protwords.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/regex-boost-processor-test.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-SimpleTextCodec.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-add-schema-fields-update-processor.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-analyzer-by-name.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-behavior.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-binaryfield.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-booleansimilarity.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-charfilters.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-class-name-shortening-on-serialization.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-classification.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-collate-dv.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-collate.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-copyfield-test.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-custom-field.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-customfield.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-deprecations.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-dfi.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-dfr.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-distributed-missing-sort.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValues.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesJoin.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMissing.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMulti.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-eff.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-enums.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-field-sort-values.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-folding.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-ib.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-id-and-version-fields-only.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-inplace-required-field.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-inplace-updates.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-lmdirichlet.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-lmjelinekmercer.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-luceneMatchVersion.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal-atomic-stress.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal-with-another-uniqkey.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-multiword-synonyms.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-nest.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-non-stored-docvalues.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-not-required-unique-key.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-null-charfilters-analyzer.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-numeric.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field-unique-key.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-phrases-identification.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-point.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-postingshighlight.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-preanalyzed.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-protected-term.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-pseudo-fields.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rank-fields.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-replication1.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-replication2.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-required-fields.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest-lucene-match-version.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-reversed.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-root.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sim-default-override.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sim.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-simpleqpplugin.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-field.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-type.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-types.incl create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sorting-text.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sortingresponse.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sorts.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sql.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sweetspot.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-synonym-tokenizer.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tagger.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tfidf.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tiny.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tokenizer-test.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-unifiedhighlight.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-version-dv.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-version-indexed.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-xinclude.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema11.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema12.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema15.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_codec.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_postingsformat.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-add-schema-fields-update-processor-chains.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-basic.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-classification.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-concurrentmergescheduler.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-configurerecoverystrategy.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-customrecoverystrategy.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-dedup-overwrites.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-deeppaging.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-defaults.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-distrib-update-processor-chains.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doc-expire-update-processor.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower1.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-headers.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-highlight.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexconfig-mergepolicyfactory.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexmetrics.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-infixsuggesters.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader-throttled.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1-keepOneBackup.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader2.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader3.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-logmergepolicyfactory.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema-test.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-memory-circuitbreaker.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-defaults.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicyfactory-nocfs.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-minhash.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-minimal.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-nocache.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-noopregen.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-paramset.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-parsing-update-processor-chains.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrases-identification.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-query-parser-init.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-repeater.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-replication-legacy.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-reqHandler.incl create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-schemaless.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-searcher-listeners1.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-snippet-processor.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingmergepolicyfactory.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingresponse.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spatial.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent-context-filter-query.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tagger.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-testxmlparser.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-search.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-update-minimal.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-transformers.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-warmer-randommergepolicyfactory.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-withgethandler.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_SimpleTextCodec.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec2.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_perf.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stemdict.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-1.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-2.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-snowball.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stoptypes-1.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stoptypes-2.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwithbom.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwords.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwordsWrongEncoding.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/synonyms.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/collection1/conf/wdftypes.txt rename solr/{core => contrib/hdfs}/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java (97%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/api/collections/HdfsCloudIncrementalBackupTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/FakeGroupMapping.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java (95%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java (98%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/search/TestRecoveryHdfs.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java (95%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java (89%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java (92%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java (100%) rename solr/{core => contrib/hdfs}/src/test/org/apache/solr/update/TestHdfsUpdateLog.java (100%) diff --git a/gradle/validation/rat-sources.gradle b/gradle/validation/rat-sources.gradle index c422ba8e3ec..3b815dc6e8c 100644 --- a/gradle/validation/rat-sources.gradle +++ b/gradle/validation/rat-sources.gradle @@ -102,6 +102,12 @@ allprojects { exclude "src/test-files/META-INF/services/*" break + case ":solr:contrib:hdfs": + exclude "src/test-files/**/*.aff" + exclude "src/test-files/**/*.dic" + exclude "src/test-files/**/*.incl" + break + case ":solr:contrib:langid": exclude "**/langdetect-profiles/*" break diff --git a/gradle/validation/spotless.gradle b/gradle/validation/spotless.gradle index a0b10b0a2b1..29d883833ab 100644 --- a/gradle/validation/spotless.gradle +++ b/gradle/validation/spotless.gradle @@ -49,6 +49,7 @@ configure(project(":solr").subprojects) { prj -> case ":solr:contrib:clustering": case ":solr:contrib:extraction": case ":solr:contrib:gcs-repository": + case ":solr:contrib:hdfs": case ":solr:contrib:langid": case ":solr:contrib:ltr": case ":solr:contrib:prometheus-exporter": diff --git a/settings.gradle b/settings.gradle index 1f68a4a5174..d5e1ee0efd5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -40,6 +40,7 @@ include "solr:contrib:s3-repository" include "solr:contrib:scripting" include "solr:contrib:ltr" include "solr:contrib:gcs-repository" +include "solr:contrib:hdfs" include "solr:webapp" include "solr:benchmark" include "solr:test-framework" diff --git a/solr/contrib/hdfs/.gitignore b/solr/contrib/hdfs/.gitignore new file mode 100644 index 00000000000..1060af53126 --- /dev/null +++ b/solr/contrib/hdfs/.gitignore @@ -0,0 +1,2 @@ +# IDEA project file +hdfs.iml diff --git a/solr/contrib/hdfs/README.md b/solr/contrib/hdfs/README.md new file mode 100644 index 00000000000..50c4b460adf --- /dev/null +++ b/solr/contrib/hdfs/README.md @@ -0,0 +1,2 @@ +The HDFS contrib plugin for Solr provides support for the Hadoop Distributed File System storage. + diff --git a/solr/contrib/hdfs/build.gradle b/solr/contrib/hdfs/build.gradle new file mode 100644 index 00000000000..c06e1549376 --- /dev/null +++ b/solr/contrib/hdfs/build.gradle @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +apply plugin: 'java-library' + +description = 'HDFS Package' + +dependencies { + implementation project(':solr:core') + testImplementation project(':solr:test-framework') + testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } + testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } + testImplementation ('org.apache.hadoop:hadoop-hdfs::tests') { transitive = false } + testImplementation ('org.apache.hadoop:hadoop-minikdc') { transitive = false } +} diff --git a/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java b/solr/contrib/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java similarity index 100% rename from solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java rename to solr/contrib/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java diff --git a/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java b/solr/contrib/hdfs/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java similarity index 100% rename from solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java rename to solr/contrib/hdfs/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java diff --git a/solr/core/src/java/org/apache/solr/index/hdfs/CheckHdfsIndex.java b/solr/contrib/hdfs/src/java/org/apache/solr/index/hdfs/CheckHdfsIndex.java similarity index 100% rename from solr/core/src/java/org/apache/solr/index/hdfs/CheckHdfsIndex.java rename to solr/contrib/hdfs/src/java/org/apache/solr/index/hdfs/CheckHdfsIndex.java diff --git a/solr/core/src/java/org/apache/solr/index/hdfs/package-info.java b/solr/contrib/hdfs/src/java/org/apache/solr/index/hdfs/package-info.java similarity index 100% rename from solr/core/src/java/org/apache/solr/index/hdfs/package-info.java rename to solr/contrib/hdfs/src/java/org/apache/solr/index/hdfs/package-info.java diff --git a/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java diff --git a/solr/core/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java diff --git a/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java diff --git a/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java diff --git a/solr/core/src/java/org/apache/solr/store/hdfs/package-info.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/package-info.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/hdfs/package-info.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/package-info.java diff --git a/solr/core/src/java/org/apache/solr/update/HdfsTransactionLog.java b/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsTransactionLog.java similarity index 100% rename from solr/core/src/java/org/apache/solr/update/HdfsTransactionLog.java rename to solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsTransactionLog.java diff --git a/solr/core/src/java/org/apache/solr/update/HdfsUpdateLog.java b/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsUpdateLog.java similarity index 100% rename from solr/core/src/java/org/apache/solr/update/HdfsUpdateLog.java rename to solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsUpdateLog.java diff --git a/solr/core/src/java/org/apache/solr/util/FSHDFSUtils.java b/solr/contrib/hdfs/src/java/org/apache/solr/util/FSHDFSUtils.java similarity index 100% rename from solr/core/src/java/org/apache/solr/util/FSHDFSUtils.java rename to solr/contrib/hdfs/src/java/org/apache/solr/util/FSHDFSUtils.java diff --git a/solr/core/src/java/org/apache/solr/util/HdfsUtil.java b/solr/contrib/hdfs/src/java/org/apache/solr/util/HdfsUtil.java similarity index 100% rename from solr/core/src/java/org/apache/solr/util/HdfsUtil.java rename to solr/contrib/hdfs/src/java/org/apache/solr/util/HdfsUtil.java diff --git a/solr/contrib/hdfs/src/test-files/README b/solr/contrib/hdfs/src/test-files/README new file mode 100644 index 00000000000..10f878acccb --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/README @@ -0,0 +1,21 @@ + + +This directory is where any non-transient, non-java files needed +for the execution of tests should live. + +It is used as the CWD when running JUnit tests. diff --git a/solr/contrib/hdfs/src/test-files/core-site.xml b/solr/contrib/hdfs/src/test-files/core-site.xml new file mode 100644 index 00000000000..994ca6d8772 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/core-site.xml @@ -0,0 +1,23 @@ + + + + + hadoop.security.group.mapping + org.apache.solr.cloud.hadoop.FakeGroupMapping + + diff --git a/solr/contrib/hdfs/src/test-files/log4j2.xml b/solr/contrib/hdfs/src/test-files/log4j2.xml new file mode 100644 index 00000000000..de7954e3929 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/log4j2.xml @@ -0,0 +1,43 @@ + + + + + + + + + %maxLen{%-4r %-5p (%t) [%X{node_name} %X{collection} %X{shard} %X{replica} %X{core} %X{trace_id}] %c{1.} %m%notEmpty{ + =>%ex{short}}}{10240}%n + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt new file mode 100644 index 00000000000..6d276c33a16 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt @@ -0,0 +1,5 @@ +# simple AnalyzingInfix suggest phrase dictionary for testing +Japanese Autocomplete and Japanese Highlighter broken +Add Japanese Kanji number normalization to Kuromoji +Add decompose compound Japanese Katakana token capability to Kuromoji +This is just another entry! \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-currency.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-currency.xml new file mode 100644 index 00000000000..d7aeeeb2331 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-currency.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-error-solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-error-solrconfig.xml new file mode 100644 index 00000000000..c8bb8cf66e3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-error-solrconfig.xml @@ -0,0 +1,30 @@ + + + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-mpf-solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-mpf-solrconfig.xml new file mode 100644 index 00000000000..19d786056ad --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-mpf-solrconfig.xml @@ -0,0 +1,37 @@ + + + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + 8 + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-by-name.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-by-name.xml new file mode 100644 index 00000000000..ec3e2ce3198 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-by-name.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-cf.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-cf.xml new file mode 100644 index 00000000000..4c0252a02f2 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-cf.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tf.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tf.xml new file mode 100644 index 00000000000..d60aa06b14d --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tf.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tok.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tok.xml new file mode 100644 index 00000000000..3f89f7202b6 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tok.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-nested.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-nested.xml new file mode 100644 index 00000000000..8321405c120 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-nested.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-analysis-parameters.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-analysis-parameters.xml new file mode 100644 index 00000000000..82ce742967c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-analysis-parameters.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-field-parameters.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-field-parameters.xml new file mode 100644 index 00000000000..e9272865b53 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-field-parameters.xml @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-codec-global-vs-ft-mismatch.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-codec-global-vs-ft-mismatch.xml new file mode 100644 index 00000000000..5c8e4e330f0 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-codec-global-vs-ft-mismatch.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-dynamic-multivalued.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-dynamic-multivalued.xml new file mode 100644 index 00000000000..9956c391fc3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-dynamic-multivalued.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-amount-suffix.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-amount-suffix.xml new file mode 100644 index 00000000000..bafdb37d722 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-amount-suffix.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-code-in-xml.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-code-in-xml.xml new file mode 100644 index 00000000000..879daa2aae9 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-code-in-xml.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-default-code.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-default-code.xml new file mode 100644 index 00000000000..4c47f6b50ed --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-default-code.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-code-suffix.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-code-suffix.xml new file mode 100644 index 00000000000..06973f46fa8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-code-suffix.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-multivalued.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-multivalued.xml new file mode 100644 index 00000000000..ccd014b6714 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-multivalued.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-oer-norates.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-oer-norates.xml new file mode 100644 index 00000000000..a1d664cd027 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-oer-norates.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-multivalued.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-multivalued.xml new file mode 100644 index 00000000000..984445669ff --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-multivalued.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-amount-suffix.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-amount-suffix.xml new file mode 100644 index 00000000000..37b6d200f16 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-amount-suffix.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-code-suffix.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-code-suffix.xml new file mode 100644 index 00000000000..717245533fd --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-code-suffix.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-dynamic-multivalued.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-dynamic-multivalued.xml new file mode 100644 index 00000000000..2fba82a6aec --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-dynamic-multivalued.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-code-in-xml.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-code-in-xml.xml new file mode 100644 index 00000000000..3b5c69535ac --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-code-in-xml.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-default-code.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-default-code.xml new file mode 100644 index 00000000000..27483729127 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-default-code.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-multivalued.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-multivalued.xml new file mode 100644 index 00000000000..6afcea452e6 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-multivalued.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-oer-norates.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-oer-norates.xml new file mode 100644 index 00000000000..8d8533d75ed --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-oer-norates.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-amount-suffix.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-amount-suffix.xml new file mode 100644 index 00000000000..77a531d5b32 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-amount-suffix.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-code-suffix.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-code-suffix.xml new file mode 100644 index 00000000000..89c70801055 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-code-suffix.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-multivalued.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-multivalued.xml new file mode 100644 index 00000000000..9e95458331d --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-multivalued.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-amount-ft.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-amount-ft.xml new file mode 100644 index 00000000000..51881901279 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-amount-ft.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-code-ft.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-code-ft.xml new file mode 100644 index 00000000000..c3eadc1e019 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-code-ft.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-instance-options.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-instance-options.xml new file mode 100644 index 00000000000..3b040c20e1f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-instance-options.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-type-options.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-type-options.xml new file mode 100644 index 00000000000..9489cf13aa5 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-type-options.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-default-operator.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-default-operator.xml new file mode 100644 index 00000000000..3de607c42b3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-default-operator.xml @@ -0,0 +1,26 @@ + + + + + + + id + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml new file mode 100644 index 00000000000..9567e30dd48 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml @@ -0,0 +1,26 @@ + + + + + + + id + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-dynamicField.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-dynamicField.xml new file mode 100644 index 00000000000..48990d628b3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-dynamicField.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-field.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-field.xml new file mode 100644 index 00000000000..aee203e6a6e --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-field.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-fieldType.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-fieldType.xml new file mode 100644 index 00000000000..ac48c515ae2 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-fieldType.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-default-val.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-default-val.xml new file mode 100644 index 00000000000..a4a7444f333 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-default-val.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-required.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-required.xml new file mode 100644 index 00000000000..359fa1b2079 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-required.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-eff.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-eff.xml new file mode 100644 index 00000000000..da662819f77 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-eff.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + id + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-enums.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-enums.xml new file mode 100644 index 00000000000..675f45efab5 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-enums.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + id + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-dest-should-fail-test.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-dest-should-fail-test.xml new file mode 100644 index 00000000000..8b680721d00 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-dest-should-fail-test.xml @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-source-should-fail-test.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-source-should-fail-test.xml new file mode 100644 index 00000000000..9f9ed989f65 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-source-should-fail-test.xml @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-dest-should-fail-test.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-dest-should-fail-test.xml new file mode 100644 index 00000000000..582f2d58356 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-dest-should-fail-test.xml @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-source-should-fail-test.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-source-should-fail-test.xml new file mode 100644 index 00000000000..ee892445d60 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-source-should-fail-test.xml @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-non-glob-copyfield-source-matching-nothing-should-fail-test.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-non-glob-copyfield-source-matching-nothing-should-fail-test.xml new file mode 100644 index 00000000000..d01ed87b141 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-non-glob-copyfield-source-matching-nothing-should-fail-test.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-nontext-analyzer.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-nontext-analyzer.xml new file mode 100644 index 00000000000..a8b6642d6bc --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-nontext-analyzer.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-norms.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-norms.xml new file mode 100644 index 00000000000..4b39ba4e21e --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-norms.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-pos.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-pos.xml new file mode 100644 index 00000000000..476a0b0a2c4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-pos.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-tf.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-tf.xml new file mode 100644 index 00000000000..3c56a57bb0d --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-tf.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-uninvertible.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-uninvertible.xml new file mode 100644 index 00000000000..8f814dfe19e --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-uninvertible.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-omit-tf-but-not-pos.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-omit-tf-but-not-pos.xml new file mode 100644 index 00000000000..827879e25df --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-omit-tf-but-not-pos.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-does-not-exist.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-does-not-exist.xml new file mode 100644 index 00000000000..eeb0242541f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-does-not-exist.xml @@ -0,0 +1,41 @@ + + + + + + + + ft-does-not-exist + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-has-no-explicit-sim.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-has-no-explicit-sim.xml new file mode 100644 index 00000000000..fef7f1f296b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-has-no-explicit-sim.xml @@ -0,0 +1,41 @@ + + + + + + + + ft-has-no-sim + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-global-vs-ft-mismatch.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-global-vs-ft-mismatch.xml new file mode 100644 index 00000000000..c8406ea33bd --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-global-vs-ft-mismatch.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-both-tf.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-both-tf.xml new file mode 100644 index 00000000000..64a41baa7a5 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-both-tf.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + 6.0 + 1.5 + 3.3 + 7.7 + 5.0 + 5.0 + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-baseline.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-baseline.xml new file mode 100644 index 00000000000..6605a51b5f8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-baseline.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + 6.0 + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-hyperbolic.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-hyperbolic.xml new file mode 100644 index 00000000000..e1ced325247 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-hyperbolic.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + 3.3 + + 5.0 + 5.0 + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-norms.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-norms.xml new file mode 100644 index 00000000000..eae48aa43ca --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-norms.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + 3 + + 0.5 + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-dynamic-root.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-dynamic-root.xml new file mode 100644 index 00000000000..4f06bd1270c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-dynamic-root.xml @@ -0,0 +1,36 @@ + + + + + + + + + id + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-root.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-root.xml new file mode 100644 index 00000000000..377762d0443 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-root.xml @@ -0,0 +1,35 @@ + + + + + + + + + id + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-is-copyfield-dest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-is-copyfield-dest.xml new file mode 100644 index 00000000000..19db42d5554 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-is-copyfield-dest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-multivalued.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-multivalued.xml new file mode 100644 index 00000000000..a1c384f8e0f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-multivalued.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-default.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-default.xml new file mode 100644 index 00000000000..2c7583abf81 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-default.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-points.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-points.xml new file mode 100644 index 00000000000..ac4fd9c4a2d --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-points.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-unsupported-docValues.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-unsupported-docValues.xml new file mode 100644 index 00000000000..9741a387e24 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-schema-unsupported-docValues.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-managed-schema-named-schema.xml.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-managed-schema-named-schema.xml.xml new file mode 100644 index 00000000000..b9778f4d01e --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-managed-schema-named-schema.xml.xml @@ -0,0 +1,30 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + false + schema.xml + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-cfs.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-cfs.xml new file mode 100644 index 00000000000..eef7d740673 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-cfs.xml @@ -0,0 +1,32 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + true + false + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-dirfactory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-dirfactory.xml new file mode 100644 index 00000000000..89b9451ca5d --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-dirfactory.xml @@ -0,0 +1,34 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-indexconfigs.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-indexconfigs.xml new file mode 100644 index 00000000000..b93843f1b25 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-indexconfigs.xml @@ -0,0 +1,35 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + true + + + + ${useCompoundFile:false} + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-no-autocommit-tag.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-no-autocommit-tag.xml new file mode 100644 index 00000000000..1040db64671 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-no-autocommit-tag.xml @@ -0,0 +1,52 @@ + + + + + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + 5k + + + + + + + + explicit + true + text + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-nrtmode.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-nrtmode.xml new file mode 100644 index 00000000000..02f53e3a9d7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-nrtmode.xml @@ -0,0 +1,37 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + false + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-schema-mutable-but-not-managed.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-schema-mutable-but-not-managed.xml new file mode 100644 index 00000000000..50cd09fe495 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-schema-mutable-but-not-managed.xml @@ -0,0 +1,32 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + false + schema.xml + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-unexpected-schema-attribute.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-unexpected-schema-attribute.xml new file mode 100644 index 00000000000..ec2e9affb3c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-unexpected-schema-attribute.xml @@ -0,0 +1,32 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + false + managed-schema + bogusValue + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad_solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad_solrconfig.xml new file mode 100644 index 00000000000..e24df5846fd --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/bad_solrconfig.xml @@ -0,0 +1,28 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${unset.sys.property} + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/blendedInfixSuggest.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/blendedInfixSuggest.txt new file mode 100644 index 00000000000..c3b3d340bb7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/blendedInfixSuggest.txt @@ -0,0 +1,3 @@ +top of the lake 18 lake +star wars: episode v - the empire strikes back 12 star +the returned 10 ret diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/compoundDictionary.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/compoundDictionary.txt new file mode 100644 index 00000000000..f4977b5df72 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/compoundDictionary.txt @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# A set of words for testing the DictionaryCompound factory +soft +ball +team diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/currency.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/currency.xml new file mode 100644 index 00000000000..6a12b32b2a8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/currency.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/da_UTF8.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/da_UTF8.xml new file mode 100644 index 00000000000..2c8d203be68 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/da_UTF8.xml @@ -0,0 +1,1208 @@ + + + + + + + + + + +aA +bB +cC +dD +eE +fF +gG +hH +iI +jJ +kK +lL +mM +nN +oO +pP +qQ +rR +sS +tT +uU +vV +wW +xX +yY +zZ +æÆ +øØ +åÅ + + + +.ae3 +.an3k +.an1s +.be5la +.be1t +.bi4tr +.der3i +.diagno5 +.her3 +.hoved3 +.ne4t5 +.om1 +.ove4 +.po1 +.til3 +.yd5r +ab5le +3abst +a3c +ade5la +5adg +a1e +5afg +5a4f1l +af3r +af4ri +5afs +a4gef +a4gi +ag5in +ag5si +3agti +a4gy +a3h +ais5t +a3j +a5ka +a3ke +a5kr +aku5 +a3la +a1le +a1li +al3k +4alkv +a1lo +al5si +a3lu +a1ly +am4pa +3analy +an4k5r +a3nu +3anv +a5o +a5pe +a3pi +a5po +a1ra +ar5af +1arb +a1re +5arg +a1ri +a3ro +a3sa +a3sc +a1si +a3sk +a3so +3a3sp +a3ste +a3sti +a1ta1 +a1te +a1ti +a4t5in +a1to +ato5v +a5tr +a1tu +a5va +a1ve +a5z +1ba +ba4ti +4bd +1be +be1k +be3ro +be5ru +be1s4 +be1tr +1bi +bi5sk +b1j +4b1n +1bo +bo4gr +bo3ra +bo5re +1br4 +4bs +bs5k +b3so +b1st +b5t +3bu +bu4s5tr +b5w +1by +by5s +4c1c +1ce +ce5ro +3ch +4ch. +ci4o +ck3 +5cy +3da +4d3af +d5anta +da4s +d1b +d1d4 +1de +de5d +4de4lem +der5eri +de4rig +de5sk +d1f +d1g +d3h +1di +di1e +di5l +d3j +d1k +d1l +d1m +4d1n +3do +4dop +d5ov +d1p +4drett +5d4reve +3drif +3driv +d5ros +d5ru +ds5an +ds5in +d1ski +d4sm +d4su +dsu5l +ds5vi +d3ta +d1te +dt5o +d5tr +dt5u +1du +dub5 +d1v +3dy +e5ad +e3af +e5ag +e3ak +e1al +ea4la +e3an +e5ap +e3at +e3bl +ebs3 +e1ci +ed5ar +edde4 +eddel5 +e4do +ed5ra +ed3re +ed3rin +ed4str +e3e +3eff +e3fr +3eft +e3gu +e1h +e3in +ei5s +e3je +e4j5el +e1ka +e3ke +e3kl +4e1ko +e5kr +ek5sa +3eksem +3eksp +e3ku +e1kv +e5ky +e3lad +el3ak +el3ar +e1las +e3le +e4lek +3elem +e1li +5elim +e3lo +el5sa +e5lu +e3ly +e4mad +em4p5le +em1s +en5ak +e4nan +4enn +e4no +en3so +e5nu +e5ol +e3op +e1or +e3ov +epi3 +e1pr +e3ra +er3af +e4rag +e4rak +e1re +e4ref +er5ege +5erhv +e1ri +e4rib +er1k +ero5d +er5ov +er3s +er5tr +e3rum +er5un +e5ry +e1ta +e1te +etek4s +e1ti +e3tj +e1to +e3tr +e3tu +e1ty +e3um +e3un +3eur +e1va +e3ve +e4v3erf +e1vi +e5x +1fa +fa4ce +fags3 +f1b +f1d +1fe +fej4 +fejl1 +f1f +f1g +f1h +1fi +f1k +3fl +1fo +for1en +fo4ri +f1p +f1s4 +4ft +f3ta +f1te +f1ti +f5to +f5tvi +1fu +f1v +3fy +1ga +g3art +g1b +g1d +1ge +4g5enden +ger3in +ge3s +g3f +g1g +g1h +1gi +gi4b +gi3st +5gj +g3k +g1l +g1m +3go +4g5om +g5ov +g3p +1gr +gs1a +gsde4len +g4se +gsha4 +g5sla +gs3or +gs1p +g5s4tide +g4str +gs1v +g3ta +g1te +g1ti +g5to +g3tr +gt4s +g3ud +gun5 +g3v +1gy +g5yd +4ha. +heds3 +he5s +4het +hi4e +hi4n5 +hi3s +ho5ko +ho5ve +4h3t +hun4 +hund3 +hvo4 +i1a +i3b +i4ble +i1c +i3dr +ids5k +i1el +i1en +i3er +i3et. +if3r +i3gu +i3h +i5i +i5j +i1ka +i1ke +ik1l +i5ko +ik3re +ik5ri +iks5t +ik4tu +i3ku +ik3v +i3lag +il3eg +il5ej +il5el +i3li +i4l5id +il3k +i1lo +il5u +i3mu +ind3t +5inf +ings1 +in3s +in4sv +inter1 +i3nu +i3od +i3og +i5ok +i3ol +ion4 +ions1 +i5o5r +i3ot +i5pi +i3pli +i5pr +i3re +i3ri +ir5t +i3sc +i3si +i4sm +is3p +i1ster +i3sti +i5sua +i1ta +i1te +i1ti +i3to +i3tr +it5re. +i1tu +i3ty +i1u +i1va +i1ve +i1vi +j3ag +jde4rer +jds1 +jek4to +4j5en. +j5k +j3le +j3li +jlmeld5 +jlmel4di +j3r +jre5 +ju3s +5kap +k5au +5kav +k5b +kel5s +ke3sk +ke5st +ke4t5a +k3h +ki3e +ki3st +k1k +k5lak +k1le +3klu +k4ny +5kod +1kon +ko3ra +3kort +ko3v +1kra +5kry +ks3an +k1si +ks3k +ks1p +k3ste +k5stu +ks5v +k1t +k4tar +k4terh +kti4e +kt5re +kt5s +3kur +1kus +3kut +k4vo +k4vu +5lab +lad3r +5lagd +la4g3r +5lam +1lat +l1b +ldiagnos5 +l3dr +ld3st +1le. +5led +4lele +le4mo +3len +1ler +1les +4leu +l1f +lfin4 +lfind5 +l1go1 +l3h +li4ga +4l5ins +4l3int +li5o +l3j +l1ke +l1ko +l3ky +l1l +l5mu +lo4du +l3op +4l5or +3lov +4l3p +l4ps +l3r +4ls +lses1 +ls5in +l5sj +l1ta +l4taf +l1te +l4t5erf +l3ti +lt3o +l3tr +l3tu +lu5l +l3ve +l3vi +1ma +m1b +m3d +1me +4m5ej +m3f +m1g +m3h +1mi +mi3k +m5ing +mi4o +mi5sty +m3k +m1l +m1m +mmen5 +m1n +3mo +mo4da +4mop +4m5ov +m1pe +m3pi +m3pl +m1po +m3pr +m1r +mse5s +ms5in +m5sk +ms3p +m3ste +ms5v +m3ta +m3te +m3ti +m3tr +m1ud +1mul +mu1li +3my +3na +4nak +1nal +n1b +n1c +4nd +n3dr +nd5si +nd5sk +nd5sp +1ne +ne5a +ne4da +nemen4 +nement5e +neo4 +n3erk +n5erl +ne5sl +ne5st +n1f +n4go +4n1h +1ni +4nim +ni5o +ni3st +n1ke +n1ko +n3kr +n3ku +n5kv +4n1l +n1m +n1n +1no +n3ord +n5p +n3r +4ns +n3si +n1sku +ns3po +n1sta +n5sti +n1ta +nta4le +n1te +n1ti +ntiali4 +n3to +n1tr +nt4s5t +nt4su +n3tu +n3ty +4n1v +3ny +n3z +o3a +o4as +ob3li +o1c +o4din +od5ri +od5s +od5un +o1e +of5r +o4gek +o4gel +o4g5o +og5re +og5sk +o5h +o5in +oi6s5e +o1j +o3ka +o1ke +o3ku +o3la +o3le +o1li +o1lo +o3lu +o5ly +1omr +on3k +ook5 +o3or +o5ov +o3pi +op3l +op3r +op3s +3opta +4or. +or1an +3ordn +ord5s +o3re. +o3reg +o3rek +o3rer +o3re3s +o3ret +o3ri +3orient +or5im +o4r5in +or3k +or5o +or3sl +or3st +o3si +o3so +o3t +o1te +o5un +ov4s +3pa +pa5gh +p5anl +p3d +4pec +3pen +1per +pe1ra +pe5s +pe3u +p3f +4p5h +1pla +p4lan +4ple. +4pler +4ples +p3m +p3n +5pok +4po3re +3pot +4p5p4 +p4ro +1proc +p3sk +p5so +ps4p +p3st +p1t +1pu +pu5b +p5ule +p5v +5py3 +qu4 +4raf +ra5is +4rarb +r1b +r4d5ar +r3dr +rd4s3 +4reks +1rel +re5la +r5enss +5rese +re5spo +4ress +re3st +re5s4u +5rett +r1f +r1gu +r1h +ri1e +ri5la +4rimo +r4ing +ringse4 +ringso4r +4rinp +4rint +r3ka +r1ke +r1ki +rk3so +r3ku +r1l +rmo4 +r5mu +r1n +ro1b +ro3p +r3or +r3p +r1r +rre5s +rro4n5 +r1sa +r1si +r5skr +r4sk5v +rs4n +r3sp +r5stu +r5su +r3sv +r5tal +r1te +r4teli +r1ti +r3to +r4t5or +rt5rat +rt3re +r5tri +r5tro +rt3s +r5ty +r3ud +run4da +5rut +r3va +r1ve +r3vi +ry4s +s3af +1sam +sa4ma +s3ap +s1ar +1sat +4s1b +s1d +sdy4 +1se +s4ed +5s4er +se4se +s1f +4s1g4 +4s3h +si4bl +1sig +s5int +5sis +5sit +5siu +s5ju +4sk. +1skab +1ske +s3kl +sk5s4 +5sky +s1le +s1li +slo3 +5slu +s5ly +s1m +s4my +4snin +s4nit +so5k +5sol +5som. +3somm +s5oms +5somt +3son +4s1op +sp4 +3spec +4sper +3s4pi +s1pl +3sprog. +s5r4 +s1s4 +4st. +5s4tam +1stan +st5as +3stat +1stav +1ste. +1sted +3stel +5stemo +1sten +5step +3ster. +3stes +5stet +5stj +3sto +st5om +1str +s1ud +3sul +s3un +3sur +s3ve +3s4y +1sy1s +5ta. +1tag +tands3 +4tanv +4tb +tede4l +teds5 +3teg +5tekn +teo1 +5term +te5ro +4t1f +6t3g +t1h +tialis5t +3tid +ti4en +ti3st +4t3k +4t1l +tli4s5 +t1m +t1n +to5ra +to1re +to1ri +tor4m +4t3p +t4ra +4tres +tro5v +1try +4ts +t3si +ts4pa +ts5pr +t3st +ts5ul +4t1t +t5uds +5tur +t5ve +1typ +u1a +5udl +ud5r +ud3s +3udv +u1e +ue4t5 +uge4ri +ugs3 +u5gu +u3i +u5kl +uk4ta +uk4tr +u1la +u1le +u5ly +u5pe +up5l +u5q +u3ra +u3re +u4r3eg +u1rer +u3ro +us5a +u3si +u5ska +u5so +us5v +u1te +u1ti +u1to +ut5r +ut5s4 +5u5v +va5d +3varm +1ved +ve4l5e +ve4reg +ve3s +5vet +v5h +vi4l3in +1vis +v5j +v5k +vl4 +v3le +v5li +vls1 +1vo +4v5om +v5p +v5re +v3st +v5su +v5t +3vu +y3a +y5dr +y3e +y3ke +y5ki +yk3li +y3ko +yk4s5 +y3kv +y5li +y5lo +y5mu +yns5 +y5o +y1pe +y3pi +y3re +yr3ek +y3ri +y3si +y3ti +y5t3r +y5ve +zi5o + +.sÃ¥3 +.ær5i +.øv3r +a3tø +a5væ +brød3 +5bæ +5drøv +dstÃ¥4 +3dæ +3dø +e3læ +e3lø +e3rø +er5øn +e5tæ +e5tø +e1væ +e3æ +e5Ã¥ +3fæ +3fø +fø4r5en +giø4 +g4sø +g5sÃ¥ +3gæ +3gø1 +3gÃ¥ +i5tæ +i3ø +3kø +3kÃ¥ +lingeniø4 +l3væ +5løs +m5tÃ¥ +1mæ +3mø +3mÃ¥ +n3kæ +n5tæ +3næ +4n5æb +5nø +o5læ +or3ø +o5Ã¥ +5præ +5pæd +pÃ¥3 +r5kæ +r5tæ +r5tø +r3væ +r5æl +4røn +5rør +3rÃ¥d +r5Ã¥r +s4kÃ¥ +3slÃ¥ +s4næ +5stø +1stÃ¥ +1sæ +4s5æn +1sø +s5øk +sÃ¥4r5 +ti4ø +3træk. +t4sø +t5sÃ¥ +t3væ +u3læ +3værd +1værk +5vÃ¥ +y5væ +æb3l +æ3c +æ3e +æg5a +æ4gek +æ4g5r +ægs5 +æ5i +æ5kv +ælle4 +æn1dr +æ5o +æ1re +ær4g5r +æ3ri +ær4ma +ær4mo +ær5s +æ5si +æ3so +æ3ste +æ3ve +øde5 +ø3e +ø1je +ø3ke +ø3le +øms5 +øn3st +øn4t3 +ø1re +ø3ri +ørne3 +ør5o +ø1ve +Ã¥1d +Ã¥1e +Ã¥5h +Ã¥3l +Ã¥3re +Ã¥rs5t +Ã¥5sk +Ã¥3t + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/da_compoundDictionary.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/da_compoundDictionary.txt new file mode 100644 index 00000000000..9a14f40c5f9 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/da_compoundDictionary.txt @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# A set of words for testing the HyphenationCompound factory, +# in conjunction with the danish hyphenation grammar. +læse +hest diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/elevate.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/elevate.xml new file mode 100644 index 00000000000..ddf1e9fef32 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/elevate.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/enumsConfig.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/enumsConfig.xml new file mode 100644 index 00000000000..9bfbfc35447 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/enumsConfig.xml @@ -0,0 +1,52 @@ + + + + + + + + Not Available + Low + Medium + High + + x4 + x5 + x6 + x7 + x8 + x9 + x10 + Critical + + x12 + x13 + x14 + x15 + x16 + x17 + x18 + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/foo/bar.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/foo/bar.txt new file mode 100644 index 00000000000..a58b94e7fbf --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/foo/bar.txt @@ -0,0 +1 @@ +Placeholder file to test replication of subdirs. diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/freeTextSuggest.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/freeTextSuggest.txt new file mode 100644 index 00000000000..cbb2c57ce7f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/freeTextSuggest.txt @@ -0,0 +1,2 @@ +foo bar baz blah +boo foo bar foo bee \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/frenchArticles.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/frenchArticles.txt new file mode 100644 index 00000000000..914161185f7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/frenchArticles.txt @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# A set of articles for testing the French Elision filter. +# Requiring a text file is a bit weird here... +l +m +t +qu +n +s +j diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/fuzzysuggest.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/fuzzysuggest.txt new file mode 100644 index 00000000000..94e2152160a --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/fuzzysuggest.txt @@ -0,0 +1,4 @@ +# simple fuzzy suggest phrase dictionary for testing +change 1.0 +charge 1.0 +chance 1.0 \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hunspell-test.aff b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hunspell-test.aff new file mode 100644 index 00000000000..d035ad18001 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hunspell-test.aff @@ -0,0 +1,13 @@ +SET UTF-8 +TRY abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ + +SFX A Y 2 +SFX A 0 e n +SFX A 0 e t + +SFX C Y 2 +SFX C 0 d/C c +SFX C 0 c b + +PFX B Y 1 +PFX B 0 s o \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hunspell-test.dic b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hunspell-test.dic new file mode 100644 index 00000000000..92c35d2b6ab --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hunspell-test.dic @@ -0,0 +1,6 @@ +5 +lucen/A +lucene +mahout/A +olr/B +ab/C \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hyphenation.dtd b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hyphenation.dtd new file mode 100644 index 00000000000..fb3db16cf67 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/hyphenation.dtd @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/jasuggest.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/jasuggest.txt new file mode 100644 index 00000000000..6df149de61a --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/jasuggest.txt @@ -0,0 +1,5 @@ +# simple auto-suggest phrase dictionary for testing +# note this uses tabs as separator! +åŒ—æµ·é“ 1.0 +今夜 3.0 +話ã—㟠6.0 \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/keep-1.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/keep-1.txt new file mode 100644 index 00000000000..8dfe80902d2 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/keep-1.txt @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +foo +bar \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/keep-2.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/keep-2.txt new file mode 100644 index 00000000000..646b7ff4ddb --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/keep-2.txt @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +junk +more \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt new file mode 100644 index 00000000000..ede7742581b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt @@ -0,0 +1,246 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Syntax: +# "source" => "target" +# "source".length() > 0 (source cannot be empty.) +# "target".length() >= 0 (target can be empty.) + +# example: +# "À" => "A" +# "\u00C0" => "A" +# "\u00C0" => "\u0041" +# "ß" => "ss" +# "\t" => " " +# "\n" => "" + +# À => A +"\u00C0" => "A" + +# à => A +"\u00C1" => "A" + +#  => A +"\u00C2" => "A" + +# à => A +"\u00C3" => "A" + +# Ä => A +"\u00C4" => "A" + +# Ã… => A +"\u00C5" => "A" + +# Æ => AE +"\u00C6" => "AE" + +# Ç => C +"\u00C7" => "C" + +# È => E +"\u00C8" => "E" + +# É => E +"\u00C9" => "E" + +# Ê => E +"\u00CA" => "E" + +# Ë => E +"\u00CB" => "E" + +# ÃŒ => I +"\u00CC" => "I" + +# à => I +"\u00CD" => "I" + +# ÃŽ => I +"\u00CE" => "I" + +# à => I +"\u00CF" => "I" + +# IJ => IJ +"\u0132" => "IJ" + +# à => D +"\u00D0" => "D" + +# Ñ => N +"\u00D1" => "N" + +# Ã’ => O +"\u00D2" => "O" + +# Ó => O +"\u00D3" => "O" + +# Ô => O +"\u00D4" => "O" + +# Õ => O +"\u00D5" => "O" + +# Ö => O +"\u00D6" => "O" + +# Ø => O +"\u00D8" => "O" + +# Å’ => OE +"\u0152" => "OE" + +# Þ +"\u00DE" => "TH" + +# Ù => U +"\u00D9" => "U" + +# Ú => U +"\u00DA" => "U" + +# Û => U +"\u00DB" => "U" + +# Ü => U +"\u00DC" => "U" + +# à => Y +"\u00DD" => "Y" + +# Ÿ => Y +"\u0178" => "Y" + +# à => a +"\u00E0" => "a" + +# á => a +"\u00E1" => "a" + +# â => a +"\u00E2" => "a" + +# ã => a +"\u00E3" => "a" + +# ä => a +"\u00E4" => "a" + +# Ã¥ => a +"\u00E5" => "a" + +# æ => ae +"\u00E6" => "ae" + +# ç => c +"\u00E7" => "c" + +# è => e +"\u00E8" => "e" + +# é => e +"\u00E9" => "e" + +# ê => e +"\u00EA" => "e" + +# ë => e +"\u00EB" => "e" + +# ì => i +"\u00EC" => "i" + +# í => i +"\u00ED" => "i" + +# î => i +"\u00EE" => "i" + +# ï => i +"\u00EF" => "i" + +# ij => ij +"\u0133" => "ij" + +# ð => d +"\u00F0" => "d" + +# ñ => n +"\u00F1" => "n" + +# ò => o +"\u00F2" => "o" + +# ó => o +"\u00F3" => "o" + +# ô => o +"\u00F4" => "o" + +# õ => o +"\u00F5" => "o" + +# ö => o +"\u00F6" => "o" + +# ø => o +"\u00F8" => "o" + +# Å“ => oe +"\u0153" => "oe" + +# ß => ss +"\u00DF" => "ss" + +# þ => th +"\u00FE" => "th" + +# ù => u +"\u00F9" => "u" + +# ú => u +"\u00FA" => "u" + +# û => u +"\u00FB" => "u" + +# ü => u +"\u00FC" => "u" + +# ý => y +"\u00FD" => "y" + +# ÿ => y +"\u00FF" => "y" + +# ff => ff +"\uFB00" => "ff" + +# ï¬ => fi +"\uFB01" => "fi" + +# fl => fl +"\uFB02" => "fl" + +# ffi => ffi +"\uFB03" => "ffi" + +# ffl => ffl +"\uFB04" => "ffl" + +# ſt => ft +"\uFB05" => "ft" + +# st => st +"\uFB06" => "st" diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/multiword-synonyms.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/multiword-synonyms.txt new file mode 100644 index 00000000000..15a53e0cf97 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/multiword-synonyms.txt @@ -0,0 +1,15 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +US, U.S., U S, USA, U.S.A., U S A, United States, United States of America +bar, tropical cyclone +chicken, dinner bird \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/old_synonyms.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/old_synonyms.txt new file mode 100644 index 00000000000..a7624f0597d --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/old_synonyms.txt @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +a => aa +b => b1 b2 +c => c1,c2 +a\=>a => b\=>b +a\,a => b\,b +foo,bar,baz + +Television,TV,Televisions diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/open-exchange-rates.json b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/open-exchange-rates.json new file mode 100644 index 00000000000..6b40ac42d64 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/open-exchange-rates.json @@ -0,0 +1,18 @@ +{ + "disclaimer": "This data is not real, it was synthetically created to match currency.xml. It is modeled after the data format available from openexchangerates.org. See https://openexchangerates.org/documentation for details + + + IMPORTANT NOTE: In order for tests to work, this data must be kept in sync with ./currency.xml", + + + "license": "http://www.apache.org/licenses/LICENSE-2.0", + "timestamp": 1332070464, + "base": "USD", + "rates": { + "USD": 1, + "JPY": 81.29, + "EUR": 2.5, + "GBP": 0.5, + "MXN": 2.0 + } +} diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/phrasesuggest.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/phrasesuggest.txt new file mode 100644 index 00000000000..fd4984d70b8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/phrasesuggest.txt @@ -0,0 +1,8 @@ +# simple auto-suggest phrase dictionary for testing +# note this uses tabs as separator! +the first phrase 1.0 +the second phrase 2.0 +testing 1234 3.0 +foo 5.0 +the fifth phrase 2.0 +the final phrase 4.0 diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protected-1.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protected-1.txt new file mode 100644 index 00000000000..61c0583b579 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protected-1.txt @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +foobar +jaxfopbuz diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protected-2.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protected-2.txt new file mode 100644 index 00000000000..d9a5c3c7d26 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protected-2.txt @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +golden +compote diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protwords.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protwords.txt new file mode 100644 index 00000000000..ab7e3e2470e --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/protwords.txt @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#use a protected word file to avoid stemming two +#unrelated words to the same base word. +#to test, we will use words that would normally obviously be stemmed. +cats +ridding +c# +c++ +.net diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/regex-boost-processor-test.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/regex-boost-processor-test.txt new file mode 100644 index 00000000000..1dc0537c72b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/regex-boost-processor-test.txt @@ -0,0 +1,10 @@ +# Sample config file for RegexBoostProcessor +# This example applies boost on the "url" field to boost or deboost certain urls +# All rules are evaluated, and if several of them match, the boosts are multiplied. +# If for example one rule with boost 2.0 and one rule with boost 0.1 match, the resulting urlboost=0.2 + +https?://[^/]+/old/.* 0.1 #Comments are removed +https?://[^/]+/.*index\([0-9]\).html$ 0.5 + +# Prioritize certain sites over others +https?://www.mydomain.no/.* 1.5 \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml new file mode 100644 index 00000000000..6ea70f30e15 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-SimpleTextCodec.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-SimpleTextCodec.xml new file mode 100644 index 00000000000..528de731e3f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-SimpleTextCodec.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-add-schema-fields-update-processor.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-add-schema-fields-update-processor.xml new file mode 100644 index 00000000000..654628738d8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-add-schema-fields-update-processor.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-analyzer-by-name.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-analyzer-by-name.xml new file mode 100644 index 00000000000..b5704253a00 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-analyzer-by-name.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-behavior.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-behavior.xml new file mode 100644 index 00000000000..663de185faa --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-behavior.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-binaryfield.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-binaryfield.xml new file mode 100644 index 00000000000..f0f216b2b12 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-binaryfield.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + id + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml new file mode 100644 index 00000000000..549efd6b187 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + 1.2 + 0.76 + + + + + + + + + + + + + + 1.2 + 0.76 + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-booleansimilarity.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-booleansimilarity.xml new file mode 100644 index 00000000000..3f7a2c18b27 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-booleansimilarity.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + id + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-charfilters.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-charfilters.xml new file mode 100644 index 00000000000..1adb7aaf7e8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-charfilters.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-class-name-shortening-on-serialization.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-class-name-shortening-on-serialization.xml new file mode 100644 index 00000000000..55f12136a66 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-class-name-shortening-on-serialization.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-classification.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-classification.xml new file mode 100644 index 00000000000..89c27a6766a --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-classification.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-collate-dv.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-collate-dv.xml new file mode 100644 index 00000000000..0a2953d590c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-collate-dv.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-collate.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-collate.xml new file mode 100644 index 00000000000..bfe65b157e1 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-collate.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-copyfield-test.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-copyfield-test.xml new file mode 100644 index 00000000000..20dc97adb19 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-copyfield-test.xml @@ -0,0 +1,456 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-custom-field.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-custom-field.xml new file mode 100644 index 00000000000..c8e89a127a0 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-custom-field.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-customfield.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-customfield.xml new file mode 100644 index 00000000000..44cea6351b7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-customfield.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-deprecations.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-deprecations.xml new file mode 100644 index 00000000000..95747544220 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-deprecations.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-dfi.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-dfi.xml new file mode 100644 index 00000000000..184f142ac52 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-dfi.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + ChiSquared + + + + + + + + ChiSquared + false + + + + + + + + + id + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-dfr.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-dfr.xml new file mode 100644 index 00000000000..78c3b7ff958 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-dfr.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + I(F) + B + H2 + + + + + + + + I(F) + B + H3 + 900 + + + + + + + + G + L + H2 + 7 + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml new file mode 100644 index 00000000000..7be9b80300e --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-distributed-missing-sort.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-distributed-missing-sort.xml new file mode 100644 index 00000000000..21874498e20 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-distributed-missing-sort.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValues.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValues.xml new file mode 100644 index 00000000000..4a5ab17843e --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValues.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml new file mode 100644 index 00000000000..a18f230d3ce --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesJoin.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesJoin.xml new file mode 100644 index 00000000000..844a472f091 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesJoin.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMissing.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMissing.xml new file mode 100644 index 00000000000..d80a426d23c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMissing.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMulti.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMulti.xml new file mode 100644 index 00000000000..eb841890e16 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMulti.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-eff.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-eff.xml new file mode 100644 index 00000000000..d68a3da9021 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-eff.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + id + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-enums.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-enums.xml new file mode 100644 index 00000000000..2443da4e125 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-enums.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-field-sort-values.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-field-sort-values.xml new file mode 100644 index 00000000000..e6428af2eaa --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-field-sort-values.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-folding.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-folding.xml new file mode 100644 index 00000000000..0b13a570c10 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-folding.xml @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml new file mode 100644 index 00000000000..c2d6b39b787 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml @@ -0,0 +1,614 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-ib.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-ib.xml new file mode 100644 index 00000000000..7e66bb526bf --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-ib.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + SPL + DF + H2 + + + + + + + + LL + TTF + H3 + 900 + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-id-and-version-fields-only.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-id-and-version-fields-only.xml new file mode 100644 index 00000000000..be38c04741a --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-id-and-version-fields-only.xml @@ -0,0 +1,25 @@ + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-inplace-required-field.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-inplace-required-field.xml new file mode 100644 index 00000000000..6782cb55a82 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-inplace-required-field.xml @@ -0,0 +1,35 @@ + + + + + id + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-inplace-updates.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-inplace-updates.xml new file mode 100644 index 00000000000..df9b2379fd4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-inplace-updates.xml @@ -0,0 +1,69 @@ + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-lmdirichlet.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-lmdirichlet.xml new file mode 100644 index 00000000000..3c250988054 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-lmdirichlet.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + 1000 + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-lmjelinekmercer.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-lmjelinekmercer.xml new file mode 100644 index 00000000000..a90fd6552fd --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-lmjelinekmercer.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + 0.4 + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-luceneMatchVersion.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-luceneMatchVersion.xml new file mode 100644 index 00000000000..832aa504988 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-luceneMatchVersion.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml new file mode 100644 index 00000000000..a13ba35f482 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml @@ -0,0 +1,630 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal-atomic-stress.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal-atomic-stress.xml new file mode 100644 index 00000000000..39f0d581060 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal-atomic-stress.xml @@ -0,0 +1,38 @@ + + + + + id + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal-with-another-uniqkey.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal-with-another-uniqkey.xml new file mode 100644 index 00000000000..2087a1daae0 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal-with-another-uniqkey.xml @@ -0,0 +1,23 @@ + + + + + notid + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal.xml new file mode 100644 index 00000000000..287d4fe0149 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minimal.xml @@ -0,0 +1,21 @@ + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-multiword-synonyms.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-multiword-synonyms.xml new file mode 100644 index 00000000000..c7ebb36487c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-multiword-synonyms.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-nest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-nest.xml new file mode 100644 index 00000000000..537009a0431 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-nest.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-non-stored-docvalues.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-non-stored-docvalues.xml new file mode 100644 index 00000000000..6477bd52754 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-non-stored-docvalues.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-not-required-unique-key.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-not-required-unique-key.xml new file mode 100644 index 00000000000..484e29608af --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-not-required-unique-key.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-null-charfilters-analyzer.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-null-charfilters-analyzer.xml new file mode 100644 index 00000000000..1ad96ca958a --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-null-charfilters-analyzer.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-numeric.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-numeric.xml new file mode 100644 index 00000000000..a343cf8376b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-numeric.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field-unique-key.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field-unique-key.xml new file mode 100644 index 00000000000..49a587aef72 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field-unique-key.xml @@ -0,0 +1,25 @@ + + + + + + + + + str + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field.xml new file mode 100644 index 00000000000..8a22324f3d5 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field.xml @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-phrases-identification.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-phrases-identification.xml new file mode 100644 index 00000000000..ab38f9fee3b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-phrases-identification.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml new file mode 100644 index 00000000000..7059cd399b4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-point.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-point.xml new file mode 100644 index 00000000000..c933d130456 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-point.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-postingshighlight.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-postingshighlight.xml new file mode 100644 index 00000000000..e68ba0f117b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-postingshighlight.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-preanalyzed.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-preanalyzed.xml new file mode 100644 index 00000000000..7de08d62e96 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-preanalyzed.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-protected-term.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-protected-term.xml new file mode 100644 index 00000000000..229439444b3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-protected-term.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-pseudo-fields.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-pseudo-fields.xml new file mode 100644 index 00000000000..17cbececca8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-pseudo-fields.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rank-fields.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rank-fields.xml new file mode 100644 index 00000000000..2da0c0de62f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rank-fields.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-replication1.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-replication1.xml new file mode 100644 index 00000000000..1a4e32e2645 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-replication1.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-replication2.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-replication2.xml new file mode 100644 index 00000000000..8b831272719 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-replication2.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-required-fields.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-required-fields.xml new file mode 100644 index 00000000000..0ac0c0463ab --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-required-fields.xml @@ -0,0 +1,401 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest-lucene-match-version.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest-lucene-match-version.xml new file mode 100644 index 00000000000..23c418c478b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest-lucene-match-version.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml new file mode 100644 index 00000000000..46b735ce782 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml @@ -0,0 +1,747 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-reversed.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-reversed.xml new file mode 100644 index 00000000000..bb9f981beed --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-reversed.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-root.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-root.xml new file mode 100644 index 00000000000..aef3c9767fb --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-root.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sim-default-override.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sim-default-override.xml new file mode 100644 index 00000000000..276432441bb --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sim-default-override.xml @@ -0,0 +1,66 @@ + + + + + + + + + sim-used-as-default-override + + + + + + + + + + + + + + + + + + is there an echo? + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sim.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sim.xml new file mode 100644 index 00000000000..b9415711df6 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sim.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + is there an echo? + + + + + + + + + + + + + + + + + + + + + id + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-simpleqpplugin.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-simpleqpplugin.xml new file mode 100644 index 00000000000..0ed7e10f6e0 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-simpleqpplugin.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-field.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-field.xml new file mode 100644 index 00000000000..9e0d29f3e20 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-field.xml @@ -0,0 +1,3 @@ + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-type.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-type.xml new file mode 100644 index 00000000000..bfbd3334204 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-type.xml @@ -0,0 +1,3 @@ + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-types.incl b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-types.incl new file mode 100644 index 00000000000..fe9fd6d7a7b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-snippet-types.incl @@ -0,0 +1,19 @@ + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sorting-text.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sorting-text.xml new file mode 100644 index 00000000000..cf526b765b2 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sorting-text.xml @@ -0,0 +1,149 @@ + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sortingresponse.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sortingresponse.xml new file mode 100644 index 00000000000..9fb224b34a3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sortingresponse.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sorts.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sorts.xml new file mode 100644 index 00000000000..70edcb221c2 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sorts.xml @@ -0,0 +1,314 @@ + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml new file mode 100644 index 00000000000..3f09e3acdd3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml new file mode 100644 index 00000000000..896f139a390 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sql.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sql.xml new file mode 100644 index 00000000000..03d9d7eef85 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sql.xml @@ -0,0 +1,650 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sweetspot.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sweetspot.xml new file mode 100644 index 00000000000..080faabfacc --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-sweetspot.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + 6.0 + 1.5 + + 3 + 5 + 0.5 + + + + + + + + 3.3 + 7.7 + 2.718281828459045 + 5.0 + + 1 + 5 + 0.2 + + + + + + + + + id + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-synonym-tokenizer.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-synonym-tokenizer.xml new file mode 100644 index 00000000000..8ab64afdbb3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-synonym-tokenizer.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tagger.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tagger.xml new file mode 100644 index 00000000000..051cd10c7a5 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tagger.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tfidf.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tfidf.xml new file mode 100644 index 00000000000..df05e82d15b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tfidf.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + false + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tiny.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tiny.xml new file mode 100644 index 00000000000..555ee3571b7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tiny.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + id + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tokenizer-test.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tokenizer-test.xml new file mode 100644 index 00000000000..5613c66be2f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-tokenizer-test.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml new file mode 100644 index 00000000000..8669d646a92 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-unifiedhighlight.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-unifiedhighlight.xml new file mode 100644 index 00000000000..90b7c524710 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-unifiedhighlight.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-version-dv.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-version-dv.xml new file mode 100644 index 00000000000..375311a9b69 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-version-dv.xml @@ -0,0 +1,33 @@ + + + + + + + + + id + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-version-indexed.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-version-indexed.xml new file mode 100644 index 00000000000..4523d507ece --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-version-indexed.xml @@ -0,0 +1,33 @@ + + + + + + + + + id + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-xinclude.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-xinclude.xml new file mode 100644 index 00000000000..39767ea907e --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-xinclude.xml @@ -0,0 +1,26 @@ + + + ]> + + + + + &schema_entity_include; + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema.xml new file mode 100644 index 00000000000..5c3d48303a6 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema.xml @@ -0,0 +1,897 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + I am your default sim + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema11.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema11.xml new file mode 100644 index 00000000000..d79179399ae --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema11.xml @@ -0,0 +1,542 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema12.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema12.xml new file mode 100644 index 00000000000..33468f94aeb --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema12.xml @@ -0,0 +1,812 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema15.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema15.xml new file mode 100644 index 00000000000..b585df5ad11 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema15.xml @@ -0,0 +1,645 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_codec.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_codec.xml new file mode 100644 index 00000000000..6f2f04a2003 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_codec.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + string_f + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml new file mode 100644 index 00000000000..693847b6ea9 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml @@ -0,0 +1,811 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_postingsformat.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_postingsformat.xml new file mode 100644 index 00000000000..7d452a59d17 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_postingsformat.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml new file mode 100644 index 00000000000..93b11ed78e4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml @@ -0,0 +1,609 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml new file mode 100644 index 00000000000..9c2411bde33 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml @@ -0,0 +1,35 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-add-schema-fields-update-processor-chains.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-add-schema-fields-update-processor-chains.xml new file mode 100644 index 00000000000..46ce9ad9a65 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-add-schema-fields-update-processor-chains.xml @@ -0,0 +1,223 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + true + managed-schema + + + + + text + + java.lang.Boolean + boolean + + + java.lang.Integer + pints + + + java.lang.Float + pfloats + + + java.util.Date + pdates + + + java.lang.Long + java.lang.Integer + plongs + + + + java.lang.Double + java.lang.Float + + pdoubles + + + + + + + text + + java.lang.String + text + + *_str + + + + java.lang.Boolean + boolean + + + java.lang.Integer + pints + + + java.lang.Float + pfloats + + + java.util.Date + pdates + + + java.lang.Long + java.lang.Integer + plongs + + + java.lang.Number + pdoubles + + + + + + + + text + + java.lang.String + text + + *_str + 10 + + + *_t + 20 + + + *2_t + 20 + + + + + + + + + + + + + java.lang.String + text + + *_str + 10 + + + true + + + java.lang.Boolean + boolean + + + java.lang.Integer + pints + + + java.lang.Float + pfloats + + + java.util.Date + pdates + + + java.lang.Long + java.lang.Integer + plongs + + + java.lang.Number + pdoubles + + + + + + + + + + + + + + yyyy-MM-dd['T'[HH:mm[:ss[.SSS]][z + yyyy-MM-dd['T'[HH:mm[:ss[,SSS]][z + yyyy-MM-dd HH:mm[:ss[.SSS]][z + yyyy-MM-dd HH:mm[:ss[,SSS]][z + [EEE, ]dd MMM yyyy HH:mm[:ss] z + EEEE, dd-MMM-yy HH:mm:ss z + EEE MMM ppd HH:mm:ss [z ]yyyy + + + + text + + java.lang.Boolean + boolean + + + java.lang.Integer + pints + + + java.lang.Float + pfloats + + + java.util.Date + pdates + + + java.lang.Long + java.lang.Integer + plongs + + + java.lang.Number + pdoubles + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml new file mode 100644 index 00000000000..0c62584957c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml @@ -0,0 +1,27 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml new file mode 100644 index 00000000000..c0c964fbfb5 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + ${solr.data.dir:} + + + + 1000000 + 2000000 + 3000000 + 4000000 + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + ${solr.ulog.dir:} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + ${solr.max.booleanClauses:1024} + + + + + + + + + + + + true + + + + + + 10 + + + + + + + + + + + + + + + + + + true + + + + + + + + 100 + + + + + + 70 + + + + + + + ]]> + ]]> + + + + + + + + + + + + + 10 + .,!? + + + + + + WORD + en + US + + + + + + + + + max-age=30, public + + + + + solr + solrconfig.xml schema.xml + + + + prefix-${solr.test.sys.prop2}-suffix + + + + + + + uniq + uniq2 + uniq3 + + + + + + + + + regex_dup_A_s + x + x_x + + + + regex_dup_B_s + x + x_x + + + + + + + + regex_dup_A_s + x + x_x + + + regex_dup_B_s + x + x_x + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-basic.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-basic.xml new file mode 100644 index 00000000000..d98ecacf454 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-basic.xml @@ -0,0 +1,29 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml new file mode 100644 index 00000000000..d51f8050c56 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml @@ -0,0 +1,87 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + ${solr.max.booleanClauses:1024} + + + + + + + + + + + + + + + true + + 10 + + + + + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-classification.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-classification.xml new file mode 100644 index 00000000000..3370600574d --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-classification.xml @@ -0,0 +1,68 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + ${solr.ulog.dir:} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + title,content,author + cat + + knn + 1 + 1 + 5 + cat:(class1 OR class2) + + + + + + + title,content,author + cat + + knn + 1 + 1 + 5 + not valid ( lucene query + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml new file mode 100644 index 00000000000..9f2bf3d3cc7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml @@ -0,0 +1,284 @@ + + + + + + + + + + + + ${solr.data.dir:} + + + + 1000000 + 2000000 + 3000000 + 4000000 + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + ${solr.ulog.dir:} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + ${solr.max.booleanClauses:1024} + + + + + + + + + + + + true + + + + + + 10 + + + + + + + + + + + + + + + + + + true + + + + + a_s + + + direct + DirectSolrSpellChecker + a_s + 3 + + + + + + + + + direct + false + false + 1 + + + spellcheck + + + + + + string + elevate.xml + + + + + + explicit + + + elevate + + + + + + + max-age=30, public + + + + + solr + solrconfig.xml schema.xml + + + + prefix-${solr.test.sys.prop2}-suffix + + + + + + + uniq + uniq2 + uniq3 + + + + + + + + + regex_dup_A_s + x + x_x + + + + regex_dup_B_s + x + x_x + + + + + + + + regex_dup_A_s + x + x_x + + + regex_dup_B_s + x + x_x + + + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml new file mode 100644 index 00000000000..4c54a6e7ec4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + true + + component1 + + + component2 + + + + + + + max-age=30, public + + + + + solr + solrconfig.xml schema.xml + + + + foo + + + bar + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-concurrentmergescheduler.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-concurrentmergescheduler.xml new file mode 100644 index 00000000000..140c4cfeedc --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-concurrentmergescheduler.xml @@ -0,0 +1,37 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + ${useCompoundFile:false} + + + 987 + 42 + false + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-configurerecoverystrategy.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-configurerecoverystrategy.xml new file mode 100644 index 00000000000..d86a6de1012 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-configurerecoverystrategy.xml @@ -0,0 +1,28 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + 250 + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-customrecoverystrategy.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-customrecoverystrategy.xml new file mode 100644 index 00000000000..4e8effab96d --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-customrecoverystrategy.xml @@ -0,0 +1,32 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + recovery_base_url + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-dedup-overwrites.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-dedup-overwrites.xml new file mode 100644 index 00000000000..74b19f46a3f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-dedup-overwrites.xml @@ -0,0 +1,81 @@ + + + + + + + + + + true + v_t,t_field + org.apache.solr.update.processor.TextProfileSignature + + + + + + + false + id + + org.apache.solr.update.processor.Lookup3Signature + + + + + + + non_indexed_signature_sS + false + v_t,t_field + org.apache.solr.update.processor.TextProfileSignature + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + ${solr.commitwithin.softcommit:true} + + + + + + + + text + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-deeppaging.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-deeppaging.xml new file mode 100644 index 00000000000..d4b501736fe --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-deeppaging.xml @@ -0,0 +1,76 @@ + + + + + + + ${solr.data.dir:} + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + delayingSearchComponent + + + + + + ${solr.ulog.dir:} + + + + + + + + + 50 + 500 + + ${solr.test.useFilterForSortedQuery} + + + + + + + + str + elevate.xml + + + + elevate + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-defaults.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-defaults.xml new file mode 100644 index 00000000000..77bcba7ece7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-defaults.xml @@ -0,0 +1,43 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml new file mode 100644 index 00000000000..fcb0140fb80 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml @@ -0,0 +1,59 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + + delayingSearchComponent + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml new file mode 100644 index 00000000000..424783beef5 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml @@ -0,0 +1,51 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + ${useCompoundFile:false} + + ${solr.tests.maxBufferedDocs} + ${solr.tests.ramBufferSizeMB} + + + + single + + + + true + 3 + 100MILLISECONDS + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml new file mode 100644 index 00000000000..bb4d3f85ba0 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml @@ -0,0 +1,48 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + ${useCompoundFile:false} + + ${solr.tests.maxBufferedDocs} + ${solr.tests.ramBufferSizeMB} + + + + single + + + value1 + value2 + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-distrib-update-processor-chains.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-distrib-update-processor-chains.xml new file mode 100644 index 00000000000..c9c351fe0a9 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-distrib-update-processor-chains.xml @@ -0,0 +1,84 @@ + + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.hdfs.blockcache.enabled:true} + ${solr.hdfs.blockcache.blocksperbank:1024} + ${solr.hdfs.home:} + ${solr.hdfs.confdir:} + ${solr.hdfs.blockcache.global:false} + + + ${solr.data.dir:} + + + + + + + + + + + + + + true + + + + + + + + + + ${solr.ulog.dir:} + + + + + + + 10 + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doc-expire-update-processor.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doc-expire-update-processor.xml new file mode 100644 index 00000000000..18d16a36d17 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doc-expire-update-processor.xml @@ -0,0 +1,96 @@ + + + + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + ${solr.ulog.dir:} + + + + + + + + _expire_at_tdt + + + + + + _ttl_field_ + + _expire_at_tdt + + + _ttl_field_ + + + + + + _ttl_param_ + + _expire_at_tdt + + + + + + _ttl_field_ + _ttl_param_ + _expire_at_tdt + + + _ttl_field_ + + + + + + + + 3 + eXpField_tdt + tTl_s + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml new file mode 100644 index 00000000000..f3a0bd55ce2 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml @@ -0,0 +1,52 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + ${useCompoundFile:false} + + ${solr.data.dir:} + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + solr + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml new file mode 100644 index 00000000000..4157dc50f01 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml @@ -0,0 +1,141 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + ${solr.max.booleanClauses:1024} + + + + + + + + + + true + + 10 + + + + + + + + + text + ${elevate.file:elevate.xml} + + + + + + + + explicit + + + elevate + + + + + + + + + max-age=30, public + + + + + solr + solrconfig.xml schema.xml + + + + prefix-${solr.test.sys.prop2}-suffix + + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml new file mode 100644 index 00000000000..15a188a0aec --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml @@ -0,0 +1,174 @@ + + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.hdfs.blockcache.enabled:true} + ${solr.hdfs.blockcache.blocksperbank:1024} + ${solr.hdfs.home:} + ${solr.hdfs.confdir:} + + + + ${solr.data.dir:} + + + + + + ${solr.ulog.dir:} + + + + + + + + + + live_b + true + + + + + true + my_version_l + del_version + + + + + live_b + false + + + + timestamp_tdt + + + + + + + + + true + my_version_f + del_version + + + + + + + + my_version_l + del_version + + + + + + + + my_version_l,my_version_f + del_version,del_version_2 + + + + + + + + + + + + + + + + + + + true + my_version_l + del_version + true + + + + + + + + + my_version_l + del_version + + true + 1 + 1 + 1.5 + bar + bar1 + bar2 + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower.xml new file mode 100644 index 00000000000..217d56898b3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower.xml @@ -0,0 +1,59 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + ${solr.data.dir:} + + + + + + + + true + + + + + + + + + + + + + + http://127.0.0.1:TEST_PORT/solr/collection1 + 00:00:01 + COMPRESSION + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower1.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower1.xml new file mode 100644 index 00000000000..26821b4e578 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower1.xml @@ -0,0 +1,52 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + + true + + + + + + + + + + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml new file mode 100644 index 00000000000..ef0c39ae8e4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml @@ -0,0 +1,48 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + + + + + + + 0.0 + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml new file mode 100644 index 00000000000..6600f7c248c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml @@ -0,0 +1,61 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + ${useCompoundFile:false} + + ${solr.data.dir:} + + + + + + ${solr.data.dir:} + + + + + + + + json + false + + + + + + + + + + + + solr + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-headers.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-headers.xml new file mode 100644 index 00000000000..328fc9bd56a --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-headers.xml @@ -0,0 +1,32 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + componentThatAddsHeader + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-highlight.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-highlight.xml new file mode 100644 index 00000000000..c714a4148d7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-highlight.xml @@ -0,0 +1,61 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + + + + + + + + + 100 + + + + + + 70 + + + + + + + ]]> + ]]> + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml new file mode 100644 index 00000000000..3feef5752bc --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml @@ -0,0 +1,69 @@ + + + + + + + LUCENE_4_1 + + ${solr.data.dir:} + + + + + + + + + + + + + true + 20 + 20 + + true + + 1 + + + + + + + + + + all + text + ${solr.core.name} + ${solr.core.dataDir} + ${solr.core.config} + ${solr.core.schema} + ${solr.core.transient} + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexconfig-mergepolicyfactory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexconfig-mergepolicyfactory.xml new file mode 100644 index 00000000000..efdd7ff4d11 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexconfig-mergepolicyfactory.xml @@ -0,0 +1,31 @@ + + + + + ${solr.data.dir:} + + ${tests.luceneMatchVersion:LATEST} + + + ${useCompoundFile:false} + true + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexmetrics.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexmetrics.xml new file mode 100644 index 00000000000..6238e7db021 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexmetrics.xml @@ -0,0 +1,61 @@ + + + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.tests.metrics.merge:false} + ${solr.tests.metrics.mergeDetails:false} + + + 100 + + + + 3 + 3 + + + + + + ${solr.commitwithin.softcommit:true} + + + + + + explicit + true + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-infixsuggesters.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-infixsuggesters.xml new file mode 100644 index 00000000000..a30186d9eed --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-infixsuggesters.xml @@ -0,0 +1,101 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + + shortRandomAnalyzingInfixSuggester + AnalyzingInfixLookupFactory + RandomTestDictionaryFactory + 100 + short_random_analyzing_infix_suggester + text + false + false + + + + + true + + + analyzing_infix_suggester_random_short_dictionary + + + + + + longRandomAnalyzingInfixSuggester + AnalyzingInfixLookupFactory + RandomTestDictionaryFactory + 100000 + long_random_analyzing_infix_suggester + text + false + false + + + + + true + + + analyzing_infix_suggester_random_long_dictionary + + + + + + shortRandomBlendedInfixSuggester + BlendedInfixLookupFactory + RandomTestDictionaryFactory + 100 + position_linear + text + short_random_blended_infix_suggester + true + false + false + + + + + true + shortRandomBlendedInfixSuggester + true + 10 + true + + + blended_infix_suggester_random_short_dictionary + + + + false + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml new file mode 100644 index 00000000000..2581d7e9141 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml @@ -0,0 +1,29 @@ + + + + + ${solr.data.dir:} + + ${tests.luceneMatchVersion:LATEST} + + + true + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader-throttled.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader-throttled.xml new file mode 100644 index 00000000000..1a37f3f4339 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader-throttled.xml @@ -0,0 +1,66 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + + true + + + + + 0.05 + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader.xml new file mode 100644 index 00000000000..3893a944a96 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader.xml @@ -0,0 +1,70 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + ${solr.data.dir:} + + + + + + + + true + + + + + commit + + schema.xml,foo/bar.txt + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1-keepOneBackup.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1-keepOneBackup.xml new file mode 100644 index 00000000000..101ba30f351 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1-keepOneBackup.xml @@ -0,0 +1,49 @@ + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + + + + + commit + schema-replication2.xml:schema.xml + commit + + 1 + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1.xml new file mode 100644 index 00000000000..0c3eb860fe3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1.xml @@ -0,0 +1,68 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + + true + + + + + commit + commit + schema-replication2.xml:schema.xml + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader2.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader2.xml new file mode 100644 index 00000000000..5eca4621bfd --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader2.xml @@ -0,0 +1,66 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + true + + + + + startup + schema.xml + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader3.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader3.xml new file mode 100644 index 00000000000..5d97350e558 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader3.xml @@ -0,0 +1,67 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + true + + + + + commit + startup + schema.xml + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-logmergepolicyfactory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-logmergepolicyfactory.xml new file mode 100644 index 00000000000..539fd5c4d5c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-logmergepolicyfactory.xml @@ -0,0 +1,37 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + -1 + -1 + + + 11 + 456 + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema-test.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema-test.xml new file mode 100644 index 00000000000..666132f8e74 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema-test.xml @@ -0,0 +1,27 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml new file mode 100644 index 00000000000..46158cd77cf --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml @@ -0,0 +1,83 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + ${managed.schema.mutable} + ${managed.schema.resourceName:managed-schema} + + + + + + + + + + + + + + + + + ${enableLazyFieldLoading:false} + + + + + ${solr.ulog.dir:} + + + + + true + + + + + + ${my.custom.variable.a:A} + ${my.custom.variable.b:B} + + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-memory-circuitbreaker.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-memory-circuitbreaker.xml new file mode 100644 index 00000000000..6ab9f893022 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-memory-circuitbreaker.xml @@ -0,0 +1,94 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + ${solr.max.booleanClauses:1024} + + + + + + + + + + + + + + + true + + 10 + + + + + + + + true + 75 + true + 75 + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-defaults.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-defaults.xml new file mode 100644 index 00000000000..3e0cf1927b6 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-defaults.xml @@ -0,0 +1,33 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml new file mode 100644 index 00000000000..b67d6645f31 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml @@ -0,0 +1,31 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + ${useCompoundFile:false} + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicyfactory-nocfs.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicyfactory-nocfs.xml new file mode 100644 index 00000000000..b93fabd7c3a --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicyfactory-nocfs.xml @@ -0,0 +1,34 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + ${testSetNoCFSMergePolicyConfig.useCompoundFile:false} + + 0.5 + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-minhash.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-minhash.xml new file mode 100644 index 00000000000..d8e40dad472 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-minhash.xml @@ -0,0 +1,516 @@ + + + + + + + + + + + + ${solr.data.dir:} + + + + 1000000 + 2000000 + 3000000 + 4000000 + ${solr.hdfs.home:} + ${solr.hdfs.blockcache.enabled:true} + ${solr.hdfs.blockcache.global:true} + ${solr.hdfs.blockcache.write.enabled:false} + ${solr.hdfs.blockcache.blocksperbank:10} + ${solr.hdfs.blockcache.slab.count:1} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + ${solr.autoCommit.maxTime:-1} + + + + + + ${solr.ulog.dir:} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + ${solr.max.booleanClauses:1024} + + + + + + + + + + + + true + + + + + + 10 + + + + + + + + + + + + 2000 + + + + + + + + true + + + + + dismax + *:* + 0.01 + + text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0 + + + text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5 + + + weight^0.5 recip(rord(id),1,1000,1000)^0.3 + + + 3<-1 5<-2 6<90% + + 100 + + + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + + lowerpunctfilt + + + default + lowerfilt + spellchecker1 + false + + + direct + DirectSolrSpellChecker + lowerfilt + 3 + + + wordbreak + solr.WordBreakSolrSpellChecker + lowerfilt + true + true + 10 + + + multipleFields + lowerfilt1and2 + spellcheckerMultipleFields + false + + + + jarowinkler + lowerfilt + + org.apache.lucene.search.spell.JaroWinklerDistance + spellchecker2 + + + + solr.FileBasedSpellChecker + external + spellings.txt + UTF-8 + spellchecker3 + + + + freq + lowerfilt + spellcheckerFreq + + freq + false + + + fqcn + lowerfilt + spellcheckerFQCN + org.apache.solr.spelling.SampleComparator + false + + + perDict + org.apache.solr.handler.component.DummyCustomParamSpellChecker + lowerfilt + + + + + + + + + + false + + false + + 1 + + + spellcheck + + + + + direct + false + false + 1 + + + spellcheck + + + + + default + wordbreak + 20 + + + spellcheck + + + + + direct + wordbreak + 20 + + + spellcheck + + + + + dismax + lowerfilt1^1 + + + spellcheck + + + + + + + + + + + + + + + tvComponent + + + + + + + + + + + + 100 + + + + + + 70 + + + + + + + ]]> + ]]> + + + + + + + + + + + + + 10 + .,!? + + + + + + WORD + en + US + + + + + + + + + max-age=30, public + + + + + + foo_s + + + foo_s:bar + + + + + foo_s + foo_s:bar + + + + + solr + solrconfig.xml schema.xml + + + + prefix-${solr.test.sys.prop2}-suffix + + + + + + + uniq + uniq2 + uniq3 + + + + + + + + + regex_dup_A_s + x + x_x + + + + regex_dup_B_s + x + x_x + + + + + + + + regex_dup_A_s + x + x_x + + + regex_dup_B_s + x + x_x + + + + + + + org.apache.solr.rest.ManagedResourceStorage$InMemoryStorageIO + + + + + + text + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-minimal.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-minimal.xml new file mode 100644 index 00000000000..aedb68305ab --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-minimal.xml @@ -0,0 +1,65 @@ + + + + + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + ${solr.commitwithin.softcommit:true} + + + + + + explicit + true + text + + + + + + + text + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-nocache.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-nocache.xml new file mode 100644 index 00000000000..137c519bdc4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-nocache.xml @@ -0,0 +1,48 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml new file mode 100644 index 00000000000..62fb05b03c4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml @@ -0,0 +1,32 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + ${useCompoundFile:false} + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-noopregen.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-noopregen.xml new file mode 100644 index 00000000000..e2a20a3379c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-noopregen.xml @@ -0,0 +1,36 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-paramset.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-paramset.xml new file mode 100644 index 00000000000..a9e71f63ebc --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-paramset.xml @@ -0,0 +1,89 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + A + + + B + + + C + + + + + P + + + + + + + + + + + A1 + + + B1 + + + C1 + + + + + + /some/path + /some/other/path + + + + + + text + + + + + + explicit + + + elevator + + + + + + server-enabled.txt + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-parsing-update-processor-chains.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-parsing-update-processor-chains.xml new file mode 100644 index 00000000000..43f2d285a9f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-parsing-update-processor-chains.xml @@ -0,0 +1,234 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + yyyy-MM-dd'T'HH:mm:ss.SSSz + + + + + + + yyyy-MM-dd'T'HH:mm:ss.SSSz + + + + + + false + yyyy-MM-dd'T'HH:mm:ss.SSSz + + + + + + solr.DatePointField + yyyy-MM-dd'T'HH:mm:ss.SSSz + + + + + + solr.TrieDateField + yyyy-MM-dd'T'HH:mm:ss.SSSz + + + + + + America/New_York + yyyy-MM-dd'T'HH:mm:ss.SSS[z] + + + + + + + America/Los_Angeles + + M/d/yyyy + + + + + + + + yyyy-MM-dd'T'HH:mm[:ss[.SSS]][z + yyyy-MM-dd'T'HH:mm[:ss[,SSS]][z + yyyy-MM-dd HH:mm[:ss[.SSS]][z + yyyy-MM-dd HH:mm[:ss[,SSS]][z + yyyy-MM-dd + yyyy-MM-dd hh:mm[ ]a + EEE MMM dd HH:mm:ss ZZZ yyyy + EEE MMM dd HH:mm:ss yyyy[ z] + EEE, dd MMM yyyy HH:mm:ss z + EEEE, dd-MMM-yy HH:mm:ss z + EEEE, MMMM dd, yyyy + MMMM dd, yyyy + MMM. dd, yyyy + + + + + + + UTC + fr + 'le' EEEE dd MMMM yyyy + + + + + + + yyyy-MM-dd['T'[HH:mm[:ss[.SSS]][z + yyyy-MM-dd['T'[HH:mm[:ss[,SSS]][z + yyyy-MM-dd HH:mm[:ss[.SSS]][z + yyyy-MM-dd HH:mm[:ss[,SSS]][z + [EEE, ]dd MMM yyyy HH:mm[:ss] z + EEEE, dd-MMM-yy HH:mm:ss z + EEE MMM ppd HH:mm:ss [z ]yyyy + + + + + + + + + + + + + + + + + ru_RU + + + + + + + + + + + + + + + ru_RU + + + + + + + + + + + + + + + fr_FR + + + + + + + + + + + + + + + fr_FR + + + + + + + + + + + + + + + false + + true + YES + on + + + false + no + oFF + + + + + + + yup + nope + + + + + + + + + + + + + + + + yyyy-MM-dd + yyyy-MM-dd'T'HH:mm:ss.SSSz + yyyy-MM-dd'T'HH:mm + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrases-identification.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrases-identification.xml new file mode 100644 index 00000000000..65ccd5e0965 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrases-identification.xml @@ -0,0 +1,53 @@ + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + phrases + + + explicit + true + body + multigrams_body multigrams_title^2 + + + + + + + phrases + + + explicit + true + true + multigrams_body multigrams_title^2 + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml new file mode 100644 index 00000000000..0f79d7c4572 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml @@ -0,0 +1,468 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + ${solr.data.dir:} + + + + + + + + suggest_wfst + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.WFSTLookupFactory + suggest_wfst + false + + + true + + phrasesuggest.txt + + + + phrase_suggest + + + + + + suggest_analyzing + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.AnalyzingLookupFactory + suggest_analyzing + false + + + true + ja_suggest + false + + jasuggest.txt + + + + phrase_suggest + + + + + + infix_suggest_analyzing + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory + false + + + text + + analyzingInfixSuggest.txt + + + + phrase_suggest + + + + + + + analyzing_infix_suggest_default + AnalyzingInfixLookupFactory + FileDictionaryFactory + false + analyzing_infix_suggest_default + analyzingInfixSuggest.txt + text + + + + analyzing_infix_suggest_without_highlight + AnalyzingInfixLookupFactory + FileDictionaryFactory + false + analyzing_infix_suggest_without_highlight + analyzingInfixSuggest.txt + text + false + + + + analyzing_infix_suggest_not_all_terms_required + AnalyzingInfixLookupFactory + FileDictionaryFactory + false + analyzing_infix_suggest_not_all_terms_required + analyzingInfixSuggest.txt + text + false + + + + + + + + fuzzy_suggest_analyzing_with_high_freq_dict + org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory + org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory + fuzzy_suggest_analyzing + false + + + true + text + false + stext + + + + + + + free_text_suggest + FreeTextLookupFactory + FileDictionaryFactory + free_text_suggest + false + freeTextSuggest.txt + + + + text + 2 + + + + + + + blended_infix_suggest_linear + BlendedInfixLookupFactory + FileDictionaryFactory + false + blendedInfixSuggest.txt + blendedInfixDir1 + + + + position_linear + text + + + + blended_infix_suggest_reciprocal + BlendedInfixLookupFactory + FileDictionaryFactory + false + blendedInfixSuggest.txt + blendedInfixDir2 + + + + position_reciprocal + text + + + + + blended_infix_suggest_exponential_reciprocal + BlendedInfixLookupFactory + FileDictionaryFactory + false + blendedInfixSuggest.txt + blended_infix_suggest_exponential_reciprocal + + + + position_exponential_reciprocal + text + + + + blended_infix_suggest_exponential_reciprocal_1 + BlendedInfixLookupFactory + FileDictionaryFactory + false + blendedInfixSuggest.txt + blended_infix_suggest_exponential_reciprocal_1 + + + position_exponential_reciprocal + 1.0 + text + + + + + + + + fuzzy_suggest_analyzing_with_file_dict + org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory + org.apache.solr.spelling.suggest.FileDictionaryFactory + fuzzy_suggest_analyzing + false + + + true + text + false + + fuzzysuggest.txt + + + + + + fuzzy_suggest_analyzing + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory + fuzzy_suggest_analyzing + false + + + true + text + false + + fuzzysuggest.txt + + + + phrase_suggest + + + + + + fuzzy_suggest_analyzing_with_max_edit_2 + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory + fuzzy_suggest_analyzing_with_max_edit_2 + false + + + true + text + false + 2 + + fuzzysuggest.txt + + + + phrase_suggest + + + + + + fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4 + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory + fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4 + false + + + true + text + false + 4 + + fuzzysuggest.txt + + + + phrase_suggest + + + + + + fuzzy_suggest_analyzing_with_min_fuzzy_length_2 + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory + fuzzy_suggest_analyzing_with_min_fuzzy_length_2 + false + + + true + text + false + 2 + + fuzzysuggest.txt + + + + phrase_suggest + + + + + + + + + true + suggest_wfst + false + + true + + + suggest_wfst + + + + + + + true + suggest_analyzing + false + + true + + + suggest_analyzing + + + + + + + true + infix_suggest_analyzing + false + + true + + + infix_suggest_analyzing + + + + + + true + + + fuzzy_suggest_analyzing_with_file_dict + + + + + + true + + + analyzing_infix_suggest + + + + + + true + + + blended_infix_suggest + + + + + + true + + + free_text_suggest + + + + + + + true + + + fuzzy_suggest_analyzing_with_high_freq_dict + + + + + + true + fuzzy_suggest_analyzing + false + + true + + + fuzzy_suggest_analyzing + + + + + + + true + fuzzy_suggest_analyzing_with_max_edit_2 + false + + true + + + fuzzy_suggest_analyzing_with_max_edit_2 + + + + + + + true + fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4 + false + + true + + + fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4 + + + + + + + true + fuzzy_suggest_analyzing_with_min_fuzzy_length_2 + false + + true + + + fuzzy_suggest_analyzing_with_min_fuzzy_length_2 + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml new file mode 100644 index 00000000000..54da41e86ef --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml @@ -0,0 +1,494 @@ + + + + + + + + + + + + ${solr.data.dir:} + + + + 1000000 + 2000000 + 3000000 + 4000000 + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + ${solr.ulog.dir:} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + ${solr.max.booleanClauses:1024} + + + + + + + + + + + + true + + + + + + 10 + + + + + + + + + + + + + + + + + + true + + + + + + dismax + *:* + 0.01 + + text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0 + + + text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5 + + + ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3 + + + 3<-1 5<-2 6<90% + + 100 + + + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + lowerpunctfilt + + + default + lowerfilt + spellchecker1 + false + + + direct + DirectSolrSpellChecker + lowerfilt + 3 + + + wordbreak + solr.WordBreakSolrSpellChecker + lowerfilt + true + true + 10 + + + multipleFields + lowerfilt1and2 + spellcheckerMultipleFields + false + + + + jarowinkler + lowerfilt + + org.apache.lucene.search.spell.JaroWinklerDistance + spellchecker2 + + + + solr.FileBasedSpellChecker + external + spellings.txt + UTF-8 + spellchecker3 + + + + freq + lowerfilt + spellcheckerFreq + + freq + false + + + fqcn + lowerfilt + spellcheckerFQCN + org.apache.solr.spelling.SampleComparator + false + + + perDict + org.apache.solr.handler.component.DummyCustomParamSpellChecker + lowerfilt + + + + + + + + + + false + + false + + 1 + + + spellcheck + + + + + direct + false + false + 1 + + + spellcheck + + + + + default + wordbreak + 20 + + + spellcheck + + + + + direct + wordbreak + 20 + + + spellcheck + + + + + dismax + lowerfilt1^1 + + + spellcheck + + + + + + + + + + + + + + + tvComponent + + + + + + string + elevate.xml + + + + + + explicit + + + elevate + + + + + + + + + + + + + 100 + + + + + + 70 + + + + + + + ]]> + ]]> + + + + + + + + + + + + + 10 + .,!? + + + + + + WORD + en + US + + + + + + + + + max-age=30, public + + + + solr + solrconfig.xml schema.xml + + + + prefix-${solr.test.sys.prop2}-suffix + + + + + + + uniq + uniq2 + uniq3 + + + + + + + + + regex_dup_A_s + x + x_x + + + + regex_dup_B_s + x + x_x + + + + + + + + regex_dup_A_s + x + x_x + + + regex_dup_B_s + x + x_x + + + + + + + text + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml new file mode 100644 index 00000000000..a5785634156 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml @@ -0,0 +1,36 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + false + text + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-query-parser-init.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-query-parser-init.xml new file mode 100644 index 00000000000..eb538fa620b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-query-parser-init.xml @@ -0,0 +1,37 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + false + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml new file mode 100644 index 00000000000..9d4f83d68c3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml @@ -0,0 +1,75 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender.xml new file mode 100644 index 00000000000..1404f8abb4f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender.xml @@ -0,0 +1,71 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + + + + + + + + + solr 0 10 /mock + rocks 0 10 /mock + + + + + + + + fast_warm 0 10 + /mock + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-repeater.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-repeater.xml new file mode 100644 index 00000000000..160bc4e8564 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-repeater.xml @@ -0,0 +1,61 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + ${solr.data.dir:} + + + + + + + + true + + + + + + + + + + + + + + commit + schema.xml + + + http://127.0.0.1:TEST_PORT/solr/replication + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-replication-legacy.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-replication-legacy.xml new file mode 100644 index 00000000000..c2f25ba77f0 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-replication-legacy.xml @@ -0,0 +1,62 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + ${solr.data.dir:} + + + + + + + + true + + + + + + + + + + + + + + commit + + + http://127.0.0.1:TEST_PORT/solr/collection1 + 00:00:01 + COMPRESSION + + + + + + + max-age=30, public + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-reqHandler.incl b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-reqHandler.incl new file mode 100644 index 00000000000..cc975040e14 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-reqHandler.incl @@ -0,0 +1,5 @@ + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml new file mode 100644 index 00000000000..643d9a62fc7 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml @@ -0,0 +1,61 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + ${solr.data.dir:} + + + + + + + + + + + dismax + + + responselog + + + + + + dismax + + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-schemaless.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-schemaless.xml new file mode 100644 index 00000000000..d2f842611c9 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-schemaless.xml @@ -0,0 +1,98 @@ + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + + + + + ${solr.ulog.dir:} + + + + + + + + + true + + + + + add-unknown-fields-to-the-schema + + + + + + + + [^\w-\.] + _ + + + + + + + yyyy-MM-dd['T'[HH:mm[:ss[.SSS]][z + yyyy-MM-dd['T'[HH:mm[:ss[,SSS]][z + yyyy-MM-dd HH:mm[:ss[.SSS]][z + yyyy-MM-dd HH:mm[:ss[,SSS]][z + [EEE, ]dd MMM yyyy HH:mm[:ss] z + EEEE, dd-MMM-yy HH:mm:ss z + EEE MMM ppd HH:mm:ss [z ]yyyy + + + + + text + + java.lang.Boolean + boolean + + + java.util.Date + pdates + + + java.lang.Long + java.lang.Integer + plongs + + + java.lang.Number + pdoubles + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-searcher-listeners1.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-searcher-listeners1.xml new file mode 100644 index 00000000000..c71f8baf9d4 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-searcher-listeners1.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + ${tests.solr.useColdSearcher:false} + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-snippet-processor.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-snippet-processor.xml new file mode 100644 index 00000000000..8c76857f32b --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-snippet-processor.xml @@ -0,0 +1,6 @@ + + + field-included + x + x_x + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml new file mode 100644 index 00000000000..fc707d461fd --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml @@ -0,0 +1,36 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + ${foo.foo1} + ${foo.foo2} + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingmergepolicyfactory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingmergepolicyfactory.xml new file mode 100644 index 00000000000..17e6f4c7a56 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingmergepolicyfactory.xml @@ -0,0 +1,56 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + in + org.apache.solr.util.RandomForceMergePolicyFactory + timestamp_i_dvo desc + + ${solr.tests.lockType:single} + + + + + + + ${solr.ulog.dir:} + + + + ${solr.autoCommit.maxTime:-1} + false + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingresponse.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingresponse.xml new file mode 100644 index 00000000000..1bb3c97a225 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingresponse.xml @@ -0,0 +1,44 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + true + + 20 + + 200 + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spatial.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spatial.xml new file mode 100644 index 00000000000..889d1c24968 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spatial.xml @@ -0,0 +1,42 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml new file mode 100644 index 00000000000..7760eb261e3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml @@ -0,0 +1,197 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + ${useCompoundFile:false} + ${solr.tests.maxBufferedDocs} + ${solr.tests.ramBufferSizeMB} + + 1000 + 10000 + ${solr.tests.lockType:single} + + false + 1 + + + + + + ${solr.data.dir:} + + + + + + + + lowerpunctfilt + + + default + lowerfilt + spellchecker1 + true + + + default_teststop + default_teststop + true + teststop + + + direct + solr.DirectSolrSpellChecker + 3 + 100 + teststop + + + direct_lowerfilt + solr.DirectSolrSpellChecker + 3 + 100 + lowerfilt + + + wordbreak + solr.WordBreakSolrSpellChecker + lowerfilt + true + true + MAX_FREQ + 10 + + + threshold + lowerfilt + spellcheckerThreshold + true + .29 + + + threshold_direct + solr.DirectSolrSpellChecker + lowerfilt + spellcheckerThreshold + true + .29 + + + multipleFields + lowerfilt1and2 + spellcheckerMultipleFields + true + + + + jarowinkler + lowerfilt + + org.apache.lucene.search.spell.JaroWinklerDistance + spellchecker2 + + + + solr.FileBasedSpellChecker + external + spellings.txt + UTF-8 + spellchecker3 + + + + freq + lowerfilt + spellcheckerFreq + + freq + true + + + fqcn + lowerfilt + spellcheckerFQCN + org.apache.solr.spelling.SampleComparator + true + + + perDict + org.apache.solr.handler.component.DummyCustomParamSpellChecker + lowerfilt + + + + + + + + + + false + + false + + 1 + + + spellcheck + + + + + dismax + lowerfilt1^1 + + + spellcheck + + + + + default + wordbreak + 20 + + + spellcheck + + + + + text + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml new file mode 100644 index 00000000000..a876fb6f27c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml @@ -0,0 +1,143 @@ + + + + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + suggest + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.jaspell.JaspellLookup + suggest + suggest + true + + + 0.0 + + + + + + + suggest_tst + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.tst.TSTLookup + suggest + suggest_tst + true + + + 0.0 + + + + + + + suggest_fst + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.FSTLookup + suggest + suggest_fst + true + + + 5 + true + + + + + + + suggest_wfst + org.apache.solr.spelling.suggest.Suggester + org.apache.solr.spelling.suggest.fst.WFSTLookupFactory + suggest + suggest_wfst + true + + + true + + + + + + + true + suggest + true + + + suggest_jaspell + + + + + + + true + suggest_tst + true + + + suggest_tst + + + + + + + true + suggest_fst + false + + + suggest_fst + + + + + + + true + suggest_wfst + false + + + suggest_wfst + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml new file mode 100644 index 00000000000..ac8ea622f0c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml @@ -0,0 +1,72 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + ${useCompoundFile:false} + + ${solr.data.dir:} + + + + + + ${solr.data.dir:} + + + + + + + true + + + + + + + + + + + + + + + *:* + + + all + + server-enabled.txt + + + + + solr + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent-context-filter-query.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent-context-filter-query.xml new file mode 100644 index 00000000000..36b6755bd23 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent-context-filter-query.xml @@ -0,0 +1,122 @@ + + + + + ${tests.luceneMatchVersion:LATEST} + + ${solr.data.dir:} + + + + + + + + + + + suggest_blended_infix_suggester + BlendedInfixLookupFactory + DocumentDictionaryFactory + cat + price + my_contexts_t + text + false + false + suggest_blended_infix_suggester + suggest_blended_infix_suggester + false + + + + suggest_blended_infix_suggester_string + BlendedInfixLookupFactory + DocumentDictionaryFactory + cat + price + my_contexts_s + text + false + false + suggest_blended_infix_suggester_string + suggest_blended_infix_suggester_string + false + + + + suggest_lookup_has_no_context_implementation + AnalyzingLookupFactory + DocumentDictionaryFactory + cat + price + text + false + false + suggest_lookup_has_no_context_implementation + suggest_lookup_has_no_context_implementation + false + + + + suggest_context_filtering_not_implemented + AnalyzingLookupFactory + DocumentDictionaryFactory + cat + price + text + false + false + my_contexts_t + suggest_context_filtering_not_implemented + suggest_context_filtering_not_implemented + false + + + + + suggest_context_implemented_but_not_configured + BlendedInfixLookupFactory + DocumentDictionaryFactory + cat + price + text + false + false + suggest_context_implemented_but_not_configured + suggest_context_implemented_but_not_configured + false + + + + + + true + 5 + + + suggest + + + + false + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml new file mode 100644 index 00000000000..857fb113687 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml @@ -0,0 +1,146 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + ${solr.data.dir:} + + + + + + + + + + + + suggest_fuzzy_with_high_freq_dict + FuzzyLookupFactory + cat + suggest_fuzzy_with_high_freq_dict + text + true + + 0.0 + + + + + suggest_fuzzy_file_based + FuzzyLookupFactory + fuzzysuggest.txt + suggest_fuzzy_file_based + text + true + + + + + suggest_fuzzy_doc_dict + FuzzyLookupFactory + DocumentDictionaryFactory + cat + price + text + true + false + + + + + suggest_fuzzy_doc_expr_dict + DocumentExpressionDictionaryFactory + FuzzyLookupFactory + cat + ((price * 2) + weight) + weight + price + suggest_fuzzy_doc_expr_dict + text + true + + + + + suggest_fuzzy_doc_dict_build_startup + FuzzyLookupFactory + DocumentDictionaryFactory + cat + price + text + false + true + + + + + suggest_fuzzy_doc_manal_build + FuzzyLookupFactory + DocumentDictionaryFactory + cat + price + text + false + false + suggest_fuzzy_doc_manal_build + + + + + suggest_doc_default_startup + AnalyzingLookupFactory + DocumentDictionaryFactory + cat + price + text + false + suggest_doc_default_startup + + + + + suggest_doc_default_startup_no_store + AnalyzingLookupFactory + DocumentDictionaryFactory + cat + price + text + false + + + + + + + true + + + suggest + + + + false + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tagger.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tagger.xml new file mode 100644 index 00000000000..c97ce085660 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tagger.xml @@ -0,0 +1,59 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + + + + + name_tag:[* TO *] + + + + + name_tag:[* TO *] + + + + + + + + + name_tag + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml new file mode 100644 index 00000000000..afd59541d55 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml @@ -0,0 +1,53 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + solr + solrconfig.xml schema.xml + + + + + + + + + + prefix-${solr.test.sys.prop2}-suffix + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-testxmlparser.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-testxmlparser.xml new file mode 100644 index 00000000000..401710e8d32 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-testxmlparser.xml @@ -0,0 +1,33 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + org.apache.solr.search.HandyQueryBuilder + org.apache.solr.search.HelloQueryBuilder + org.apache.solr.search.GoodbyeQueryBuilder + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml new file mode 100644 index 00000000000..4a5810040f8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml @@ -0,0 +1,41 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + ${useCompoundFile:false} + + 19 + 7 + 9 + 0.1 + + + 987 + 42 + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml new file mode 100644 index 00000000000..c760d9d19c2 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml @@ -0,0 +1,153 @@ + + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.hdfs.blockcache.enabled:true} + ${solr.hdfs.blockcache.blocksperbank:1024} + ${solr.hdfs.home:} + ${solr.hdfs.confdir:} + ${solr.hdfs.blockcache.global:true} + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + ${solr.autoCommit.maxSize:} + + + ${solr.ulog.dir:} + ${solr.ulog.maxNumLogsToKeep:10} + ${solr.ulog.numRecordsToKeep:100} + ${solr.ulog.tlogDfsReplication:2} + + + + + ${solr.autoCommit.maxTime:-1} + false + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + regex_dup_A_s + x + x_x + + + + regex_dup_B_s + x + x_x + + + + + + + + regex_dup_A_s + x + x_x + + + regex_dup_B_s + x + x_x + + + + + + + A + B + + + + + + + + + + + + + + + + + + text + + + + + + 0.0 + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-search.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-search.xml new file mode 100644 index 00000000000..9c4601e3d70 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-search.xml @@ -0,0 +1,53 @@ + + + + + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + ${solr.commitwithin.softcommit:true} + + + + + + explicit + true + text + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-update-minimal.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-update-minimal.xml new file mode 100644 index 00000000000..d3b90db50f6 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-update-minimal.xml @@ -0,0 +1,40 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + explicit + true + text + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-transformers.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-transformers.xml new file mode 100644 index 00000000000..ef38e8099e9 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-transformers.xml @@ -0,0 +1,89 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + x1 + x2 + + + + 100 + 2000 + + + + x1 + x2 + + + + + xA + xA + + + + + + + + 88 + 99 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml new file mode 100644 index 00000000000..e22ad695859 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml @@ -0,0 +1,652 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + solr.TrieIntField + solr.TrieLongField + solr.IntPointField + solr.LongPointField + + + + min_foo_l + + + max_foo_l + + + ; + + primary_author_s1 + + + + primary_author_s1 + first_foo_l + + + + + + + + + + + + + foo_t + + + + + + + + foo_t + + + + + + foo.* + bar.* + + .*HOSS.* + + + + + + foo.* + bar.* + + + solr.TrieDateField + solr.DatePointField + + + .*HOSS.* + + + + + + foo.* + bar.* + + + solr.TrieDateField + .*HOSS.* + + + + + + + name + foo_t + + + + + + name + foo_t + + + + + + + foo.* + bar.*_s + + + + + + nametext + text_sw + + + + + + solr.TrieDateField + solr.DatePointField + solr.StrField + + + + + + solr.TrieDateField + solr.StrField + + foo.* + + + + + + + + + + + + + + + + + + foo.* + yak.* + + + + + + + + + + + foo_s + + + + + string + ; + + + + + + foo_s + bar_s + + + + + foo_s + bar_s + + + + + foo_i + foo_s + bar_s + + + + + foo_i + foo_s + bar_s + + + + + + html_s + + + + + + + trunc + 5 + + + + + + count_field + + + + + + + + + + false + + + + + + true + + + + + + foo.* + false + + + + + + foo.* + + false + + + + + + + false + + + + + + true + + + + + + .*_raw + + + + + + source1_s + dest_s + + + + + + source1_s + + source\d(_s) + dest$1 + + + + + + + source1_s + source2_s + dest_s + + + + + + source1_s + source2_s + + source\d(_s) + dest$1 + + + + + + + + source1_s + source2_s + + dest_s + + + + + + + source1_s + source2_s + + + source\d(_s) + dest$1 + + + + + + + + source\d_.* + + source0_.* + + + dest_s + + + + + + + source\d_.* + + source0_.* + + + + source\d(_s) + dest$1 + + + + + + + source\d_.* + dest_s + + + + + + + foo.* + + + + x(\d) + y$1 + + + + + + + field1 + toField + + + toField + 3 + + + + + + field1 + toField + + + field1 + + + + + + toField + + + field1 + toField + + + + + + field1 + field2 + toField + + + ; + toField + + + + + + field(.*) + toField + + + toField + + + + + + + category + category_s + + + + authors + editors + + contributors + + + + .*_price$ + + list_price + + + all_prices + + + + ^feat(.*)s$ + + + ^feat(.*)s$ + key_feat$1 + + + + + ^feat(.*)s$ + best_feat$1 + + + + + + category + category_count + + + category_count + + + category_count + 0 + + + + + + content + title + \s+ + X + + + + + + content + title + (try) + <$1> + true + + + + + + content + title + (try) + <$1> + + + + + + content + title + (try) + <$1> + false + + + + + + content + title + (try) + <$1> + true + + + + + + processor_default_s + X + + + processor_default_i + 42 + + + uuid + + + timestamp + + + + + + + id + + + + + + + + + + + uniq_.* + + + + + + subject + title + teststop + nonexistent + ssto + sind + simple + + + + + + + subject + title + teststop + nonexistent + ssto + sind + json + + + + + + + + + + + + 200 + Thou shall not issue a commit! + + + + + + + Thou shall not issue an optimize, but commits are OK! + true + + + + + + + 10 + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-warmer-randommergepolicyfactory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-warmer-randommergepolicyfactory.xml new file mode 100644 index 00000000000..21101b1d9e6 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-warmer-randommergepolicyfactory.xml @@ -0,0 +1,46 @@ + + + + + + + ${tests.luceneMatchVersion:LATEST} + ${solr.data.dir:} + + + + + + + + + + ${useCompoundFile} + ${solr.tests.maxBufferedDocs} + ${solr.tests.ramBufferSizeMB} + + 1000 + 10000 + single + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-withgethandler.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-withgethandler.xml new file mode 100644 index 00000000000..59879ce6ca3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-withgethandler.xml @@ -0,0 +1,52 @@ + + + + + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.commitwithin.softcommit:true} + + + + + + explicit + true + text + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml new file mode 100644 index 00000000000..17df214cb71 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml @@ -0,0 +1,36 @@ + + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml new file mode 100644 index 00000000000..de5c714aa23 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml @@ -0,0 +1,51 @@ + + + + + + + + + ${useCompoundFile:false} + + ${solr.tests.maxBufferedDocs} + ${solr.tests.ramBufferSizeMB} + ${solr.tests.maxCommitMergeWaitTime:-1} + ${solr.tests.ramPerThreadHardLimitMB} + + + + 1000 + 10000 + + + ${solr.tests.lockType:single} + + ${solr.tests.infostream:false} + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml new file mode 100644 index 00000000000..c6b80c75ee1 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml @@ -0,0 +1,532 @@ + + + + + + + + + + + + ${solr.data.dir:} + + + + 1000000 + 2000000 + 3000000 + 4000000 + ${solr.hdfs.home:} + ${solr.hdfs.blockcache.enabled:true} + ${solr.hdfs.blockcache.global:true} + ${solr.hdfs.blockcache.write.enabled:false} + ${solr.hdfs.blockcache.blocksperbank:10} + ${solr.hdfs.blockcache.slab.count:1} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + + + + ${solr.autoCommit.maxTime:-1} + + + + + + ${solr.ulog.dir:} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + ${solr.max.booleanClauses:1024} + + + + + + + + + + + + true + + + + + + 10 + + + + + + + + + + + + 2000 + + + + + + + + true + + + + + dismax + *:* + 0.01 + + text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0 + + + text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5 + + + weight^0.5 recip(rord(id),1,1000,1000)^0.3 + + + 3<-1 5<-2 6<90% + + 100 + + + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + + lowerpunctfilt + + + default + lowerfilt + spellchecker1 + false + + + direct + DirectSolrSpellChecker + lowerfilt + 3 + + + wordbreak + solr.WordBreakSolrSpellChecker + lowerfilt + true + true + 10 + + + multipleFields + lowerfilt1and2 + spellcheckerMultipleFields + false + + + + jarowinkler + lowerfilt + + org.apache.lucene.search.spell.JaroWinklerDistance + spellchecker2 + + + + solr.FileBasedSpellChecker + external + spellings.txt + UTF-8 + spellchecker3 + + + + freq + lowerfilt + spellcheckerFreq + + freq + false + + + fqcn + lowerfilt + spellcheckerFQCN + org.apache.solr.spelling.SampleComparator + false + + + perDict + org.apache.solr.handler.component.DummyCustomParamSpellChecker + lowerfilt + + + + + + + + + + + + + false + + false + + 1 + + + spellcheck + + + + + direct + false + false + 1 + + + spellcheck + + + + + default + wordbreak + 20 + + + spellcheck + + + + + direct + wordbreak + 20 + + + spellcheck + + + + + dismax + lowerfilt1^1 + + + spellcheck + + + + + + + + + + + + + + + tvComponent + + + + + + + + + + + + 100 + + + + + + 70 + + + + + + + ]]> + ]]> + + + + + + + + + + + + + 10 + .,!? + + + + + + WORD + en + US + + + + + + + + + max-age=30, public + + + + + + foo_s + + + foo_s:bar + + + + + foo_s + foo_s:bar + + + + + solr + solrconfig.xml schema.xml + + + + prefix-${solr.test.sys.prop2}-suffix + + + + + + + uniq + uniq2 + uniq3 + + + + + + + + + regex_dup_A_s + x + x_x + + + + regex_dup_B_s + x + x_x + + + + + + + + regex_dup_A_s + x + x_x + + + regex_dup_B_s + x + x_x + + + + + + + org.apache.solr.rest.ManagedResourceStorage$InMemoryStorageIO + + + + + + text + + + + + + text + + + nl + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_SimpleTextCodec.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_SimpleTextCodec.xml new file mode 100644 index 00000000000..7b0c3e368ba --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_SimpleTextCodec.xml @@ -0,0 +1,26 @@ + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec.xml new file mode 100644 index 00000000000..ad080961d9f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec.xml @@ -0,0 +1,28 @@ + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + ${tests.COMPRESSION_MODE:BEST_COMPRESSION} + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec2.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec2.xml new file mode 100644 index 00000000000..c4a8ae73dfe --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec2.xml @@ -0,0 +1,26 @@ + + + + + ${tests.luceneMatchVersion:LATEST} + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_perf.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_perf.xml new file mode 100644 index 00000000000..29fbd3d6f97 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig_perf.xml @@ -0,0 +1,70 @@ + + + + + ${tests.luceneMatchVersion:LATEST} + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + true + 20 + 200 + false + + + + + + + + + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stemdict.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stemdict.txt new file mode 100644 index 00000000000..f57a4ad490f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stemdict.txt @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +# test that we can override the stemming algorithm with our own mappings +# these must be tab-separated +monkeys monkey +otters otter +# some crazy ones that a stemmer would never do +dogs cat diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-1.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-1.txt new file mode 100644 index 00000000000..8dfe80902d2 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-1.txt @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +foo +bar \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-2.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-2.txt new file mode 100644 index 00000000000..646b7ff4ddb --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-2.txt @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +junk +more \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-snowball.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-snowball.txt new file mode 100644 index 00000000000..1c0c6f51142 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stop-snowball.txt @@ -0,0 +1,10 @@ + | This is a file in snowball format, empty lines are ignored, '|' is a comment + | Additionally, multiple words can be on the same line, allowing stopwords to be + | arranged in tables (useful in some languages where they might inflect) + + | fictitious table below + +|third person singular +|Subject Object Possessive Reflexive +he him his himself| masculine +she her hers herself| feminine diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stoptypes-1.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stoptypes-1.txt new file mode 100644 index 00000000000..456348ea9dc --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stoptypes-1.txt @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stoptypes-2.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stoptypes-2.txt new file mode 100644 index 00000000000..d8a3810c26c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stoptypes-2.txt @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwithbom.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwithbom.txt new file mode 100644 index 00000000000..eb5f6e1c0f8 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwithbom.txt @@ -0,0 +1 @@ +BOMsAreEvil diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwords.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwords.txt new file mode 100644 index 00000000000..b5824da3263 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwords.txt @@ -0,0 +1,58 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +# a couple of test stopwords to test that the words are really being +# configured from this file: +stopworda +stopwordb + +#Standard english stop words taken from Lucene's StopAnalyzer +a +an +and +are +as +at +be +but +by +for +if +in +into +is +it +no +not +of +on +or +s +such +t +that +the +their +then +there +these +they +this +to +was +will +with + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwordsWrongEncoding.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwordsWrongEncoding.txt new file mode 100644 index 00000000000..0d305c88c59 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/stopwordsWrongEncoding.txt @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# stopwords in the wrong encoding (ISO-8859-1). +# tests resourceloader's ability to report wrongly encoded files. +bañadores diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/synonyms.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/synonyms.txt new file mode 100644 index 00000000000..d7feb34ee64 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/synonyms.txt @@ -0,0 +1,54 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +#some test synonym mappings unlikely to appear in real input text +aaa => aaaa +bbb => bbbb1 bbbb2 +ccc => cccc1,cccc2 +a\=>a => b\=>b +a\,a => b\,b +fooaaa,baraaa,bazaaa + +# Some synonym groups specific to this example +GB,gib,gigabyte,gigabytes +MB,mib,megabyte,megabytes +Television, Televisions, TV, TVs +#notice we use "gib" instead of "GiB" so any WordDelimiterGraphFilter coming +#after us won't split it into two words. + +# Synonym mappings can be used for spelling correction too +pixima => pixma + +# multiword synonyms +wi fi => wifi +crow blackbird, grackle + +# Synonyms used in semantic expansion +tabby => tabby, cat, feline, animal +persian => persian, cat, feline, animal + +jeans, denim pants + +# Boosted Synonyms +tiger, tigre|0.9 +lynx => lince|0.8, lynx_canadensis|0.9 + +leopard, big cat|0.8, bagheera|0.9, panthera pardus|0.85 +lion => panthera leo|0.9, simba leo|0.8, kimba|0.75 + +panthera pardus, leopard|0.6 +panthera tigris => tiger|0.99 + +snow leopard, panthera uncia|0.9, big cat|0.8, white_leopard|0.6 +panthera onca => jaguar|0.95, big cat|0.85, black panther|0.65 +panthera blytheae, oldest|0.5 ancient|0.9 panthera \ No newline at end of file diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/wdftypes.txt b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/wdftypes.txt new file mode 100644 index 00000000000..9a453c8da9f --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/wdftypes.txt @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# A customized type mapping for WordDelimiterGraphFilterFactory +# the allowable types are: LOWER, UPPER, ALPHA, DIGIT, ALPHANUM, SUBWORD_DELIM +# +# the default for any character without a mapping is always computed from +# Unicode character properties + +# Map the $, %, '.', and ',' characters to DIGIT +# This might be useful for financial data. +$ => DIGIT +% => DIGIT +. => DIGIT +\u002C => DIGIT + +# in some cases you might not want to split on ZWJ +# this also tests the case where we need a bigger byte[] +# see http://en.wikipedia.org/wiki/Zero-width_joiner +\u200D => ALPHANUM diff --git a/solr/core/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java b/solr/contrib/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java similarity index 100% rename from solr/core/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java rename to solr/contrib/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java diff --git a/solr/core/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java b/solr/contrib/hdfs/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java similarity index 100% rename from solr/core/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java rename to solr/contrib/hdfs/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java diff --git a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java similarity index 97% rename from solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java index 726a8060be6..23fe32bffc0 100644 --- a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java @@ -45,7 +45,7 @@ public class MoveReplicaHDFSTest extends MoveReplicaTest { @BeforeClass public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); + dfsCluster = HdfsTestUtil.setupClass(LuceneTestCase.createTempDir().toFile().getAbsolutePath()); } @AfterClass diff --git a/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCloudIncrementalBackupTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/HdfsCloudIncrementalBackupTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCloudIncrementalBackupTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/HdfsCloudIncrementalBackupTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/FakeGroupMapping.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/FakeGroupMapping.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/FakeGroupMapping.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/FakeGroupMapping.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java diff --git a/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java diff --git a/solr/core/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java similarity index 95% rename from solr/core/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java index 3d6ab69b297..a6a5c67390a 100644 --- a/solr/core/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java @@ -28,6 +28,7 @@ import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.cloud.api.collections.AbstractBackupRepositoryTest; import org.apache.solr.cloud.hdfs.HdfsTestUtil; import org.apache.solr.common.util.IOUtils; @@ -48,7 +49,7 @@ public class HdfsBackupRepositoryIntegrationTest extends AbstractBackupRepositor @BeforeClass public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); + dfsCluster = HdfsTestUtil.setupClass(LuceneTestCase.createTempDir().toFile().getAbsolutePath()); hdfsUri = HdfsTestUtil.getURI(dfsCluster); try { URI uri = new URI(hdfsUri); @@ -74,7 +75,7 @@ public static void setupClass() throws Exception { System.setProperty("solr.hdfs.default.backup.path", "/backup"); System.setProperty("solr.hdfs.home", hdfsUri + "/solr"); - useFactory("solr.StandardDirectoryFactory"); + SolrTestCaseJ4.useFactory("solr.StandardDirectoryFactory"); } @AfterClass diff --git a/solr/core/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryTest.java diff --git a/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java b/solr/contrib/hdfs/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java similarity index 100% rename from solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java rename to solr/contrib/hdfs/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java diff --git a/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java similarity index 98% rename from solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java index 3b08babd3b9..7dda073fbc3 100644 --- a/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java @@ -69,7 +69,7 @@ public CheckHdfsIndexTest() { @BeforeClass public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); + dfsCluster = HdfsTestUtil.setupClass(LuceneTestCase.createTempDir().toFile().getAbsolutePath()); path = new Path(HdfsTestUtil.getURI(dfsCluster) + "/solr/"); } diff --git a/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java b/solr/contrib/hdfs/src/test/org/apache/solr/search/TestRecoveryHdfs.java similarity index 100% rename from solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java rename to solr/contrib/hdfs/src/test/org/apache/solr/search/TestRecoveryHdfs.java diff --git a/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java similarity index 95% rename from solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java index bb2963eda35..1322475bfb6 100644 --- a/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java @@ -38,7 +38,7 @@ public void testBlockCache() { BlockCache blockCache = new BlockCache(new Metrics(), true, totalMemory, slabSize, blockSize); byte[] buffer = new byte[1024]; - Random random = random(); + Random random = LuceneTestCase.random(); byte[] newData = new byte[blockSize]; AtomicLong hitsInCache = new AtomicLong(); AtomicLong missesInCache = new AtomicLong(); @@ -70,7 +70,7 @@ public void testBlockCache() { long t3 = System.nanoTime(); if (blockCache.fetch(blockCacheKey, buffer)) { fetchTime += (System.nanoTime() - t3); - assertTrue("buffer content differs", Arrays.equals(testData, buffer)); + Assert.assertTrue("buffer content differs", Arrays.equals(testData, buffer)); } } System.out.println("Cache Hits = " + hitsInCache.get()); @@ -97,7 +97,7 @@ private static byte getByte(long pos) { @Test public void testBlockCacheConcurrent() throws Exception { - Random rnd = random(); + Random rnd = LuceneTestCase.random(); final int blocksInTest = 400; // pick something bigger than 256, since that would lead to a slab size of 64 blocks and the bitset locks would consist of a single word. final int blockSize = 64; @@ -219,7 +219,7 @@ public void test() { System.out.println("Cache Store Fails = " + storeFails.get()); System.out.println("Blocks with Errors = " + validateFails.get()); - assertFalse("cached bytes differ from expected", failed.get()); + Assert.assertFalse("cached bytes differ from expected", failed.get()); } @@ -231,7 +231,7 @@ static class Val { // Sanity test the underlying concurrent map that BlockCache is using, in the same way that we use it. @Test public void testCacheConcurrent() throws Exception { - Random rnd = random(); + Random rnd = LuceneTestCase.random(); // TODO: introduce more randomness in cache size, hit rate, etc final int blocksInTest = 400; @@ -257,7 +257,7 @@ public void testCacheConcurrent() throws Exception { return; } } - assertEquals("cache key differs from value's key", k, (Long) v.key); + Assert.assertEquals("cache key differs from value's key", k, (Long) v.key); if (!v.live.compareAndSet(true, false)) { throw new RuntimeException("listener called more than once! k=" + k + " v=" + v + " removalCause=" + removalCause); // return; // use this variant if listeners may be called more than once @@ -327,7 +327,7 @@ public void test() { Val v = cache.getIfPresent(k); if (v != null) { hits.incrementAndGet(); - assertEquals("cache key differs from value's key", k, (Long) v.key); + Assert.assertEquals("cache key differs from value's key", k, (Long) v.key); } if (v == null || odds(updateAnywayOdds)) { @@ -357,8 +357,8 @@ public void test() { // Thread.sleep(1000); // need to wait if executor is used for listener? long cacheSize = cache.estimatedSize(); System.out.println("Done! # of Elements = " + cacheSize + " inserts=" + inserts.get() + " removals=" + removals.get() + " hits=" + hits.get() + " maxObservedSize=" + maxObservedSize); - assertEquals("cache size different from (inserts - removal)", cacheSize, inserts.get() - removals.get()); - assertFalse(failed.get()); + Assert.assertEquals("cache size different from (inserts - removal)", cacheSize, inserts.get() - removals.get()); + Assert.assertFalse(failed.get()); } diff --git a/solr/core/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java similarity index 89% rename from solr/core/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java index 28b1f21fc3b..0745cb00288 100644 --- a/solr/core/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java @@ -108,11 +108,11 @@ public void releaseResources() {} @Before public void setUp() throws Exception { super.setUp(); - file = createTempDir().toFile(); + file = LuceneTestCase.createTempDir().toFile(); FSDirectory dir = FSDirectory.open(new File(file, "base").toPath()); mapperCache = new MapperCache(); - if (random().nextBoolean()) { + if (LuceneTestCase.random().nextBoolean()) { Metrics metrics = new Metrics(); int blockSize = 8192; int slabSize = blockSize * 16384; @@ -123,7 +123,7 @@ public void setUp() throws Exception { } else { directory = new BlockDirectory("test", dir, mapperCache, null, true, true); } - random = random(); + random = LuceneTestCase.random(); } @After @@ -142,7 +142,7 @@ public void testEOF() throws IOException { createFile(name, fsDir, directory); long fsLength = fsDir.fileLength(name); long hdfsLength = directory.fileLength(name); - assertEquals(fsLength, hdfsLength); + Assert.assertEquals(fsLength, hdfsLength); testEof(name, fsDir, fsLength); testEof(name, directory, hdfsLength); fsDir.close(); @@ -154,7 +154,7 @@ private void testEof(String name, Directory directory, long length) throws IOExc input.seek(length); try { input.readByte(); - fail("should throw eof"); + Assert.fail("should throw eof"); } catch (IOException e) { } } finally { @@ -176,7 +176,7 @@ public void testRandomAccessWrites() throws IOException { } } catch (Exception e) { e.printStackTrace(); - fail("Test failed on pass [" + i + "]"); + Assert.fail("Test failed on pass [" + i + "]"); } long t2 = System.nanoTime(); System.out.println("Total time is " + ((t2 - t1)/1000000) + "ms"); @@ -195,7 +195,7 @@ private void assertInputsEquals(String name, Directory fsDir, Directory hdfs) th int reads = random.nextInt(MAX_NUMBER_OF_READS); IndexInput fsInput = fsDir.openInput(name, new IOContext()); IndexInput hdfsInput = hdfs.openInput(name, new IOContext()); - assertEquals(fsInput.length(), hdfsInput.length()); + Assert.assertEquals(fsInput.length(), hdfsInput.length()); int fileLength = (int) fsInput.length(); for (int i = 0; i < reads; i++) { int rnd; @@ -223,7 +223,7 @@ private void assertInputsEquals(String name, Directory fsDir, Directory hdfs) th hdfsInput.readBytes(hdfsBuf, offset, length); for (int f = offset; f < length; f++) { if (fsBuf[f] != hdfsBuf[f]) { - fail("read [" + i + "]"); + Assert.fail("read [" + i + "]"); } } } @@ -270,26 +270,26 @@ public void ensureCacheConfigurable() throws Exception { IOContext mergeContext = new IOContext(new MergeInfo(1,1,false,1)); BlockDirectory d = directory; - assertTrue(d.useReadCache("", IOContext.DEFAULT)); + Assert.assertTrue(d.useReadCache("", IOContext.DEFAULT)); if (d.getCache() instanceof MapperCache) { - assertTrue(d.useWriteCache("", IOContext.DEFAULT)); + Assert.assertTrue(d.useWriteCache("", IOContext.DEFAULT)); } else { - assertFalse(d.useWriteCache("", IOContext.DEFAULT)); + Assert.assertFalse(d.useWriteCache("", IOContext.DEFAULT)); } - assertFalse(d.useWriteCache("", mergeContext)); + Assert.assertFalse(d.useWriteCache("", mergeContext)); d = new BlockDirectory("test", directory, mapperCache, null, true, false); - assertTrue(d.useReadCache("", IOContext.DEFAULT)); - assertFalse(d.useWriteCache("", IOContext.DEFAULT)); - assertFalse(d.useWriteCache("", mergeContext)); + Assert.assertTrue(d.useReadCache("", IOContext.DEFAULT)); + Assert.assertFalse(d.useWriteCache("", IOContext.DEFAULT)); + Assert.assertFalse(d.useWriteCache("", mergeContext)); d = new BlockDirectory("test", directory, mapperCache, null, false, true); - assertFalse(d.useReadCache("", IOContext.DEFAULT)); + Assert.assertFalse(d.useReadCache("", IOContext.DEFAULT)); if (d.getCache() instanceof MapperCache) { - assertTrue(d.useWriteCache("", IOContext.DEFAULT)); + Assert.assertTrue(d.useWriteCache("", IOContext.DEFAULT)); } else { - assertFalse(d.useWriteCache("", IOContext.DEFAULT)); + Assert.assertFalse(d.useWriteCache("", IOContext.DEFAULT)); } - assertFalse(d.useWriteCache("", mergeContext)); + Assert.assertFalse(d.useWriteCache("", mergeContext)); } } diff --git a/solr/core/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java similarity index 92% rename from solr/core/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java index 4de783dd81b..bc6d74d4bca 100644 --- a/solr/core/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java @@ -40,8 +40,8 @@ public class BufferStoreTest extends SolrTestCase { public void setup() { metrics = new Metrics(); SolrMetricManager metricManager = new SolrMetricManager(); - String registry = TestUtil.randomSimpleString(random(), 2, 10); - String scope = TestUtil.randomSimpleString(random(), 2, 10); + String registry = TestUtil.randomSimpleString(LuceneTestCase.random(), 2, 10); + String scope = TestUtil.randomSimpleString(LuceneTestCase.random(), 2, 10); SolrMetricsContext solrMetricsContext = new SolrMetricsContext(metricManager, registry, "foo"); metrics.initializeMetrics(solrMetricsContext, scope); metricsMap = (MetricsMap) ((SolrMetricManager.GaugeWrapper)metricManager.registry(registry).getMetrics().get("CACHE." + scope + ".hdfsBlockCache")).getGauge(); @@ -96,9 +96,9 @@ private void assertRawMetricCounts(int allocated, int lost) { private void assertGaugeMetricsChanged(boolean allocated, boolean lost) { Map stats = metricsMap.getValue(); - assertEquals("Buffer allocation metric not updating correctly.", + Assert.assertEquals("Buffer allocation metric not updating correctly.", allocated, isMetricPositive(stats, "buffercache.allocations")); - assertEquals("Buffer lost metric not updating correctly.", + Assert.assertEquals("Buffer lost metric not updating correctly.", lost, isMetricPositive(stats, "buffercache.lost")); } diff --git a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java diff --git a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java similarity index 100% rename from solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java rename to solr/contrib/hdfs/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java diff --git a/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java b/solr/contrib/hdfs/src/test/org/apache/solr/update/TestHdfsUpdateLog.java similarity index 100% rename from solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java rename to solr/contrib/hdfs/src/test/org/apache/solr/update/TestHdfsUpdateLog.java diff --git a/solr/core/build.gradle b/solr/core/build.gradle index ec1fb6b40f2..2375c0e2d90 100644 --- a/solr/core/build.gradle +++ b/solr/core/build.gradle @@ -109,7 +109,6 @@ dependencies { implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false } implementation ('org.apache.hadoop:hadoop-auth') { transitive = false } implementation ('org.apache.hadoop:hadoop-common') { transitive = false } - implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false } testImplementation 'org.apache.commons:commons-compress' // required for customized hadoop classes implementation ('net.hydromatic:eigenbase-properties') { transitive = false } @@ -127,8 +126,7 @@ dependencies { testImplementation project(':solr:test-framework') testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } - testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } - testImplementation ('org.apache.hadoop:hadoop-hdfs::tests') { transitive = false } + testImplementation ('org.apache.hadoop:hadoop-minikdc') { transitive = false } testImplementation 'org.apache.logging.log4j:log4j-1.2-api' From edf037f1492ccf3be4a33c3517e500ee7cc0db52 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Fri, 19 Mar 2021 23:52:05 +0100 Subject: [PATCH 02/52] HDFS contrib module: moved the hdfs block directory implementation to the hdfs module --- .../src/java/org/apache/solr/store/blockcache/BlockCache.java | 0 .../java/org/apache/solr/store/blockcache/BlockCacheKey.java | 0 .../org/apache/solr/store/blockcache/BlockCacheLocation.java | 0 .../java/org/apache/solr/store/blockcache/BlockDirectory.java | 0 .../org/apache/solr/store/blockcache/BlockDirectoryCache.java | 0 .../src/java/org/apache/solr/store/blockcache/BlockLocks.java | 0 .../src/java/org/apache/solr/store/blockcache/BufferStore.java | 0 .../hdfs}/src/java/org/apache/solr/store/blockcache/Cache.java | 0 .../org/apache/solr/store/blockcache/CachedIndexOutput.java | 0 .../apache/solr/store/blockcache/CustomBufferedIndexInput.java | 0 .../src/java/org/apache/solr/store/blockcache/Metrics.java | 0 .../apache/solr/store/blockcache/ReusedBufferedIndexOutput.java | 0 .../hdfs}/src/java/org/apache/solr/store/blockcache/Store.java | 0 .../src/java/org/apache/solr/store/blockcache/package-info.java | 0 .../test/org/apache/solr/store/blockcache/BlockCacheTest.java | 2 ++ .../org/apache/solr/store/blockcache/BlockDirectoryTest.java | 2 ++ .../test/org/apache/solr/store/blockcache/BufferStoreTest.java | 2 ++ 17 files changed, 6 insertions(+) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/BlockCache.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/BlockCacheKey.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/BlockCacheLocation.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/BlockDirectory.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/BlockDirectoryCache.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/BlockLocks.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/BufferStore.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/Cache.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/CustomBufferedIndexInput.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/Metrics.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/ReusedBufferedIndexOutput.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/Store.java (100%) rename solr/{core => contrib/hdfs}/src/java/org/apache/solr/store/blockcache/package-info.java (100%) diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/BlockCache.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockCache.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/BlockCache.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockCache.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/BlockCacheKey.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockCacheKey.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/BlockCacheKey.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockCacheKey.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/BlockCacheLocation.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockCacheLocation.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/BlockCacheLocation.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockCacheLocation.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/BlockDirectory.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockDirectory.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/BlockDirectory.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockDirectory.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/BlockDirectoryCache.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockDirectoryCache.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/BlockDirectoryCache.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockDirectoryCache.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/BlockLocks.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockLocks.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/BlockLocks.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BlockLocks.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/BufferStore.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BufferStore.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/BufferStore.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/BufferStore.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/Cache.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/Cache.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/Cache.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/Cache.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/CustomBufferedIndexInput.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/CustomBufferedIndexInput.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/CustomBufferedIndexInput.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/CustomBufferedIndexInput.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/Metrics.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/Metrics.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/Metrics.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/Metrics.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/ReusedBufferedIndexOutput.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/ReusedBufferedIndexOutput.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/ReusedBufferedIndexOutput.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/ReusedBufferedIndexOutput.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/Store.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/Store.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/Store.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/Store.java diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/package-info.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/package-info.java similarity index 100% rename from solr/core/src/java/org/apache/solr/store/blockcache/package-info.java rename to solr/contrib/hdfs/src/java/org/apache/solr/store/blockcache/package-info.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java index 1322475bfb6..3b646d09ef7 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java @@ -22,8 +22,10 @@ import java.util.concurrent.atomic.AtomicLong; import com.github.benmanes.caffeine.cache.*; +import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.SolrTestCase; +import org.junit.Assert; import org.junit.Test; public class BlockCacheTest extends SolrTestCase { diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java index 0745cb00288..c3d2d2cda1c 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java @@ -30,8 +30,10 @@ import org.apache.lucene.store.IndexOutput; import org.apache.lucene.store.MergeInfo; import org.apache.lucene.util.IOUtils; +import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.SolrTestCaseJ4; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java index bc6d74d4bca..1dadefb965f 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java @@ -19,12 +19,14 @@ import java.math.BigDecimal; import java.util.Map; +import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.SolrTestCase; import org.apache.solr.metrics.MetricsMap; import org.apache.solr.metrics.SolrMetricManager; import org.apache.solr.metrics.SolrMetricsContext; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; From 7d4903c86e66c7b0984be81a4da5524bcc05e69e Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Mon, 27 Jul 2020 15:28:02 +0200 Subject: [PATCH 03/52] HDFS contrib module: removed HDFS direct reference from UpdateHandler --- solr/contrib/hdfs/build.gradle | 14 +++++++++++++- .../java/org/apache/solr/update/UpdateHandler.java | 11 ++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/solr/contrib/hdfs/build.gradle b/solr/contrib/hdfs/build.gradle index c06e1549376..89ba1edd274 100644 --- a/solr/contrib/hdfs/build.gradle +++ b/solr/contrib/hdfs/build.gradle @@ -20,7 +20,19 @@ apply plugin: 'java-library' description = 'HDFS Package' dependencies { - implementation project(':solr:core') + implementation project(':solr:core') + + implementation ('org.apache.hadoop:hadoop-common') + implementation ('org.apache.hadoop:hadoop-hdfs-client', { + exclude group: "com.squareup.okhttp", module: "okhttp" + exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations" + exclude group: "com.fasterxml.jackson.core", module: "jackson-databind" + }) + + api('com.github.ben-manes.caffeine:caffeine', { + exclude group: "org.checkerframework", module: "checker-qual" + }) + testImplementation project(':solr:test-framework') testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } diff --git a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java index ade92401370..c819755932e 100644 --- a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java +++ b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java @@ -103,7 +103,7 @@ protected void callPostOptimizeCallbacks() { public UpdateHandler(SolrCore core) { this(core, null); } - + public UpdateHandler(SolrCore core, UpdateLog updateLog) { this.core=core; idField = core.getLatestSchema().getUniqueKeyField(); @@ -115,12 +115,9 @@ public UpdateHandler(SolrCore core, UpdateLog updateLog) { boolean skipUpdateLog = core.getCoreDescriptor().getCloudDescriptor() != null && !core.getCoreDescriptor().getCloudDescriptor().requiresTransactionLog(); if (updateLog == null && ulogPluginInfo != null && ulogPluginInfo.isEnabled() && !skipUpdateLog) { DirectoryFactory dirFactory = core.getDirectoryFactory(); - if (dirFactory instanceof HdfsDirectoryFactory) { - ulog = new HdfsUpdateLog(((HdfsDirectoryFactory)dirFactory).getConfDir()); - } else { - ulog = ulogPluginInfo.className == null ? new UpdateLog(): - core.getResourceLoader().newInstance(ulogPluginInfo, UpdateLog.class, true); - } + + ulog = ulogPluginInfo.className == null ? new UpdateLog(): + core.getResourceLoader().newInstance(ulogPluginInfo, UpdateLog.class, true); if (!core.isReloaded() && !dirFactory.isPersistent()) { ulog.clearLog(core, ulogPluginInfo); From ee32935512d21631b2d1cce4308ffe238bee058e Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Wed, 23 Jun 2021 00:35:24 +0200 Subject: [PATCH 04/52] HDFS contrib module: moved shared core test classes to fixtures --- gradle/validation/forbidden-apis.gradle | 20 +++++++++++++++++++ solr/contrib/hdfs/build.gradle | 2 ++ solr/core/build.gradle | 1 + .../solr/schema/MockExchangeRateProvider.java | 0 .../apache/solr/search/facet/DebugAgg.java | 0 .../search/function/NvlValueSourceParser.java | 0 .../similarities/CustomSimilarityFactory.java | 0 .../MockConfigurableSimilarity.java | 0 .../apache/solr/util/MockCoreContainer.java | 0 9 files changed, 23 insertions(+) rename solr/core/src/{test => testFixtures/java}/org/apache/solr/schema/MockExchangeRateProvider.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/solr/search/facet/DebugAgg.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/solr/search/function/NvlValueSourceParser.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/solr/search/similarities/CustomSimilarityFactory.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/solr/search/similarities/MockConfigurableSimilarity.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/solr/util/MockCoreContainer.java (100%) diff --git a/gradle/validation/forbidden-apis.gradle b/gradle/validation/forbidden-apis.gradle index 4965182d570..842856c6cd6 100644 --- a/gradle/validation/forbidden-apis.gradle +++ b/gradle/validation/forbidden-apis.gradle @@ -89,6 +89,26 @@ allprojects { prj -> ] } + + // Configure defaults for sourceSets.testFixtures (if present). + tasks.matching { it.name == "forbiddenApisTestFixtures" }.all { + bundledSignatures += [ + 'jdk-unsafe', + 'jdk-deprecated', + 'jdk-non-portable', + 'jdk-reflection', + ] + + // test fixtures use the same signature file as the tests + signaturesFiles = files( + file("${resources}/defaults.tests.txt") + ) + + suppressAnnotations += [ + "**.SuppressForbidden" + ] + } + // Configure defaults for sourceSets.tools (if present). tasks.matching { it.name == "forbiddenApisTools" }.all { bundledSignatures += [ diff --git a/solr/contrib/hdfs/build.gradle b/solr/contrib/hdfs/build.gradle index 89ba1edd274..c9e9c619e01 100644 --- a/solr/contrib/hdfs/build.gradle +++ b/solr/contrib/hdfs/build.gradle @@ -34,6 +34,8 @@ dependencies { }) testImplementation project(':solr:test-framework') + testImplementation(testFixtures(project(":solr:core"))) + testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-hdfs::tests') { transitive = false } diff --git a/solr/core/build.gradle b/solr/core/build.gradle index 2375c0e2d90..0d14b5dc81e 100644 --- a/solr/core/build.gradle +++ b/solr/core/build.gradle @@ -17,6 +17,7 @@ apply plugin: 'java-library' +apply plugin: 'java-test-fixtures' description = 'Apache Solr Core' diff --git a/solr/core/src/test/org/apache/solr/schema/MockExchangeRateProvider.java b/solr/core/src/testFixtures/java/org/apache/solr/schema/MockExchangeRateProvider.java similarity index 100% rename from solr/core/src/test/org/apache/solr/schema/MockExchangeRateProvider.java rename to solr/core/src/testFixtures/java/org/apache/solr/schema/MockExchangeRateProvider.java diff --git a/solr/core/src/test/org/apache/solr/search/facet/DebugAgg.java b/solr/core/src/testFixtures/java/org/apache/solr/search/facet/DebugAgg.java similarity index 100% rename from solr/core/src/test/org/apache/solr/search/facet/DebugAgg.java rename to solr/core/src/testFixtures/java/org/apache/solr/search/facet/DebugAgg.java diff --git a/solr/core/src/test/org/apache/solr/search/function/NvlValueSourceParser.java b/solr/core/src/testFixtures/java/org/apache/solr/search/function/NvlValueSourceParser.java similarity index 100% rename from solr/core/src/test/org/apache/solr/search/function/NvlValueSourceParser.java rename to solr/core/src/testFixtures/java/org/apache/solr/search/function/NvlValueSourceParser.java diff --git a/solr/core/src/test/org/apache/solr/search/similarities/CustomSimilarityFactory.java b/solr/core/src/testFixtures/java/org/apache/solr/search/similarities/CustomSimilarityFactory.java similarity index 100% rename from solr/core/src/test/org/apache/solr/search/similarities/CustomSimilarityFactory.java rename to solr/core/src/testFixtures/java/org/apache/solr/search/similarities/CustomSimilarityFactory.java diff --git a/solr/core/src/test/org/apache/solr/search/similarities/MockConfigurableSimilarity.java b/solr/core/src/testFixtures/java/org/apache/solr/search/similarities/MockConfigurableSimilarity.java similarity index 100% rename from solr/core/src/test/org/apache/solr/search/similarities/MockConfigurableSimilarity.java rename to solr/core/src/testFixtures/java/org/apache/solr/search/similarities/MockConfigurableSimilarity.java diff --git a/solr/core/src/test/org/apache/solr/util/MockCoreContainer.java b/solr/core/src/testFixtures/java/org/apache/solr/util/MockCoreContainer.java similarity index 100% rename from solr/core/src/test/org/apache/solr/util/MockCoreContainer.java rename to solr/core/src/testFixtures/java/org/apache/solr/util/MockCoreContainer.java From b640954b447c25e7cb445966778a9b6417053813 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Fri, 25 Jun 2021 19:28:45 +0200 Subject: [PATCH 05/52] HDFS contrib module: separated HDFS vs Hadoop Test Classes - refactored HdfsTestutil and created HadoopTestUtil --- .../apache/solr/cloud/hdfs/HdfsTestUtil.java | 94 ++----------- solr/core/build.gradle | 3 + .../TestSolrCloudWithSecureImpersonation.java | 4 +- .../hadoop/TestDelegationWithHadoopAuth.java | 4 +- .../TestImpersonationWithHadoopAuth.java | 4 +- .../TestSolrCloudWithHadoopAuthPlugin.java | 4 +- .../hadoop/TestZkAclsWithHadoopAuth.java | 4 +- .../java}/org/apache/hadoop/fs/FileUtil.java | 0 .../java}/org/apache/hadoop/fs/HardLink.java | 0 .../apache/hadoop/fs/RawLocalFileSystem.java | 0 .../org/apache/hadoop/http/HttpServer2.java | 0 .../java}/org/apache/hadoop/package-info.java | 0 .../org/apache/hadoop/util/DiskChecker.java | 0 .../solr/cloud/hadoop/HadoopTestUtil.java | 126 ++++++++++++++++++ 14 files changed, 150 insertions(+), 93 deletions(-) rename solr/core/src/{test => testFixtures/java}/org/apache/hadoop/fs/FileUtil.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/hadoop/fs/HardLink.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/hadoop/fs/RawLocalFileSystem.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/hadoop/http/HttpServer2.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/hadoop/package-info.java (100%) rename solr/core/src/{test => testFixtures/java}/org/apache/hadoop/util/DiskChecker.java (100%) create mode 100644 solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java index 3872167d5ca..b1c13affe3b 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java @@ -19,8 +19,6 @@ import java.io.File; import java.lang.invoke.MethodHandles; import java.net.URI; -import java.util.ArrayList; -import java.util.Arrays; import java.util.Enumeration; import java.util.HashMap; import java.util.List; @@ -30,32 +28,22 @@ import java.util.TimerTask; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinWorkerThread; -import java.util.regex.Pattern; -import org.apache.commons.lang3.time.FastDateFormat; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.FileUtil; -import org.apache.hadoop.fs.HardLink; import org.apache.hadoop.fs.Path; -import org.apache.hadoop.fs.RawLocalFileSystem; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.MiniDFSNNTopology; import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter; import org.apache.hadoop.hdfs.server.namenode.NameNodeResourceChecker; import org.apache.hadoop.hdfs.server.namenode.ha.HATestUtil; -import org.apache.hadoop.http.HttpServer2; -import org.apache.hadoop.io.nativeio.NativeIO; import org.apache.hadoop.metrics2.MetricsSystem; import org.apache.hadoop.metrics2.impl.MetricsSystemImpl; import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; -import org.apache.hadoop.util.DiskChecker; -import org.apache.lucene.util.Constants; -import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.SolrTestCaseJ4; +import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.util.IOUtils; -import org.apache.solr.common.util.SuppressForbidden; import org.apache.solr.core.DirectoryFactory; import org.apache.solr.util.HdfsUtil; import org.slf4j.Logger; @@ -63,10 +51,9 @@ import static org.apache.lucene.util.LuceneTestCase.random; -public class HdfsTestUtil { +public class HdfsTestUtil extends HadoopTestUtil { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private static final String SOLR_HACK_FOR_CLASS_VERIFICATION_FIELD = "SOLR_HACK_FOR_CLASS_VERIFICATION"; private static final String LOGICAL_HOSTNAME = "ha-nn-uri-%d"; @@ -88,47 +75,18 @@ public static MiniDFSCluster setupClass(String dir, boolean haTesting) throws Ex } public static void checkAssumptions() { - ensureHadoopHomeNotSet(); - checkHadoopWindows(); - checkOverriddenHadoopClasses(); - checkFastDateFormat(); - checkGeneratedIdMatches(); + HadoopTestUtil.ensureHadoopHomeNotSet(); + HadoopTestUtil.checkHadoopWindows(); + HadoopTestUtil.checkOverriddenHadoopClasses(getModifiedHadoopClasses()); + HadoopTestUtil.checkFastDateFormat(); + HadoopTestUtil.checkGeneratedIdMatches(); } - /** - * If Hadoop home is set via environment variable HADOOP_HOME or Java system property - * hadoop.home.dir, the behavior of test is undefined. Ensure that these are not set - * before starting. It is not possible to easily unset environment variables so better - * to bail out early instead of trying to test. - */ - private static void ensureHadoopHomeNotSet() { - if (System.getenv("HADOOP_HOME") != null) { - LuceneTestCase.fail("Ensure that HADOOP_HOME environment variable is not set."); - } - if (System.getProperty("hadoop.home.dir") != null) { - LuceneTestCase.fail("Ensure that \"hadoop.home.dir\" Java property is not set."); - } - } + protected static List> getModifiedHadoopClasses() { + List> modifiedHadoopClasses = HadoopTestUtil.getModifiedHadoopClasses(); - /** - * Hadoop integration tests fail on Windows without Hadoop NativeIO - */ - private static void checkHadoopWindows() { - LuceneTestCase.assumeTrue("Hadoop does not work on Windows without Hadoop NativeIO", - !Constants.WINDOWS || NativeIO.isAvailable()); - } + modifiedHadoopClasses.add(NameNodeResourceChecker.class); - /** - * Ensure that the tests are picking up the modified Hadoop classes - */ - private static void checkOverriddenHadoopClasses() { - List> modifiedHadoopClasses = new ArrayList<>(Arrays.asList( - DiskChecker.class, - FileUtil.class, - HardLink.class, - HttpServer2.class, - NameNodeResourceChecker.class, - RawLocalFileSystem.class)); // Dodge weird scope errors from the compiler (SOLR-14417) try { modifiedHadoopClasses.add( @@ -136,39 +94,9 @@ private static void checkOverriddenHadoopClasses() { } catch (Exception e) { throw new RuntimeException(e); } - - for (Class clazz : modifiedHadoopClasses) { - try { - LuceneTestCase.assertNotNull("Field on " + clazz.getCanonicalName() + " should not have been null", - clazz.getField(SOLR_HACK_FOR_CLASS_VERIFICATION_FIELD)); - } catch (NoSuchFieldException e) { - LuceneTestCase.fail("Expected to load Solr modified Hadoop class " + clazz.getCanonicalName() + - " , but it was not found."); - } - } + return modifiedHadoopClasses; } - /** - * Checks that commons-lang3 FastDateFormat works with configured locale - */ - @SuppressForbidden(reason="Call FastDateFormat.format same way Hadoop calls it") - private static void checkFastDateFormat() { - try { - FastDateFormat.getInstance().format(System.currentTimeMillis()); - } catch (ArrayIndexOutOfBoundsException e) { - LuceneTestCase.assumeNoException("commons-lang3 FastDateFormat doesn't work with " + - Locale.getDefault().toLanguageTag(), e); - } - } - - /** - * Hadoop fails to generate locale agnostic ids - Checks that generated string matches - */ - private static void checkGeneratedIdMatches() { - // This is basically how Namenode generates fsimage ids and checks that the fsimage filename matches - LuceneTestCase.assumeTrue("Check that generated id matches regex", - Pattern.matches("(\\d+)", String.format(Locale.getDefault(),"%019d", 0))); - } public static MiniDFSCluster setupClass(String dir, boolean safeModeTesting, boolean haTesting) throws Exception { checkAssumptions(); diff --git a/solr/core/build.gradle b/solr/core/build.gradle index 0d14b5dc81e..2ac1bcf71d3 100644 --- a/solr/core/build.gradle +++ b/solr/core/build.gradle @@ -156,5 +156,8 @@ dependencies { exclude group: "ch.qos.logback", module: "logback-classic" exclude group: "org.slf4j", module: "slf4j-api" }) + + testFixturesApi("org.apache.lucene:lucene-test-framework") + testFixturesImplementation("org.apache.hadoop:hadoop-common") } diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java index e7e5e9506ba..d92b44d85bc 100644 --- a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java +++ b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java @@ -32,7 +32,7 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.client.solrj.response.CollectionAdminResponse; -import org.apache.solr.cloud.hdfs.HdfsTestUtil; +import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.IOUtils; @@ -93,7 +93,7 @@ private static Map getImpersonatorSettings() throws Exception { @BeforeClass public static void startup() throws Exception { - HdfsTestUtil.checkAssumptions(); + HadoopTestUtil.checkAssumptions(); System.setProperty("authenticationPlugin", HttpParamDelegationTokenPlugin.class.getName()); System.setProperty(KerberosPlugin.DELEGATION_TOKEN_ENABLED, "true"); diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/TestDelegationWithHadoopAuth.java b/solr/core/src/test/org/apache/solr/security/hadoop/TestDelegationWithHadoopAuth.java index c685a7b2bc3..81c6ab82fad 100644 --- a/solr/core/src/test/org/apache/solr/security/hadoop/TestDelegationWithHadoopAuth.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/TestDelegationWithHadoopAuth.java @@ -36,7 +36,7 @@ import org.apache.solr.client.solrj.response.CollectionAdminResponse; import org.apache.solr.client.solrj.response.DelegationTokenResponse; import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.cloud.hdfs.HdfsTestUtil; +import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.cloud.SolrZkClient; import org.apache.solr.common.params.ModifiableSolrParams; @@ -54,7 +54,7 @@ public class TestDelegationWithHadoopAuth extends SolrCloudTestCase { @BeforeClass public static void setupClass() throws Exception { - HdfsTestUtil.checkAssumptions(); + HadoopTestUtil.checkAssumptions(); configureCluster(NUM_SERVERS)// nodes .withSecurityJson(TEST_PATH().resolve("security").resolve("hadoop_simple_auth_with_delegation.json")) diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWithHadoopAuth.java b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWithHadoopAuth.java index c4902800649..c8db1b4c6d9 100644 --- a/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWithHadoopAuth.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWithHadoopAuth.java @@ -29,7 +29,7 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.cloud.hdfs.HdfsTestUtil; +import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.util.Utils; import org.apache.solr.security.HadoopAuthPlugin; @@ -51,7 +51,7 @@ public class TestImpersonationWithHadoopAuth extends SolrCloudTestCase { @SuppressWarnings("unchecked") @BeforeClass public static void setupClass() throws Exception { - HdfsTestUtil.checkAssumptions(); + HadoopTestUtil.checkAssumptions(); InetAddress loopback = InetAddress.getLoopbackAddress(); Path securityJsonPath = TEST_PATH().resolve("security").resolve("hadoop_simple_auth_with_delegation.json"); diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/TestSolrCloudWithHadoopAuthPlugin.java b/solr/core/src/test/org/apache/solr/security/hadoop/TestSolrCloudWithHadoopAuthPlugin.java index 36520be199c..7c9c1d9dff6 100644 --- a/solr/core/src/test/org/apache/solr/security/hadoop/TestSolrCloudWithHadoopAuthPlugin.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/TestSolrCloudWithHadoopAuthPlugin.java @@ -23,7 +23,7 @@ import org.apache.solr.cloud.AbstractDistribZkTestBase; import org.apache.solr.cloud.KerberosTestServices; import org.apache.solr.cloud.SolrCloudAuthTestCase; -import org.apache.solr.cloud.hdfs.HdfsTestUtil; +import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.SolrInputDocument; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -37,7 +37,7 @@ public class TestSolrCloudWithHadoopAuthPlugin extends SolrCloudAuthTestCase { @BeforeClass public static void setupClass() throws Exception { - HdfsTestUtil.checkAssumptions(); + HadoopTestUtil.checkAssumptions(); kerberosTestServices = KerberosUtils.setupMiniKdc(createTempDir()); diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/TestZkAclsWithHadoopAuth.java b/solr/core/src/test/org/apache/solr/security/hadoop/TestZkAclsWithHadoopAuth.java index d2f91221201..06abcff4897 100644 --- a/solr/core/src/test/org/apache/solr/security/hadoop/TestZkAclsWithHadoopAuth.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/TestZkAclsWithHadoopAuth.java @@ -29,7 +29,7 @@ import org.apache.solr.cloud.MiniSolrCloudCluster; import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.cloud.hdfs.HdfsTestUtil; +import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.cloud.SecurityAwareZkACLProvider; import org.apache.solr.common.cloud.SolrZkClient; import org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider; @@ -55,7 +55,7 @@ public class TestZkAclsWithHadoopAuth extends SolrCloudTestCase { @BeforeClass public static void setupClass() throws Exception { - HdfsTestUtil.checkAssumptions(); + HadoopTestUtil.checkAssumptions(); System.setProperty(SolrZkClient.ZK_ACL_PROVIDER_CLASS_NAME_VM_PARAM_NAME, VMParamsAllAndReadonlyDigestZkACLProvider.class.getName()); diff --git a/solr/core/src/test/org/apache/hadoop/fs/FileUtil.java b/solr/core/src/testFixtures/java/org/apache/hadoop/fs/FileUtil.java similarity index 100% rename from solr/core/src/test/org/apache/hadoop/fs/FileUtil.java rename to solr/core/src/testFixtures/java/org/apache/hadoop/fs/FileUtil.java diff --git a/solr/core/src/test/org/apache/hadoop/fs/HardLink.java b/solr/core/src/testFixtures/java/org/apache/hadoop/fs/HardLink.java similarity index 100% rename from solr/core/src/test/org/apache/hadoop/fs/HardLink.java rename to solr/core/src/testFixtures/java/org/apache/hadoop/fs/HardLink.java diff --git a/solr/core/src/test/org/apache/hadoop/fs/RawLocalFileSystem.java b/solr/core/src/testFixtures/java/org/apache/hadoop/fs/RawLocalFileSystem.java similarity index 100% rename from solr/core/src/test/org/apache/hadoop/fs/RawLocalFileSystem.java rename to solr/core/src/testFixtures/java/org/apache/hadoop/fs/RawLocalFileSystem.java diff --git a/solr/core/src/test/org/apache/hadoop/http/HttpServer2.java b/solr/core/src/testFixtures/java/org/apache/hadoop/http/HttpServer2.java similarity index 100% rename from solr/core/src/test/org/apache/hadoop/http/HttpServer2.java rename to solr/core/src/testFixtures/java/org/apache/hadoop/http/HttpServer2.java diff --git a/solr/core/src/test/org/apache/hadoop/package-info.java b/solr/core/src/testFixtures/java/org/apache/hadoop/package-info.java similarity index 100% rename from solr/core/src/test/org/apache/hadoop/package-info.java rename to solr/core/src/testFixtures/java/org/apache/hadoop/package-info.java diff --git a/solr/core/src/test/org/apache/hadoop/util/DiskChecker.java b/solr/core/src/testFixtures/java/org/apache/hadoop/util/DiskChecker.java similarity index 100% rename from solr/core/src/test/org/apache/hadoop/util/DiskChecker.java rename to solr/core/src/testFixtures/java/org/apache/hadoop/util/DiskChecker.java diff --git a/solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java b/solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java new file mode 100644 index 00000000000..b876dca0e0a --- /dev/null +++ b/solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java @@ -0,0 +1,126 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.solr.cloud.hadoop; + +import java.lang.invoke.MethodHandles; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.regex.Pattern; + +import org.apache.commons.lang3.time.FastDateFormat; +import org.apache.hadoop.fs.FileUtil; +import org.apache.hadoop.fs.HardLink; +import org.apache.hadoop.fs.RawLocalFileSystem; +import org.apache.hadoop.http.HttpServer2; +import org.apache.hadoop.io.nativeio.NativeIO; + +import org.apache.hadoop.util.DiskChecker; +import org.apache.lucene.util.Constants; +import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.common.util.SuppressForbidden; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class HadoopTestUtil { + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + protected static final String SOLR_HACK_FOR_CLASS_VERIFICATION_FIELD = "SOLR_HACK_FOR_CLASS_VERIFICATION"; + + + public static void checkAssumptions() { + ensureHadoopHomeNotSet(); + checkHadoopWindows(); + checkOverriddenHadoopClasses(getModifiedHadoopClasses()); + checkFastDateFormat(); + checkGeneratedIdMatches(); + } + + /** + * If Hadoop home is set via environment variable HADOOP_HOME or Java system property + * hadoop.home.dir, the behavior of test is undefined. Ensure that these are not set + * before starting. It is not possible to easily unset environment variables so better + * to bail out early instead of trying to test. + */ + protected static void ensureHadoopHomeNotSet() { + if (System.getenv("HADOOP_HOME") != null) { + LuceneTestCase.fail("Ensure that HADOOP_HOME environment variable is not set."); + } + if (System.getProperty("hadoop.home.dir") != null) { + LuceneTestCase.fail("Ensure that \"hadoop.home.dir\" Java property is not set."); + } + } + + /** + * Hadoop integration tests fail on Windows without Hadoop NativeIO + */ + protected static void checkHadoopWindows() { + LuceneTestCase.assumeTrue("Hadoop does not work on Windows without Hadoop NativeIO", + !Constants.WINDOWS || NativeIO.isAvailable()); + } + + + protected static List> getModifiedHadoopClasses() { + List> modifiedHadoopClasses = new ArrayList<>(Arrays.asList( + DiskChecker.class, + FileUtil.class, + HardLink.class, + HttpServer2.class, + RawLocalFileSystem.class)); + + return modifiedHadoopClasses; + } + + /** + * Ensure that the tests are picking up the modified Hadoop classes + */ + protected static void checkOverriddenHadoopClasses(List> modifiedHadoopClasses) { + for (Class clazz : modifiedHadoopClasses) { + try { + LuceneTestCase.assertNotNull("Field on " + clazz.getCanonicalName() + " should not have been null", + clazz.getField(SOLR_HACK_FOR_CLASS_VERIFICATION_FIELD)); + } catch (NoSuchFieldException e) { + LuceneTestCase.fail("Expected to load Solr modified Hadoop class " + clazz.getCanonicalName() + + " , but it was not found."); + } + } + } + + /** + * Checks that commons-lang3 FastDateFormat works with configured locale + */ + @SuppressForbidden(reason="Call FastDateFormat.format same way Hadoop calls it") + protected static void checkFastDateFormat() { + try { + FastDateFormat.getInstance().format(System.currentTimeMillis()); + } catch (ArrayIndexOutOfBoundsException e) { + LuceneTestCase.assumeNoException("commons-lang3 FastDateFormat doesn't work with " + + Locale.getDefault().toLanguageTag(), e); + } + } + + /** + * Hadoop fails to generate locale agnostic ids - Checks that generated string matches + */ + protected static void checkGeneratedIdMatches() { + // This is basically how Namenode generates fsimage ids and checks that the fsimage filename matches + LuceneTestCase.assumeTrue("Check that generated id matches regex", + Pattern.matches("(\\d+)", String.format(Locale.getDefault(),"%019d", 0))); + } +} From a298d2b3204a7ab4e156fe70af8770250de07e83 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Fri, 25 Jun 2021 19:29:46 +0200 Subject: [PATCH 06/52] HDFS contrib module: removed HDFS class dependencies from TestBackupRepositoryFactory.java --- .../apache/solr/core/TestBackupRepositoryFactory.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/core/TestBackupRepositoryFactory.java b/solr/core/src/test/org/apache/solr/core/TestBackupRepositoryFactory.java index 307a9b75743..fde8709d386 100644 --- a/solr/core/src/test/org/apache/solr/core/TestBackupRepositoryFactory.java +++ b/solr/core/src/test/org/apache/solr/core/TestBackupRepositoryFactory.java @@ -28,7 +28,6 @@ import org.apache.solr.common.params.CoreAdminParams; import org.apache.solr.core.backup.repository.BackupRepository; import org.apache.solr.core.backup.repository.BackupRepositoryFactory; -import org.apache.solr.core.backup.repository.HdfsBackupRepository; import org.apache.solr.core.backup.repository.LocalFileSystemRepository; import org.apache.solr.schema.FieldType; import org.junit.AfterClass; @@ -122,7 +121,7 @@ public void testNonExistantBackupRepository() { @Test public void testRepositoryConfig() { - PluginInfo[] plugins = new PluginInfo[2]; + PluginInfo[] plugins = new PluginInfo[1]; { Map attrs = new HashMap<>(); @@ -132,13 +131,7 @@ public void testRepositoryConfig() { attrs.put("location", "/tmp"); plugins[0] = new PluginInfo("repository", attrs); } - { - Map attrs = new HashMap<>(); - attrs.put(CoreAdminParams.NAME, "boom"); - attrs.put(FieldType.CLASS_NAME, HdfsBackupRepository.class.getName()); - attrs.put("location", "/tmp"); - plugins[1] = new PluginInfo("repository", attrs); - } + Collections.shuffle(Arrays.asList(plugins), random()); BackupRepositoryFactory f = new BackupRepositoryFactory(plugins); From 7857f19308d18e9739364ddbfb99c8c35a13d3c9 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Mon, 5 Jul 2021 19:05:40 +0200 Subject: [PATCH 07/52] HDFS contrib module: separate HDFS test classes from Core test classes (1.: HdfsChaosMonkeyNothingIsSafeTest) - HdfsChaosMonkeyNothingIsSafeTest was extending ChaosMonkeyNothingIsSafeTest.java, however since there is no depenency possible between test projects, it had to be split up - Created AbstractChaosMonkeyNotheingIsSafeTestBase as a common ancestor. Class is placed to the test framework because it has junit depenencies and needs to be shared - Moved the login in the test() method to doTest() which is now invoked from the child classes - Moved FullThrottleStoppableIndexingThread to the test framework as it needs to be shared - HdfsChaosMonkeyNothingIsSafeTest.java is moved to the hdfs plugin. --- .../HdfsChaosMonkeyNothingIsSafeTest.java | 20 +- .../cloud/ChaosMonkeyNothingIsSafeTest.java | 312 +---------------- ...tractChaosMonkeyNothingIsSafeTestBase.java | 325 ++++++++++++++++++ .../FullThrottleStoppableIndexingThread.java | 0 4 files changed, 343 insertions(+), 314 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java rename solr/{core/src/test => test-framework/src/java}/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java (100%) diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java index 94ace06c786..4327fb48751 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java @@ -22,7 +22,7 @@ import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.ChaosMonkeyNothingIsSafeTest; +import org.apache.solr.cloud.AbstractChaosMonkeyNothingIsSafeTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -37,8 +37,9 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsChaosMonkeyNothingIsSafeTest extends ChaosMonkeyNothingIsSafeTest { +public class HdfsChaosMonkeyNothingIsSafeTest extends AbstractChaosMonkeyNothingIsSafeTestBase { private static MiniDFSCluster dfsCluster; + private static final String DIRECTORY_FACTORY = "org.apache.solr.core.HdfsDirectoryFactory"; @BeforeClass public static void setupClass() throws Exception { @@ -55,17 +56,14 @@ public static void teardownClass() throws Exception { System.clearProperty("solr.hdfs.blockcache.global"); } } - - @Override - public void distribSetUp() throws Exception { - super.distribSetUp(); - - // super class may hard code directory - useFactory("org.apache.solr.core.HdfsDirectoryFactory"); - } - + @Override protected String getDataDir(String dataDir) throws IOException { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } + + protected String getDirectoryFactory() { + return DIRECTORY_FACTORY; + } + } diff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java index a89dfde2d35..2815e90d842 100644 --- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java @@ -16,316 +16,22 @@ */ package org.apache.solr.cloud; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.TimeUnit; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrTestCaseJ4.SuppressSSL; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.impl.CloudSolrClient; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.common.cloud.ZkStateReader; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; + +/* + * Implementation moved to AbstractChaosMonkeyNothingIsSafeTestBase.java as it is also + * used by the HDFS contrib tests. + */ @Slow @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776") -public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase { - private static final int FAIL_TOLERANCE = 100; - - private static final Integer RUN_LENGTH = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.runlength", "-1")); - - private final boolean onlyLeaderIndexes = random().nextBoolean(); - - @BeforeClass - public static void beforeSuperClass() { - schemaString = "schema15.xml"; // we need a string id - System.setProperty("solr.autoCommit.maxTime", "15000"); - System.clearProperty("solr.httpclient.retries"); - System.clearProperty("solr.retries.on.forward"); - System.clearProperty("solr.retries.to.followers"); - setErrorHook(); - } - - @AfterClass - public static void afterSuperClass() { - System.clearProperty("solr.autoCommit.maxTime"); - clearErrorHook(); - } - - - - @Override - protected void destroyServers() throws Exception { - - super.destroyServers(); - } - - protected static final String[] fieldNames = new String[]{"f_i", "f_f", "f_d", "f_l", "f_dt"}; - protected static final RandVal[] randVals = new RandVal[]{rint, rfloat, rdouble, rlong, rdate}; - - private int clientSoTimeout = 60000; +public class ChaosMonkeyNothingIsSafeTest extends AbstractChaosMonkeyNothingIsSafeTestBase { + private static final String DIRECTORY_FACTORY = "solr.StandardDirectoryFactory"; - private volatile FullThrottleStoppableIndexingThread ftIndexThread; - - private final boolean runFullThrottle; - - public String[] getFieldNames() { - return fieldNames; - } - - public RandVal[] getRandValues() { - return randVals; - } - - @Override - public void distribSetUp() throws Exception { - super.distribSetUp(); - // can help to hide this when testing and looking at logs - //ignoreException("shard update error"); - useFactory("solr.StandardDirectoryFactory"); - } - @Override - public void distribTearDown() throws Exception { - try { - ftIndexThread.safeStop(); - } catch (NullPointerException e) { - // okay - } - super.distribTearDown(); + protected String getDirectoryFactory() { + return DIRECTORY_FACTORY; } - - public ChaosMonkeyNothingIsSafeTest() { - super(); - sliceCount = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.slicecount", "-1")); - if (sliceCount == -1) { - sliceCount = random().nextInt(TEST_NIGHTLY ? 5 : 3) + 1; - } - - int numShards = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.shardcount", "-1")); - if (numShards == -1) { - // we make sure that there's at least one shard with more than one replica - // so that the ChaosMonkey has something to kill - numShards = sliceCount + random().nextInt(TEST_NIGHTLY ? 12 : 2) + 1; - } - fixShardCount(numShards); - - - // TODO: we only do this sometimes so that we can sometimes compare against control, - // it's currently hard to know what requests failed when using ConcurrentSolrUpdateServer - runFullThrottle = random().nextBoolean(); - - } - - @Override - protected boolean useTlogReplicas() { - return false; // TODO: tlog replicas makes commits take way to long due to what is likely a bug and it's TestInjection use - } - - @Override - protected CloudSolrClient createCloudClient(String defaultCollection) { - return this.createCloudClient(defaultCollection, this.clientSoTimeout); - } - - protected CloudSolrClient createCloudClient(String defaultCollection, int socketTimeout) { - CloudSolrClient client = getCloudSolrClient(zkServer.getZkAddress(), random().nextBoolean(), 30000, socketTimeout); - if (defaultCollection != null) client.setDefaultCollection(defaultCollection); - return client; - } - - @Test - //05-Jul-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 09-Apr-2018 - // commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018 - @SuppressWarnings({"try"}) - public void test() throws Exception { - // None of the operations used here are particularly costly, so this should work. - // Using this low timeout will also help us catch index stalling. - clientSoTimeout = 5000; - - boolean testSuccessful = false; - try (CloudSolrClient ourCloudClient = createCloudClient(DEFAULT_COLLECTION)) { - handle.clear(); - handle.put("timestamp", SKIPVAL); - ZkStateReader zkStateReader = cloudClient.getZkStateReader(); - // make sure we have leaders for each shard - for (int j = 1; j < sliceCount; j++) { - zkStateReader.getLeaderRetry(DEFAULT_COLLECTION, "shard" + j, 10000); - } // make sure we again have leaders for each shard - - waitForRecoveriesToFinish(false); - - // we cannot do delete by query - // as it's not supported for recovery - del("*:*"); - - List threads = new ArrayList<>(); - List indexTreads = new ArrayList<>(); - int threadCount = TEST_NIGHTLY ? 3 : 1; - int i = 0; - for (i = 0; i < threadCount; i++) { - StoppableIndexingThread indexThread = new StoppableIndexingThread(controlClient, cloudClient, Integer.toString(i), true); - threads.add(indexThread); - indexTreads.add(indexThread); - indexThread.start(); - } - - threadCount = 1; - i = 0; - for (i = 0; i < threadCount; i++) { - StoppableSearchThread searchThread = new StoppableSearchThread(cloudClient); - threads.add(searchThread); - searchThread.start(); - } - - if (runFullThrottle) { - ftIndexThread = - new FullThrottleStoppableIndexingThread(cloudClient.getHttpClient(),controlClient, cloudClient, clients, "ft1", true, this.clientSoTimeout); - ftIndexThread.start(); - } - - chaosMonkey.startTheMonkey(true, 10000); - try { - long runLength; - if (RUN_LENGTH != -1) { - runLength = RUN_LENGTH; - } else { - int[] runTimes; - if (TEST_NIGHTLY) { - runTimes = new int[] {5000, 6000, 10000, 15000, 25000, 30000, - 30000, 45000, 90000, 120000}; - } else { - runTimes = new int[] {5000, 7000, 15000}; - } - runLength = runTimes[random().nextInt(runTimes.length - 1)]; - } - - Thread.sleep(runLength); - } finally { - chaosMonkey.stopTheMonkey(); - } - - // ideally this should go into chaosMonkey - restartZk(1000 * (5 + random().nextInt(4))); - - - if (runFullThrottle) { - ftIndexThread.safeStop(); - } - - for (StoppableThread indexThread : threads) { - indexThread.safeStop(); - } - - // start any downed jetties to be sure we still will end up with a leader per shard... - - // wait for stop... - for (StoppableThread indexThread : threads) { - indexThread.join(); - } - - // try and wait for any replications and what not to finish... - - Thread.sleep(2000); - - // wait until there are no recoveries... - waitForThingsToLevelOut(); - - // make sure we again have leaders for each shard - for (int j = 1; j < sliceCount; j++) { - zkStateReader.getLeaderRetry(DEFAULT_COLLECTION, "shard" + j, 30000); - } - - commit(); - - // TODO: assert we didnt kill everyone - - zkStateReader.updateLiveNodes(); - assertTrue(zkStateReader.getClusterState().getLiveNodes().size() > 0); - - // we expect full throttle fails, but cloud client should not easily fail - for (StoppableThread indexThread : threads) { - if (indexThread instanceof StoppableIndexingThread && !(indexThread instanceof FullThrottleStoppableIndexingThread)) { - int failCount = ((StoppableIndexingThread) indexThread).getFailCount(); - assertFalse("There were too many update fails (" + failCount + " > " + FAIL_TOLERANCE - + ") - we expect it can happen, but shouldn't easily", failCount > FAIL_TOLERANCE); - } - } - - - waitForThingsToLevelOut(20, TimeUnit.SECONDS); - - commit(); - - Set addFails = getAddFails(indexTreads); - Set deleteFails = getDeleteFails(indexTreads); - // full throttle thread can - // have request fails - checkShardConsistency(!runFullThrottle, true, addFails, deleteFails); - - long ctrlDocs = controlClient.query(new SolrQuery("*:*")).getResults() - .getNumFound(); - - // ensure we have added more than 0 docs - long cloudClientDocs = cloudClient.query(new SolrQuery("*:*")) - .getResults().getNumFound(); - - assertTrue("Found " + ctrlDocs + " control docs", cloudClientDocs > 0); - - if (VERBOSE) System.out.println("control docs:" - + controlClient.query(new SolrQuery("*:*")).getResults() - .getNumFound() + "\n\n"); - - // try and make a collection to make sure the overseer has survived the expiration and session loss - - // sometimes we restart zookeeper as well - if (random().nextBoolean()) { - // restartZk(1000 * (5 + random().nextInt(4))); - } - - try (CloudSolrClient client = createCloudClient("collection1", 30000)) { - createCollection(null, "testcollection", - 1, 1, client, null, "conf1"); - - } - List numShardsNumReplicas = new ArrayList<>(2); - numShardsNumReplicas.add(1); - numShardsNumReplicas.add(1); - checkForCollection("testcollection", numShardsNumReplicas, null); - - testSuccessful = true; - } finally { - if (!testSuccessful) { - printLayout(); - } - } - } - - private Set getAddFails(List threads) { - Set addFails = new HashSet(); - for (StoppableIndexingThread thread : threads) { - addFails.addAll(thread.getAddFails()); - } - return addFails; - } - - private Set getDeleteFails(List threads) { - Set deleteFails = new HashSet(); - for (StoppableIndexingThread thread : threads) { - deleteFails.addAll(thread.getDeleteFails()); - } - return deleteFails; - } - - // skip the randoms - they can deadlock... - @Override - protected void indexr(Object... fields) throws Exception { - SolrInputDocument doc = getDoc(fields); - indexDoc(doc); - } - } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java new file mode 100644 index 00000000000..7e843185f5c --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java @@ -0,0 +1,325 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.impl.CloudSolrClient; +import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.common.cloud.ZkStateReader; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public abstract class AbstractChaosMonkeyNothingIsSafeTestBase extends AbstractFullDistribZkTestBase { + private static final int FAIL_TOLERANCE = 100; + + private static final Integer RUN_LENGTH = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.runlength", "-1")); + + private final boolean onlyLeaderIndexes = random().nextBoolean(); + + @BeforeClass + public static void beforeSuperClass() { + schemaString = "schema15.xml"; // we need a string id + System.setProperty("solr.autoCommit.maxTime", "15000"); + System.clearProperty("solr.httpclient.retries"); + System.clearProperty("solr.retries.on.forward"); + System.clearProperty("solr.retries.to.followers"); + setErrorHook(); +} + + @AfterClass + public static void afterSuperClass() { + System.clearProperty("solr.autoCommit.maxTime"); + clearErrorHook(); + } + + @Override + protected void destroyServers() throws Exception { + + super.destroyServers(); + } + + protected static final String[] fieldNames = new String[]{"f_i", "f_f", "f_d", "f_l", "f_dt"}; + protected static final RandVal[] randVals = new RandVal[]{rint, rfloat, rdouble, rlong, rdate}; + + private int clientSoTimeout = 60000; + + private volatile FullThrottleStoppableIndexingThread ftIndexThread; + + private final boolean runFullThrottle; + + public String[] getFieldNames() { + return fieldNames; + } + + public RandVal[] getRandValues() { + return randVals; + } + + protected abstract String getDirectoryFactory(); + + @Override + public void distribSetUp() throws Exception { + super.distribSetUp(); + // can help to hide this when testing and looking at logs + //ignoreException("shard update error"); + useFactory(getDirectoryFactory()); + } + + @Override + public void distribTearDown() throws Exception { + try { + ftIndexThread.safeStop(); + } catch (NullPointerException e) { + // okay + } + super.distribTearDown(); + } + + public AbstractChaosMonkeyNothingIsSafeTestBase() { + super(); + sliceCount = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.slicecount", "-1")); + if (sliceCount == -1) { + sliceCount = random().nextInt(TEST_NIGHTLY ? 5 : 3) + 1; + } + + int numShards = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.shardcount", "-1")); + if (numShards == -1) { + // we make sure that there's at least one shard with more than one replica + // so that the ChaosMonkey has something to kill + numShards = sliceCount + random().nextInt(TEST_NIGHTLY ? 12 : 2) + 1; + } + fixShardCount(numShards); + + + // TODO: we only do this sometimes so that we can sometimes compare against control, + // it's currently hard to know what requests failed when using ConcurrentSolrUpdateServer + runFullThrottle = random().nextBoolean(); + + } + + @Override + protected boolean useTlogReplicas() { + return false; // TODO: tlog replicas makes commits take way to long due to what is likely a bug and it's TestInjection use + } + + @Override + protected CloudSolrClient createCloudClient(String defaultCollection) { + return this.createCloudClient(defaultCollection, this.clientSoTimeout); + } + + protected CloudSolrClient createCloudClient(String defaultCollection, int socketTimeout) { + CloudSolrClient client = getCloudSolrClient(zkServer.getZkAddress(), random().nextBoolean(), 30000, socketTimeout); + if (defaultCollection != null) client.setDefaultCollection(defaultCollection); + return client; + } + + @Test + @SuppressWarnings({"try"}) + public void test() throws Exception { + // None of the operations used here are particularly costly, so this should work. + // Using this low timeout will also help us catch index stalling. + clientSoTimeout = 5000; + + boolean testSuccessful = false; + try (CloudSolrClient ourCloudClient = createCloudClient(DEFAULT_COLLECTION)) { + handle.clear(); + handle.put("timestamp", SKIPVAL); + ZkStateReader zkStateReader = cloudClient.getZkStateReader(); + // make sure we have leaders for each shard + for (int j = 1; j < sliceCount; j++) { + zkStateReader.getLeaderRetry(DEFAULT_COLLECTION, "shard" + j, 10000); + } // make sure we again have leaders for each shard + + waitForRecoveriesToFinish(false); + + // we cannot do delete by query + // as it's not supported for recovery + del("*:*"); + + List threads = new ArrayList<>(); + List indexTreads = new ArrayList<>(); + int threadCount = TEST_NIGHTLY ? 3 : 1; + int i = 0; + for (i = 0; i < threadCount; i++) { + StoppableIndexingThread indexThread = new StoppableIndexingThread(controlClient, cloudClient, Integer.toString(i), true); + threads.add(indexThread); + indexTreads.add(indexThread); + indexThread.start(); + } + + threadCount = 1; + i = 0; + for (i = 0; i < threadCount; i++) { + StoppableSearchThread searchThread = new StoppableSearchThread(cloudClient); + threads.add(searchThread); + searchThread.start(); + } + + if (runFullThrottle) { + ftIndexThread = + new FullThrottleStoppableIndexingThread(cloudClient.getHttpClient(),controlClient, cloudClient, clients, "ft1", true, this.clientSoTimeout); + ftIndexThread.start(); + } + + chaosMonkey.startTheMonkey(true, 10000); + try { + long runLength; + if (RUN_LENGTH != -1) { + runLength = RUN_LENGTH; + } else { + int[] runTimes; + if (TEST_NIGHTLY) { + runTimes = new int[] {5000, 6000, 10000, 15000, 25000, 30000, + 30000, 45000, 90000, 120000}; + } else { + runTimes = new int[] {5000, 7000, 15000}; + } + runLength = runTimes[random().nextInt(runTimes.length - 1)]; + } + + Thread.sleep(runLength); + } finally { + chaosMonkey.stopTheMonkey(); + } + + // ideally this should go into chaosMonkey + restartZk(1000 * (5 + random().nextInt(4))); + + + if (runFullThrottle) { + ftIndexThread.safeStop(); + } + + for (StoppableThread indexThread : threads) { + indexThread.safeStop(); + } + + // start any downed jetties to be sure we still will end up with a leader per shard... + + // wait for stop... + for (StoppableThread indexThread : threads) { + indexThread.join(); + } + + // try and wait for any replications and what not to finish... + + Thread.sleep(2000); + + // wait until there are no recoveries... + waitForThingsToLevelOut(); + + // make sure we again have leaders for each shard + for (int j = 1; j < sliceCount; j++) { + zkStateReader.getLeaderRetry(DEFAULT_COLLECTION, "shard" + j, 30000); + } + + commit(); + + // TODO: assert we didnt kill everyone + + zkStateReader.updateLiveNodes(); + assertTrue(zkStateReader.getClusterState().getLiveNodes().size() > 0); + + // we expect full throttle fails, but cloud client should not easily fail + for (StoppableThread indexThread : threads) { + if (indexThread instanceof StoppableIndexingThread && !(indexThread instanceof FullThrottleStoppableIndexingThread)) { + int failCount = ((StoppableIndexingThread) indexThread).getFailCount(); + assertFalse("There were too many update fails (" + failCount + " > " + FAIL_TOLERANCE + + ") - we expect it can happen, but shouldn't easily", failCount > FAIL_TOLERANCE); + } + } + + + waitForThingsToLevelOut(20, TimeUnit.SECONDS); + + commit(); + + Set addFails = getAddFails(indexTreads); + Set deleteFails = getDeleteFails(indexTreads); + // full throttle thread can + // have request fails + checkShardConsistency(!runFullThrottle, true, addFails, deleteFails); + + long ctrlDocs = controlClient.query(new SolrQuery("*:*")).getResults() + .getNumFound(); + + // ensure we have added more than 0 docs + long cloudClientDocs = cloudClient.query(new SolrQuery("*:*")) + .getResults().getNumFound(); + + assertTrue("Found " + ctrlDocs + " control docs", cloudClientDocs > 0); + + if (VERBOSE) System.out.println("control docs:" + + controlClient.query(new SolrQuery("*:*")).getResults() + .getNumFound() + "\n\n"); + + // try and make a collection to make sure the overseer has survived the expiration and session loss + + // sometimes we restart zookeeper as well + if (random().nextBoolean()) { + // restartZk(1000 * (5 + random().nextInt(4))); + } + + try (CloudSolrClient client = createCloudClient("collection1", 30000)) { + createCollection(null, "testcollection", + 1, 1, client, null, "conf1"); + + } + List numShardsNumReplicas = new ArrayList<>(2); + numShardsNumReplicas.add(1); + numShardsNumReplicas.add(1); + checkForCollection("testcollection", numShardsNumReplicas, null); + + testSuccessful = true; + } finally { + if (!testSuccessful) { + printLayout(); + } + } + } + + private Set getAddFails(List threads) { + Set addFails = new HashSet(); + for (StoppableIndexingThread thread : threads) { + addFails.addAll(thread.getAddFails()); + } + return addFails; + } + + private Set getDeleteFails(List threads) { + Set deleteFails = new HashSet(); + for (StoppableIndexingThread thread : threads) { + deleteFails.addAll(thread.getDeleteFails()); + } + return deleteFails; + } + + // skip the randoms - they can deadlock... + @Override + protected void indexr(Object... fields) throws Exception { + SolrInputDocument doc = getDoc(fields); + indexDoc(doc); + } + +} diff --git a/solr/core/src/test/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java b/solr/test-framework/src/java/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java similarity index 100% rename from solr/core/src/test/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java rename to solr/test-framework/src/java/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java From 73b1fd8bc250680cb3adbaa877c0b37712bf9286 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Mon, 5 Jul 2021 22:53:59 +0200 Subject: [PATCH 08/52] HDFS contrib module: separate HDFS test classes from Core test classes (2.: HdfsSyncSliceTest) - HdfsSyncSliceTest was extending SyncSliceTest --- .../solr/cloud/hdfs/HdfsSyncSliceTest.java | 5 +- .../org/apache/solr/cloud/SyncSliceTest.java | 282 +--------------- .../solr/cloud/AbstractSyncSliceTestBase.java | 308 ++++++++++++++++++ 3 files changed, 316 insertions(+), 279 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractSyncSliceTestBase.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java index 31ecad81812..ee22d26957c 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java @@ -22,7 +22,7 @@ import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.SyncSliceTest; +import org.apache.solr.cloud.AbstractSyncSliceTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -37,7 +37,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsSyncSliceTest extends SyncSliceTest { +public class HdfsSyncSliceTest extends AbstractSyncSliceTestBase { private static MiniDFSCluster dfsCluster; @BeforeClass @@ -58,4 +58,5 @@ public static void teardownClass() throws Exception { protected String getDataDir(String dataDir) throws IOException { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } + } diff --git a/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java b/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java index a9832446505..0998e371522 100644 --- a/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java @@ -17,294 +17,22 @@ package org.apache.solr.cloud; import org.apache.lucene.util.LuceneTestCase.Slow; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.impl.HttpSolrClient; -import org.apache.solr.client.solrj.request.QueryRequest; -import org.apache.solr.client.solrj.request.UpdateRequest; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.common.cloud.ClusterState; -import org.apache.solr.common.cloud.DocCollection; -import org.apache.solr.common.cloud.Replica; -import org.apache.solr.common.cloud.Slice; -import org.apache.solr.common.cloud.ZkStateReader; -import org.apache.solr.common.params.CollectionParams.CollectionAction; -import org.apache.solr.common.params.ModifiableSolrParams; import org.junit.Test; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.TimeUnit; /** * Test sync phase that occurs when Leader goes down and a new Leader is * elected. + * Implementation moved to AbstractSyncSliceTestBase.java as it is also + * used by the HDFS contrib tests. */ @Slow -public class SyncSliceTest extends AbstractFullDistribZkTestBase { - private boolean success = false; - - @Override - public void distribTearDown() throws Exception { - if (!success) { - printLayoutOnTearDown = true; - } - super.distribTearDown(); - } - - public SyncSliceTest() { - super(); - sliceCount = 1; - fixShardCount(TEST_NIGHTLY ? 7 : 4); - } +public class SyncSliceTest extends AbstractSyncSliceTestBase { @Test - public void test() throws Exception { - - handle.clear(); - handle.put("timestamp", SKIPVAL); - - waitForThingsToLevelOut(30, TimeUnit.SECONDS); - - del("*:*"); - List skipServers = new ArrayList<>(); - int docId = 0; - indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, - "to come to the aid of their country."); - - indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, - "old haven was blue."); - - skipServers.add(shardToJetty.get("shard1").get(1)); - - indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, - "but the song was fancy."); - - skipServers.add(shardToJetty.get("shard1").get(2)); - - indexDoc(skipServers, id,docId++, i1, 50, tlong, 50, t1, - "under the moon and over the lake"); - - commit(); - - waitForRecoveriesToFinish(false); - - // shard should be inconsistent - String shardFailMessage = checkShardConsistency("shard1", true, false); - assertNotNull(shardFailMessage); - - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("action", CollectionAction.SYNCSHARD.toString()); - params.set("collection", "collection1"); - params.set("shard", "shard1"); - QueryRequest request = new QueryRequest(params); - request.setPath("/admin/collections"); - - String baseUrl = ((HttpSolrClient) shardToJetty.get("shard1").get(2).client.solrClient) - .getBaseURL(); - baseUrl = baseUrl.substring(0, baseUrl.length() - "collection1".length()); - - // we only set the connect timeout, not so timeout - try (HttpSolrClient baseClient = getHttpSolrClient(baseUrl, 30000)) { - baseClient.request(request); - } - - waitForThingsToLevelOut(15, TimeUnit.SECONDS); - - checkShardConsistency(false, true); - - long cloudClientDocs = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); - assertEquals(4, cloudClientDocs); - - - // kill the leader - new leader could have all the docs or be missing one - CloudJettyRunner leaderJetty = shardToLeaderJetty.get("shard1"); - - skipServers = getRandomOtherJetty(leaderJetty, null); // but not the leader - - // this doc won't be on one node - indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, - "to come to the aid of their country."); - commit(); - - - Set jetties = new HashSet<>(); - jetties.addAll(shardToJetty.get("shard1")); - jetties.remove(leaderJetty); - assertEquals(getShardCount() - 1, jetties.size()); - - leaderJetty.jetty.stop(); - - Thread.sleep(3000); - - waitForNoShardInconsistency(); - - Thread.sleep(1000); - - checkShardConsistency(false, true); - - cloudClientDocs = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); - assertEquals(5, cloudClientDocs); - - CloudJettyRunner deadJetty = leaderJetty; - - // let's get the latest leader - while (deadJetty == leaderJetty) { - updateMappingsFromZk(this.jettys, this.clients); - leaderJetty = shardToLeaderJetty.get("shard1"); - } - - // bring back dead node - deadJetty.jetty.start(); // he is not the leader anymore - - waitTillAllNodesActive(); - - skipServers = getRandomOtherJetty(leaderJetty, deadJetty); - skipServers.addAll( getRandomOtherJetty(leaderJetty, deadJetty)); - // skip list should be - -// System.out.println("leader:" + leaderJetty.url); -// System.out.println("dead:" + deadJetty.url); -// System.out.println("skip list:" + skipServers); - - // we are skipping 2 nodes - assertEquals(2, skipServers.size()); - - // more docs than can peer sync - for (int i = 0; i < 300; i++) { - indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, - "to come to the aid of their country."); - } - - commit(); - - Thread.sleep(1000); - - waitForRecoveriesToFinish(false); - - // shard should be inconsistent - shardFailMessage = waitTillInconsistent(); - assertNotNull( - "Test Setup Failure: shard1 should have just been set up to be inconsistent - but it's still consistent. Leader:" - + leaderJetty.url + " Dead Guy:" + deadJetty.url + "skip list:" + skipServers, shardFailMessage); - - // good place to test compareResults - boolean shouldFail = CloudInspectUtil.compareResults(controlClient, cloudClient); - assertTrue("A test that compareResults is working correctly failed", shouldFail); - - jetties = new HashSet<>(); - jetties.addAll(shardToJetty.get("shard1")); - jetties.remove(leaderJetty); - assertEquals(getShardCount() - 1, jetties.size()); - - - // kill the current leader - leaderJetty.jetty.stop(); - - waitForNoShardInconsistency(); - - checkShardConsistency(true, true); - - success = true; - } - - private void waitTillAllNodesActive() throws Exception { - for (int i = 0; i < 60; i++) { - Thread.sleep(3000); - ZkStateReader zkStateReader = cloudClient.getZkStateReader(); - ClusterState clusterState = zkStateReader.getClusterState(); - DocCollection collection1 = clusterState.getCollection("collection1"); - Slice slice = collection1.getSlice("shard1"); - Collection replicas = slice.getReplicas(); - boolean allActive = true; - for (Replica replica : replicas) { - if (!clusterState.liveNodesContain(replica.getNodeName()) || replica.getState() != Replica.State.ACTIVE) { - allActive = false; - break; - } - } - if (allActive) { - return; - } - } - printLayout(); - fail("timeout waiting to see all nodes active"); - } - - private String waitTillInconsistent() throws Exception, InterruptedException { - String shardFailMessage = null; - - shardFailMessage = pollConsistency(shardFailMessage, 0); - shardFailMessage = pollConsistency(shardFailMessage, 3000); - shardFailMessage = pollConsistency(shardFailMessage, 5000); - shardFailMessage = pollConsistency(shardFailMessage, 15000); - - return shardFailMessage; - } - - private String pollConsistency(String shardFailMessage, int sleep) - throws InterruptedException, Exception { - try { - commit(); - } catch (Throwable t) { - t.printStackTrace(); - } - if (shardFailMessage == null) { - // try again - Thread.sleep(sleep); - shardFailMessage = checkShardConsistency("shard1", true, false); - } - return shardFailMessage; - } - - private List getRandomOtherJetty(CloudJettyRunner leader, CloudJettyRunner down) { - List skipServers = new ArrayList<>(); - List candidates = new ArrayList<>(); - candidates.addAll(shardToJetty.get("shard1")); - - if (leader != null) { - candidates.remove(leader); - } - - if (down != null) { - candidates.remove(down); - } - - CloudJettyRunner cjetty = candidates.get(random().nextInt(candidates.size())); - skipServers.add(cjetty); - return skipServers; - } - - protected void indexDoc(List skipServers, Object... fields) throws IOException, - SolrServerException { - SolrInputDocument doc = new SolrInputDocument(); - - addFields(doc, fields); - addFields(doc, "rnd_b", true); - - controlClient.add(doc); - - UpdateRequest ureq = new UpdateRequest(); - ureq.add(doc); - ModifiableSolrParams params = new ModifiableSolrParams(); - for (CloudJettyRunner skip : skipServers) { - params.add("test.distrib.skip.servers", skip.url + "/"); - } - ureq.setParams(params); - ureq.process(cloudClient); - } - - // skip the randoms - they can deadlock... @Override - protected void indexr(Object... fields) throws Exception { - SolrInputDocument doc = new SolrInputDocument(); - addFields(doc, fields); - addFields(doc, "rnd_b", true); - indexDoc(doc); + public void test() throws Exception { + super.test(); } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractSyncSliceTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractSyncSliceTestBase.java new file mode 100644 index 00000000000..4cfa67ed7f0 --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractSyncSliceTestBase.java @@ -0,0 +1,308 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud; + +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.request.QueryRequest; +import org.apache.solr.client.solrj.request.UpdateRequest; +import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.common.cloud.ClusterState; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.apache.solr.common.cloud.ZkStateReader; +import org.apache.solr.common.params.CollectionParams.CollectionAction; +import org.apache.solr.common.params.ModifiableSolrParams; +import org.junit.Test; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +/** + * Test sync phase that occurs when Leader goes down and a new Leader is + * elected. + */ +public abstract class AbstractSyncSliceTestBase extends AbstractFullDistribZkTestBase { + private boolean success = false; + + @Override + public void distribTearDown() throws Exception { + if (!success) { + printLayoutOnTearDown = true; + } + super.distribTearDown(); + } + + public AbstractSyncSliceTestBase() { + super(); + sliceCount = 1; + fixShardCount(TEST_NIGHTLY ? 7 : 4); + } + + @Test + public void test() throws Exception { + + handle.clear(); + handle.put("timestamp", SKIPVAL); + + waitForThingsToLevelOut(30, TimeUnit.SECONDS); + + del("*:*"); + List skipServers = new ArrayList<>(); + int docId = 0; + indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, + "to come to the aid of their country."); + + indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, + "old haven was blue."); + + skipServers.add(shardToJetty.get("shard1").get(1)); + + indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, + "but the song was fancy."); + + skipServers.add(shardToJetty.get("shard1").get(2)); + + indexDoc(skipServers, id,docId++, i1, 50, tlong, 50, t1, + "under the moon and over the lake"); + + commit(); + + waitForRecoveriesToFinish(false); + + // shard should be inconsistent + String shardFailMessage = checkShardConsistency("shard1", true, false); + assertNotNull(shardFailMessage); + + ModifiableSolrParams params = new ModifiableSolrParams(); + params.set("action", CollectionAction.SYNCSHARD.toString()); + params.set("collection", "collection1"); + params.set("shard", "shard1"); + QueryRequest request = new QueryRequest(params); + request.setPath("/admin/collections"); + + String baseUrl = ((HttpSolrClient) shardToJetty.get("shard1").get(2).client.solrClient) + .getBaseURL(); + baseUrl = baseUrl.substring(0, baseUrl.length() - "collection1".length()); + + // we only set the connect timeout, not so timeout + try (HttpSolrClient baseClient = getHttpSolrClient(baseUrl, 30000)) { + baseClient.request(request); + } + + waitForThingsToLevelOut(15, TimeUnit.SECONDS); + + checkShardConsistency(false, true); + + long cloudClientDocs = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); + assertEquals(4, cloudClientDocs); + + + // kill the leader - new leader could have all the docs or be missing one + CloudJettyRunner leaderJetty = shardToLeaderJetty.get("shard1"); + + skipServers = getRandomOtherJetty(leaderJetty, null); // but not the leader + + // this doc won't be on one node + indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, + "to come to the aid of their country."); + commit(); + + + Set jetties = new HashSet<>(); + jetties.addAll(shardToJetty.get("shard1")); + jetties.remove(leaderJetty); + assertEquals(getShardCount() - 1, jetties.size()); + + leaderJetty.jetty.stop(); + + Thread.sleep(3000); + + waitForNoShardInconsistency(); + + Thread.sleep(1000); + + checkShardConsistency(false, true); + + cloudClientDocs = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); + assertEquals(5, cloudClientDocs); + + CloudJettyRunner deadJetty = leaderJetty; + + // let's get the latest leader + while (deadJetty == leaderJetty) { + updateMappingsFromZk(this.jettys, this.clients); + leaderJetty = shardToLeaderJetty.get("shard1"); + } + + // bring back dead node + deadJetty.jetty.start(); // he is not the leader anymore + + waitTillAllNodesActive(); + + skipServers = getRandomOtherJetty(leaderJetty, deadJetty); + skipServers.addAll( getRandomOtherJetty(leaderJetty, deadJetty)); + // skip list should be + +// System.out.println("leader:" + leaderJetty.url); +// System.out.println("dead:" + deadJetty.url); +// System.out.println("skip list:" + skipServers); + + // we are skipping 2 nodes + assertEquals(2, skipServers.size()); + + // more docs than can peer sync + for (int i = 0; i < 300; i++) { + indexDoc(skipServers, id, docId++, i1, 50, tlong, 50, t1, + "to come to the aid of their country."); + } + + commit(); + + Thread.sleep(1000); + + waitForRecoveriesToFinish(false); + + // shard should be inconsistent + shardFailMessage = waitTillInconsistent(); + assertNotNull( + "Test Setup Failure: shard1 should have just been set up to be inconsistent - but it's still consistent. Leader:" + + leaderJetty.url + " Dead Guy:" + deadJetty.url + "skip list:" + skipServers, shardFailMessage); + + // good place to test compareResults + boolean shouldFail = CloudInspectUtil.compareResults(controlClient, cloudClient); + assertTrue("A test that compareResults is working correctly failed", shouldFail); + + jetties = new HashSet<>(); + jetties.addAll(shardToJetty.get("shard1")); + jetties.remove(leaderJetty); + assertEquals(getShardCount() - 1, jetties.size()); + + + // kill the current leader + leaderJetty.jetty.stop(); + + waitForNoShardInconsistency(); + + checkShardConsistency(true, true); + + success = true; + } + + private void waitTillAllNodesActive() throws Exception { + for (int i = 0; i < 60; i++) { + Thread.sleep(3000); + ZkStateReader zkStateReader = cloudClient.getZkStateReader(); + ClusterState clusterState = zkStateReader.getClusterState(); + DocCollection collection1 = clusterState.getCollection("collection1"); + Slice slice = collection1.getSlice("shard1"); + Collection replicas = slice.getReplicas(); + boolean allActive = true; + for (Replica replica : replicas) { + if (!clusterState.liveNodesContain(replica.getNodeName()) || replica.getState() != Replica.State.ACTIVE) { + allActive = false; + break; + } + } + if (allActive) { + return; + } + } + printLayout(); + fail("timeout waiting to see all nodes active"); + } + + private String waitTillInconsistent() throws Exception, InterruptedException { + String shardFailMessage = null; + + shardFailMessage = pollConsistency(shardFailMessage, 0); + shardFailMessage = pollConsistency(shardFailMessage, 3000); + shardFailMessage = pollConsistency(shardFailMessage, 5000); + shardFailMessage = pollConsistency(shardFailMessage, 15000); + + return shardFailMessage; + } + + private String pollConsistency(String shardFailMessage, int sleep) + throws InterruptedException, Exception { + try { + commit(); + } catch (Throwable t) { + t.printStackTrace(); + } + if (shardFailMessage == null) { + // try again + Thread.sleep(sleep); + shardFailMessage = checkShardConsistency("shard1", true, false); + } + return shardFailMessage; + } + + private List getRandomOtherJetty(CloudJettyRunner leader, CloudJettyRunner down) { + List skipServers = new ArrayList<>(); + List candidates = new ArrayList<>(); + candidates.addAll(shardToJetty.get("shard1")); + + if (leader != null) { + candidates.remove(leader); + } + + if (down != null) { + candidates.remove(down); + } + + CloudJettyRunner cjetty = candidates.get(random().nextInt(candidates.size())); + skipServers.add(cjetty); + return skipServers; + } + + protected void indexDoc(List skipServers, Object... fields) throws IOException, + SolrServerException { + SolrInputDocument doc = new SolrInputDocument(); + + addFields(doc, fields); + addFields(doc, "rnd_b", true); + + controlClient.add(doc); + + UpdateRequest ureq = new UpdateRequest(); + ureq.add(doc); + ModifiableSolrParams params = new ModifiableSolrParams(); + for (CloudJettyRunner skip : skipServers) { + params.add("test.distrib.skip.servers", skip.url + "/"); + } + ureq.setParams(params); + ureq.process(cloudClient); + } + + // skip the randoms - they can deadlock... + @Override + protected void indexr(Object... fields) throws Exception { + SolrInputDocument doc = new SolrInputDocument(); + addFields(doc, fields); + addFields(doc, "rnd_b", true); + indexDoc(doc); + } + +} From 7c209ae956f7b84712e0955c0fc1c555d26af0ac Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 09:21:21 +0200 Subject: [PATCH 09/52] HDFS contrib module: separate HDFS test classes from Core test classes (3.: TestHdfsBackupRestoreCore) - TestHdfsBackupRestoreCore uses BackupRestoreUtils and BackupStatusChecker, these were moved to test framework (these also use log4j classes) - Moved the fetchRestoreStatus method out of TestRestoreCore to a util class as it is shared by hdfs tests and core tests --- .../handler/TestHdfsBackupRestoreCore.java | 2 +- .../apache/solr/handler/TestRestoreCore.java | 34 ++---------- .../solr/handler/TestRestoreCoreUtil.java | 54 +++++++++++++++++++ .../solr/handler/BackupRestoreUtils.java | 0 .../solr/handler/BackupStatusChecker.java | 0 5 files changed, 58 insertions(+), 32 deletions(-) create mode 100644 solr/core/src/testFixtures/java/org/apache/solr/handler/TestRestoreCoreUtil.java rename solr/{core/src/test => test-framework/src/java}/org/apache/solr/handler/BackupRestoreUtils.java (100%) rename solr/{core/src/test => test-framework/src/java}/org/apache/solr/handler/BackupStatusChecker.java (100%) diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java b/solr/contrib/hdfs/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java index e4168e3a9bd..bd4e480e5c1 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java @@ -232,7 +232,7 @@ public void test() throws Exception { log.info("Running Restore via replication handler"); // Snapshooter prefixes "snapshot." to the backup name. BackupRestoreUtils.runReplicationHandlerCommand(baseUrl, coreName, ReplicationHandler.CMD_RESTORE, "hdfs", backupName); - while (!TestRestoreCore.fetchRestoreStatus(baseUrl, coreName)) { + while (!TestRestoreCoreUtil.fetchRestoreStatus(baseUrl, coreName)) { Thread.sleep(1000); } } else { diff --git a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java index 4edee45f1bd..1d48de02373 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java +++ b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java @@ -18,18 +18,14 @@ import java.io.File; import java.io.IOException; -import java.io.InputStream; -import java.net.URL; + import java.net.URLEncoder; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Properties; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.apache.commons.io.IOUtils; import org.apache.lucene.index.IndexFileNames; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; @@ -174,7 +170,7 @@ public void testSimpleRestore() throws Exception { TestReplicationHandlerBackup.runBackupCommand(leaderJetty, ReplicationHandler.CMD_RESTORE, params); - while (!fetchRestoreStatus(baseUrl, DEFAULT_TEST_CORENAME)) { + while (!TestRestoreCoreUtil.fetchRestoreStatus(baseUrl, DEFAULT_TEST_CORENAME)) { Thread.sleep(1000); } @@ -223,7 +219,7 @@ public void testFailedRestore() throws Exception { expectThrows(AssertionError.class, () -> { for (int i = 0; i < 10; i++) { // this will throw an assertion once we get what we expect - fetchRestoreStatus(baseUrl, DEFAULT_TEST_CORENAME); + TestRestoreCoreUtil.fetchRestoreStatus(baseUrl, DEFAULT_TEST_CORENAME); Thread.sleep(50); } // if we never got an assertion let expectThrows complain @@ -237,29 +233,5 @@ public void testFailedRestore() throws Exception { } - public static boolean fetchRestoreStatus (String baseUrl, String coreName) throws IOException { - String leaderUrl = baseUrl + "/" + coreName + - ReplicationHandler.PATH + "?wt=xml&command=" + ReplicationHandler.CMD_RESTORE_STATUS; - final Pattern pException = Pattern.compile("(.*?)"); - InputStream stream = null; - try { - URL url = new URL(leaderUrl); - stream = url.openStream(); - String response = IOUtils.toString(stream, "UTF-8"); - Matcher matcher = pException.matcher(response); - if(matcher.find()) { - fail("Failed to complete restore action with exception " + matcher.group(1)); - } - if(response.contains("success")) { - return true; - } else if (response.contains("failed")){ - fail("Restore Failed"); - } - stream.close(); - } finally { - IOUtils.closeQuietly(stream); - } - return false; - } } diff --git a/solr/core/src/testFixtures/java/org/apache/solr/handler/TestRestoreCoreUtil.java b/solr/core/src/testFixtures/java/org/apache/solr/handler/TestRestoreCoreUtil.java new file mode 100644 index 00000000000..210b2649026 --- /dev/null +++ b/solr/core/src/testFixtures/java/org/apache/solr/handler/TestRestoreCoreUtil.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.handler; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.io.IOUtils; +import org.junit.Assert; + +public class TestRestoreCoreUtil { + public static boolean fetchRestoreStatus (String baseUrl, String coreName) throws IOException { + String leaderUrl = baseUrl + "/" + coreName + + ReplicationHandler.PATH + "?wt=xml&command=" + ReplicationHandler.CMD_RESTORE_STATUS; + final Pattern pException = Pattern.compile("(.*?)"); + + InputStream stream = null; + try { + URL url = new URL(leaderUrl); + stream = url.openStream(); + String response = IOUtils.toString(stream, "UTF-8"); + Matcher matcher = pException.matcher(response); + if(matcher.find()) { + Assert.fail("Failed to complete restore action with exception " + matcher.group(1)); + } + if(response.contains("success")) { + return true; + } else if (response.contains("failed")){ + Assert.fail("Restore Failed"); + } + stream.close(); + } finally { + IOUtils.closeQuietly(stream); + } + return false; + } +} diff --git a/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java b/solr/test-framework/src/java/org/apache/solr/handler/BackupRestoreUtils.java similarity index 100% rename from solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java rename to solr/test-framework/src/java/org/apache/solr/handler/BackupRestoreUtils.java diff --git a/solr/core/src/test/org/apache/solr/handler/BackupStatusChecker.java b/solr/test-framework/src/java/org/apache/solr/handler/BackupStatusChecker.java similarity index 100% rename from solr/core/src/test/org/apache/solr/handler/BackupStatusChecker.java rename to solr/test-framework/src/java/org/apache/solr/handler/BackupStatusChecker.java From bca9de189ab5402f3196864e27e1f0684e5227d4 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 10:27:17 +0200 Subject: [PATCH 10/52] HDFS contrib module: separate HDFS test classes from Core test classes (4.: tests based on BasicDistributedZkTest) - HdfsNNFailoverTest extends BasicDistributedZkTest. Separated it to AbstractBasicDistributedZkTestBase and BasicDistributedZkTest. - Also changed the following classes to extend AbstractBasicDistributedZkTestBase: - HdfsBasicDistributedZkTest - HdfsWriteToMultipleCollectionsTest - StressHdfsTest --- .../hdfs/HdfsBasicDistributedZkTest.java | 13 +- .../solr/cloud/hdfs/HdfsNNFailoverTest.java | 5 +- .../HdfsWriteToMultipleCollectionsTest.java | 5 +- .../solr/cloud/hdfs/StressHdfsTest.java | 5 +- .../solr/cloud/BasicDistributedZkTest.java | 1321 +--------------- .../solr/cloud/UnloadDistributedZkTest.java | 2 +- .../AbstractBasicDistributedZkTestBase.java | 1350 +++++++++++++++++ 7 files changed, 1375 insertions(+), 1326 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java index bc172b3150c..7a8e623edef 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java @@ -22,13 +22,14 @@ import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.BasicDistributedZkTest; +import org.apache.solr.cloud.AbstractBasicDistributedZkTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; import com.carrotsearch.randomizedtesting.annotations.Nightly; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; +import org.junit.Test; @Slow @Nightly @@ -37,7 +38,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsBasicDistributedZkTest extends BasicDistributedZkTest { +public class HdfsBasicDistributedZkTest extends AbstractBasicDistributedZkTestBase { private static MiniDFSCluster dfsCluster; @BeforeClass @@ -63,4 +64,12 @@ public static void teardownClass() throws Exception { protected String getDataDir(String dataDir) throws IOException { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } + + @Test + @Override + @ShardsFixed(num = 4) + public void test() throws Exception { + super.test(); + } + } diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java index f70335d14d3..adb1d9aab7a 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java @@ -22,7 +22,7 @@ import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.BasicDistributedZkTest; +import org.apache.solr.cloud.AbstractBasicDistributedZkTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -36,7 +36,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsNNFailoverTest extends BasicDistributedZkTest { +public class HdfsNNFailoverTest extends AbstractBasicDistributedZkTestBase { private static final String COLLECTION = "collection"; private static MiniDFSCluster dfsCluster; @@ -70,6 +70,7 @@ protected String getSolrXml() { } @Test + @Override public void test() throws Exception { createCollection(COLLECTION, "conf1", 1, 1); diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java index 46eb56a8425..ce8061f37ab 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java @@ -38,7 +38,7 @@ import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.embedded.JettySolrRunner; import org.apache.solr.client.solrj.impl.CloudSolrClient; -import org.apache.solr.cloud.BasicDistributedZkTest; +import org.apache.solr.cloud.AbstractBasicDistributedZkTestBase; import org.apache.solr.cloud.StoppableIndexingThread; import org.apache.solr.core.CoreContainer; import org.apache.solr.core.DirectoryFactory; @@ -61,7 +61,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsWriteToMultipleCollectionsTest extends BasicDistributedZkTest { +public class HdfsWriteToMultipleCollectionsTest extends AbstractBasicDistributedZkTestBase { private static final String ACOLLECTION = "acollection"; private static MiniDFSCluster dfsCluster; @@ -97,6 +97,7 @@ protected String getSolrXml() { } @Test + @Override public void test() throws Exception { int docCount = random().nextInt(1313) + 1; int cnt = random().nextInt(4) + 1; diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java index 551056c1af2..f9e705b5dc2 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java @@ -31,7 +31,7 @@ import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.request.QueryRequest; -import org.apache.solr.cloud.BasicDistributedZkTest; +import org.apache.solr.cloud.AbstractBasicDistributedZkTestBase; import org.apache.solr.common.cloud.ClusterState; import org.apache.solr.common.cloud.DocCollection; import org.apache.solr.common.cloud.Replica; @@ -62,7 +62,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class StressHdfsTest extends BasicDistributedZkTest { +public class StressHdfsTest extends AbstractBasicDistributedZkTestBase { private static final String DELETE_DATA_DIR_COLLECTION = "delete_data_dir"; private static MiniDFSCluster dfsCluster; @@ -99,6 +99,7 @@ protected String getSolrXml() { } @Test + @Override public void test() throws Exception { randomlyEnableAutoSoftCommit(); diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java index 718610b0da4..6afabf39070 100644 --- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java @@ -16,1339 +16,26 @@ */ package org.apache.solr.cloud; -import java.io.IOException; -import java.lang.invoke.MethodHandles; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.CompletionService; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorCompletionService; -import java.util.concurrent.Future; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; - -import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.LuceneTestCase.Slow; -import org.apache.solr.JSONTestUtil; import org.apache.solr.SolrTestCaseJ4.SuppressSSL; -import org.apache.solr.client.solrj.SolrClient; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.embedded.JettySolrRunner; -import org.apache.solr.client.solrj.impl.HttpSolrClient; -import org.apache.solr.client.solrj.request.AbstractUpdateRequest; -import org.apache.solr.client.solrj.request.CollectionAdminRequest; -import org.apache.solr.client.solrj.request.CoreAdminRequest.Create; -import org.apache.solr.client.solrj.request.CoreAdminRequest.Unload; -import org.apache.solr.client.solrj.request.QueryRequest; -import org.apache.solr.client.solrj.request.StreamingUpdateRequest; -import org.apache.solr.client.solrj.request.UpdateRequest; -import org.apache.solr.client.solrj.response.CollectionAdminResponse; -import org.apache.solr.client.solrj.response.FacetField; -import org.apache.solr.client.solrj.response.Group; -import org.apache.solr.client.solrj.response.GroupCommand; -import org.apache.solr.client.solrj.response.GroupResponse; -import org.apache.solr.client.solrj.response.QueryResponse; -import org.apache.solr.client.solrj.response.UpdateResponse; -import org.apache.solr.cloud.api.collections.CollectionHandlingUtils; -import org.apache.solr.common.SolrDocument; -import org.apache.solr.common.SolrDocumentList; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.common.cloud.ClusterState; -import org.apache.solr.common.cloud.DocCollection; -import org.apache.solr.common.cloud.Replica; -import org.apache.solr.common.cloud.Slice; -import org.apache.solr.common.cloud.ZkCoreNodeProps; -import org.apache.solr.common.cloud.ZkNodeProps; -import org.apache.solr.common.cloud.ZkStateReader; -import org.apache.solr.common.params.CollectionParams.CollectionAction; -import org.apache.solr.common.params.CommonParams; -import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.common.params.UpdateParams; -import org.apache.solr.common.util.ExecutorUtil; -import org.apache.solr.common.util.NamedList; -import org.apache.solr.common.util.SolrNamedThreadFactory; -import org.apache.solr.util.TestInjection; -import org.apache.solr.util.TestInjection.Hook; -import org.junit.BeforeClass; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * This test simply does a bunch of basic things in solrcloud mode and asserts things * work as expected. + * Implementation moved to AbstractBasicDistributedZkTestBase as it is used by many HDFS contrib tests. */ @Slow @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776") -public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase { - - private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - private static final String DEFAULT_COLLECTION = "collection1"; - - private final boolean onlyLeaderIndexes = random().nextBoolean(); - - String t1="a_t"; - String i1="a_i1"; - String tlong = "other_tl1"; - String tsort="t_sortable"; - - String oddField="oddField_s"; - String missingField="ignore_exception__missing_but_valid_field_t"; - - private Map> otherCollectionClients = new HashMap<>(); - - private String oneInstanceCollection = "oneInstanceCollection"; - private String oneInstanceCollection2 = "oneInstanceCollection2"; - - private AtomicInteger nodeCounter = new AtomicInteger(); - - CompletionService completionService; - Set> pending; - - private static Hook newSearcherHook = new Hook() { - volatile CountDownLatch latch; - AtomicReference collection = new AtomicReference<>(); - - @Override - public void newSearcher(String collectionName) { - String c = collection.get(); - if (c != null && c.equals(collectionName)) { - log.info("Hook detected newSearcher"); - try { - latch.countDown(); - } catch (NullPointerException e) { - - } - } - } - - public void waitForSearcher(String collection, int cnt, int timeoutms, boolean failOnTimeout) throws InterruptedException { - latch = new CountDownLatch(cnt); - this.collection.set(collection); - boolean timeout = !latch.await(timeoutms, TimeUnit.MILLISECONDS); - if (timeout && failOnTimeout) { - fail("timed out waiting for new searcher event " + latch.getCount()); - } - } - - }; - - public BasicDistributedZkTest() { - // we need DVs on point fields to compute stats & facets - if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true"); - - sliceCount = 2; - completionService = new ExecutorCompletionService<>(executor); - pending = new HashSet<>(); - - } - - @BeforeClass - public static void beforeBDZKTClass() { - TestInjection.newSearcherHook(newSearcherHook); - } - - @Override - protected boolean useTlogReplicas() { - return false; // TODO: tlog replicas makes commits take way to long due to what is likely a bug and it's TestInjection use - } - - @Override - protected void setDistributedParams(ModifiableSolrParams params) { +public class BasicDistributedZkTest extends AbstractBasicDistributedZkTestBase { - if (r.nextBoolean()) { - // don't set shards, let that be figured out from the cloud state - } else { - // use shard ids rather than physical locations - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < getShardCount(); i++) { - if (i > 0) - sb.append(','); - sb.append("shard" + (i + 3)); - } - params.set("shards", sb.toString()); - } - } @Test + @Override @ShardsFixed(num = 4) // commented out on: 17-Feb-2019 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018 public void test() throws Exception { - // setLoggingLevel(null); - - ZkStateReader zkStateReader = cloudClient.getZkStateReader(); - // make sure we have leaders for each shard - for (int j = 1; j < sliceCount; j++) { - zkStateReader.getLeaderRetry(DEFAULT_COLLECTION, "shard" + j, 10000); - } // make sure we again have leaders for each shard - - waitForRecoveriesToFinish(false); - - handle.clear(); - handle.put("timestamp", SKIPVAL); - - del("*:*"); - queryAndCompareShards(params("q", "*:*", "distrib", "false", "sanity_check", "is_empty")); - - // ask every individual replica of every shard to update+commit the same doc id - // with an incrementing counter on each update+commit - int foo_i_counter = 0; - for (SolrClient client : clients) { - foo_i_counter++; - indexDoc(client, params("commit", "true"), // SOLR-4923 - sdoc(id,1, i1,100, tlong,100, "foo_i", foo_i_counter)); - // after every update+commit, check all the shards consistency - queryAndCompareShards(params("q", "id:1", "distrib", "false", - "sanity_check", "non_distrib_id_1_lookup")); - queryAndCompareShards(params("q", "id:1", - "sanity_check", "distrib_id_1_lookup")); - } - - indexr(id,1, i1, 100, tlong, 100,t1,"now is the time for all good men" - ,"foo_f", 1.414f, "foo_b", "true", "foo_d", 1.414d, tsort, "now is the time for all good men"); - indexr(id, 2, i1, 50, tlong, 50, t1, "to come to the aid of their country." - , tsort, "to come to the aid of their country."); - indexr(id, 3, i1, 2, tlong, 2, t1, "how now brown cow", tsort, "how now brown cow"); - indexr(id, 4, i1, -100, tlong, 101, t1, "the quick fox jumped over the lazy dog" - , tsort, "the quick fox jumped over the lazy dog"); - indexr(id, 5, i1, 500, tlong, 500, t1, "the quick fox jumped way over the lazy dog" - , tsort, "the quick fox jumped over the lazy dog"); - indexr(id, 6, i1, -600, tlong, 600, t1, "humpty dumpy sat on a wall", tsort, "the quick fox jumped over the lazy dog"); - indexr(id, 7, i1, 123, tlong, 123, t1, "humpty dumpy had a great fall", tsort, "the quick fox jumped over the lazy dog"); - indexr(id,8, i1, 876, tlong, 876,t1,"all the kings horses and all the kings men",tsort,"all the kings horses and all the kings men"); - indexr(id, 9, i1, 7, tlong, 7, t1, "couldn't put humpty together again", tsort, "the quick fox jumped over the lazy dog"); - indexr(id,10, i1, 4321, tlong, 4321,t1,"this too shall pass",tsort,"this too shall pass"); - indexr(id,11, i1, -987, tlong, 987,t1,"An eye for eye only ends up making the whole world blind." - ,tsort,"An eye for eye only ends up making the whole world blind."); - indexr(id,12, i1, 379, tlong, 379,t1,"Great works are performed, not by strength, but by perseverance.", - tsort,"Great works are performed, not by strength, but by perseverance."); - indexr(id,13, i1, 232, tlong, 232,t1,"no eggs on wall, lesson learned", oddField, "odd man out", - tsort,"no eggs on wall, lesson learned"); - - indexr(id, 14, "SubjectTerms_mfacet", new String[] {"mathematical models", "mathematical analysis"}); - indexr(id, 15, "SubjectTerms_mfacet", new String[] {"test 1", "test 2", "test3"}); - indexr(id, 16, "SubjectTerms_mfacet", new String[] {"test 1", "test 2", "test3"}); - String[] vals = new String[100]; - for (int i=0; i<100; i++) { - vals[i] = "test " + i; - } - indexr(id, 17, "SubjectTerms_mfacet", vals); - - for (int i=100; i<150; i++) { - indexr(id, i); - } - - commit(); - - testTokenizedGrouping(); - testSortableTextFaceting(); - testSortableTextSorting(); - testSortableTextGrouping(); - - queryAndCompareShards(params("q", "*:*", - "sort", "id desc", - "distrib", "false", - "sanity_check", "is_empty")); - - // random value sort - for (String f : fieldNames) { - query(false, new String[] {"q","*:*", "sort",f+" desc"}); - query(false, new String[] {"q","*:*", "sort",f+" asc"}); - } - - // these queries should be exactly ordered and scores should exactly match - query(false, new String[] {"q","*:*", "sort",i1+" desc"}); - query(false, new String[] {"q","*:*", "sort",i1+" asc"}); - query(false, new String[] {"q","*:*", "sort",i1+" desc", "fl","*,score"}); - query(false, new String[] {"q","*:*", "sort","n_tl1 asc", "fl","*,score"}); - query(false, new String[] {"q","*:*", "sort","n_tl1 desc"}); - handle.put("maxScore", SKIPVAL); - query(false, new String[] {"q","{!func}"+i1});// does not expect maxScore. So if it comes ,ignore it. JavaBinCodec.writeSolrDocumentList() - //is agnostic of request params. - handle.remove("maxScore"); - query(false, new String[] {"q","{!func}"+i1, "fl","*,score"}); // even scores should match exactly here - - handle.put("highlighting", UNORDERED); - handle.put("response", UNORDERED); - - handle.put("maxScore", SKIPVAL); - query(false, new String[] {"q","quick"}); - query(false, new String[] {"q","all","fl","id","start","0"}); - query(false, new String[] {"q","all","fl","foofoofoo","start","0"}); // no fields in returned docs - query(false, new String[] {"q","all","fl","id","start","100"}); - - handle.put("score", SKIPVAL); - query(false, new String[] {"q","quick","fl","*,score"}); - query(false, new String[] {"q","all","fl","*,score","start","1"}); - query(false, new String[] {"q","all","fl","*,score","start","100"}); - - query(false, new String[] {"q","now their fox sat had put","fl","*,score", - "hl","true","hl.fl",t1}); - - query(false, new String[] {"q","now their fox sat had put","fl","foofoofoo", - "hl","true","hl.fl",t1}); - - query(false, new String[] {"q","matchesnothing","fl","*,score"}); - - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1}); - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","count"}); - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","count", "facet.mincount",2}); - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","index"}); - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","index", "facet.mincount",2}); - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1,"facet.limit",1}); - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.query","quick", "facet.query","all", "facet.query","*:*"}); - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.offset",1}); - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.mincount",2}); - - // test faceting multiple things at once - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.query","quick", "facet.query","all", "facet.query","*:*" - ,"facet.field",t1}); - - // test filter tagging, facet exclusion, and naming (multi-select facet support) - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.query","{!key=myquick}quick", "facet.query","{!key=myall ex=a}all", "facet.query","*:*" - ,"facet.field","{!key=mykey ex=a}"+t1 - ,"facet.field","{!key=other ex=b}"+t1 - ,"facet.field","{!key=again ex=a,b}"+t1 - ,"facet.field",t1 - ,"fq","{!tag=a}id_i1:[1 TO 7]", "fq","{!tag=b}id_i1:[3 TO 9]"} - ); - query(false, new Object[] {"q", "*:*", "facet", "true", "facet.field", "{!ex=t1}SubjectTerms_mfacet", "fq", "{!tag=t1}SubjectTerms_mfacet:(test 1)", "facet.limit", "10", "facet.mincount", "1"}); - - // test field that is valid in schema but missing in all shards - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",missingField, "facet.mincount",2}); - // test field that is valid in schema and missing in some shards - query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",oddField, "facet.mincount",2}); - - query(false, new Object[] {"q","*:*", "sort",i1+" desc", "stats", "true", "stats.field", i1}); - - /*** TODO: the failure may come back in "exception" - try { - // test error produced for field that is invalid for schema - query("q","*:*", "rows",100, "facet","true", "facet.field",invalidField, "facet.mincount",2); - TestCase.fail("SolrServerException expected for invalid field that is not in schema"); - } catch (SolrServerException ex) { - // expected - } - ***/ - - // Try to get better coverage for refinement queries by turning off over requesting. - // This makes it much more likely that we may not get the top facet values and hence - // we turn of that checking. - handle.put("facet_fields", SKIPVAL); - query(false, new Object[] {"q","*:*", "rows",0, "facet","true", "facet.field",t1,"facet.limit",5, "facet.shard.limit",5}); - // check a complex key name - query(false, new Object[] {"q","*:*", "rows",0, "facet","true", "facet.field","{!key='a b/c \\' \\} foo'}"+t1,"facet.limit",5, "facet.shard.limit",5}); - handle.remove("facet_fields"); - - - // index the same document to two servers and make sure things - // don't blow up. - if (clients.size()>=2) { - index(id,100, i1, 107 ,t1,"oh no, a duplicate!"); - for (int i=0; i ffs = resp.getFacetFields(); - for (FacetField ff : ffs) { - if (ff.getName().equals(tsort) == false) continue; - for (FacetField.Count count : ff.getValues()) { - long num = count.getCount(); - switch (count.getName()) { - case "all the kings horses and all the kings men": - case "An eye for eye only ends up making the whole world blind.": - case "Great works are performed, not by strength, but by perseverance.": - case "how now brown cow": - case "no eggs on wall, lesson learned": - case "now is the time for all good men": - case "this too shall pass": - case "to come to the aid of their country.": - assertEquals("Should have exactly one facet count for field " + ff.getName(), 1, num); - break; - case "the quick fox jumped over the lazy dog": - assertEquals("Should have 5 docs for the lazy dog", 5, num); - break; - default: - fail("No case for facet '" + ff.getName() + "'"); - - } - } - } - } - - private void testSortableTextSorting() throws Exception { - SolrQuery query = new SolrQuery("*:*"); - query.addSort(tsort, SolrQuery.ORDER.desc); - query.addField("*"); - query.addField("eoe_sortable"); - query.addField(tsort); - QueryResponse resp = queryServer(query); - - SolrDocumentList docs = resp.getResults(); - - String title = docs.get(0).getFieldValue(tsort).toString(); - for (SolrDocument doc : docs) { - assertTrue("Docs should be back in sorted order, descending", title.compareTo(doc.getFieldValue(tsort).toString()) >= 0); - title = doc.getFieldValue(tsort).toString(); - } - } - - private void testSortableTextGrouping() throws Exception { - SolrQuery query = new SolrQuery("*:*"); - query.add("group", "true"); - query.add("group.field", tsort); - QueryResponse resp = queryServer(query); - GroupResponse groupResp = resp.getGroupResponse(); - List grpCmds = groupResp.getValues(); - for (GroupCommand grpCmd : grpCmds) { - if (grpCmd.getName().equals(tsort) == false) continue; - for (Group grp : grpCmd.getValues()) { - long count = grp.getResult().getNumFound(); - if (grp.getGroupValue() == null) continue; // Don't count the groups without an entry as the numnber is variable - switch (grp.getGroupValue()) { - case "all the kings horses and all the kings men": - case "An eye for eye only ends up making the whole world blind.": - case "Great works are performed, not by strength, but by perseverance.": - case "how now brown cow": - case "no eggs on wall, lesson learned": - case "now is the time for all good men": - case "this too shall pass": - case "to come to the aid of their country.": - assertEquals("Should have exactly one facet count for field " + grpCmd.getName(), 1, count); - break; - case "the quick fox jumped over the lazy dog": - assertEquals("Should have 5 docs for the lazy dog", 5, count); - break; - default: - fail("No case for facet '" + grpCmd.getName() + "'"); - - } - } - } - } - - private void testTokenizedGrouping() throws Exception { - SolrException ex = expectThrows(SolrException.class, () -> { - query(false, new String[]{"q", "*:*", "group", "true", "group.field", t1}); - }); - assertTrue("Expected error from server that SortableTextFields are required", ex.getMessage().contains("Sorting on a tokenized field that is not a SortableTextField is not supported in cloud mode")); - } - - private void assertSliceCounts(String msg, long expected, DocCollection dColl) throws Exception { - long found = checkSlicesSameCounts(dColl); - - if (found != expected) { - // we get one do over in a bad race - Thread.sleep(1000); - found = checkSlicesSameCounts(dColl); - } - - assertEquals(msg, expected, checkSlicesSameCounts(dColl)); - } - - // Ensure that total docs found is the expected number. - private void waitForDocCount(long expectedNumFound, long waitMillis, String failureMessage) - throws Exception { - AtomicLong total = new AtomicLong(-1); - try { - getCommonCloudSolrClient().getZkStateReader().waitForState(DEFAULT_COLLECTION, waitMillis, TimeUnit.MILLISECONDS, (n, c) -> { - long docTotal; - try { - docTotal = checkSlicesSameCounts(c); - } catch (SolrServerException | IOException e) { - throw new RuntimeException(e); - } - total.set(docTotal); - if (docTotal == expectedNumFound) { - return true; - } - return false; - }); - } catch (TimeoutException | InterruptedException e) { - - } - // We could fail here if we broke out of the above because we exceeded the time allowed. - assertEquals(failureMessage, expectedNumFound, total.get()); - - // This should be redundant, but it caught a test error after all. - for (SolrClient client : clients) { - assertEquals(failureMessage, expectedNumFound, client.query(new SolrQuery("*:*")).getResults().getNumFound()); - } - } - - // Insure that counts are the same for all replicas in each shard - // Return the total doc count for the query. - private long checkSlicesSameCounts(DocCollection dColl) throws SolrServerException, IOException { - long docTotal = 0; // total number of documents found counting only one replica per slice. - for (Slice slice : dColl.getActiveSlices()) { - long sliceDocCount = -1; - for (Replica rep : slice.getReplicas()) { - try (HttpSolrClient one = getHttpSolrClient(rep.getCoreUrl())) { - SolrQuery query = new SolrQuery("*:*"); - query.setDistrib(false); - QueryResponse resp = one.query(query); - long hits = resp.getResults().getNumFound(); - if (sliceDocCount == -1) { - sliceDocCount = hits; - docTotal += hits; - } else { - if (hits != sliceDocCount) { - return -1; - } - } - } - } - } - return docTotal; - } - - private void testShardParamVariations() throws Exception { - SolrQuery query = new SolrQuery("*:*"); - Map shardCounts = new HashMap<>(); - - for (String shard : shardToJetty.keySet()) { - // every client should give the same numDocs for this shard - // shffle the clients in a diff order for each shard - List solrclients = new ArrayList<>(this.clients); - Collections.shuffle(solrclients, random()); - for (SolrClient client : solrclients) { - query.set("shards", shard); - long numDocs = client.query(query).getResults().getNumFound(); - assertTrue("numDocs < 0 for shard "+shard+" via "+client, - 0 <= numDocs); - if (!shardCounts.containsKey(shard)) { - shardCounts.put(shard, numDocs); - } - assertEquals("inconsitent numDocs for shard "+shard+" via "+client, - shardCounts.get(shard).longValue(), numDocs); - - List replicaJetties - = new ArrayList<>(shardToJetty.get(shard)); - Collections.shuffle(replicaJetties, random()); - - // each replica should also give the same numDocs - ArrayList replicaAlts = new ArrayList<>(replicaJetties.size() * 2); - for (CloudJettyRunner replicaJetty : shardToJetty.get(shard)) { - String replica = replicaJetty.url; - query.set("shards", replica); - - // replicas already shuffled, use this in the alternative check below - if (0 == random().nextInt(3) || replicaAlts.size() < 2) { - replicaAlts.add(replica); - } - - numDocs = client.query(query).getResults().getNumFound(); - assertTrue("numDocs < 0 for replica "+replica+" via "+client, - 0 <= numDocs); - assertEquals("inconsitent numDocs for shard "+shard+ - " in replica "+replica+" via "+client, - shardCounts.get(shard).longValue(), numDocs); - } - - // any combination of replica alternatives should give same numDocs - String replicas = String.join("|", replicaAlts); - query.set("shards", replicas); - numDocs = client.query(query).getResults().getNumFound(); - assertTrue("numDocs < 0 for replicas "+replicas+" via "+client, - 0 <= numDocs); - assertEquals("inconsitent numDocs for replicas "+replicas+ - " via "+client, - shardCounts.get(shard).longValue(), numDocs); - } - } - - // sums of multiple shards should add up regardless of how we - // query those shards or which client we use - long randomShardCountsExpected = 0; - ArrayList randomShards = new ArrayList<>(shardCounts.size()); - for (Map.Entry shardData : shardCounts.entrySet()) { - if (random().nextBoolean() || randomShards.size() < 2) { - String shard = shardData.getKey(); - randomShardCountsExpected += shardData.getValue(); - if (random().nextBoolean()) { - // use shard id - randomShards.add(shard); - } else { - // use some set explicit replicas - ArrayList replicas = new ArrayList<>(7); - for (CloudJettyRunner replicaJetty : shardToJetty.get(shard)) { - if (0 == random().nextInt(3) || 0 == replicas.size()) { - replicas.add(replicaJetty.url); - } - } - Collections.shuffle(replicas, random()); - randomShards.add(String.join("|", replicas)); - } - } - } - String randShards = String.join(",", randomShards); - query.set("shards", randShards); - for (SolrClient client : this.clients) { - assertEquals("numDocs for "+randShards+" via "+client, - randomShardCountsExpected, - client.query(query).getResults().getNumFound()); - } - - // total num docs must match sum of every shard's numDocs - query = new SolrQuery("*:*"); - long totalShardNumDocs = 0; - for (Long c : shardCounts.values()) { - totalShardNumDocs += c; - } - for (SolrClient client : clients) { - assertEquals("sum of shard numDocs on client: " + client, - totalShardNumDocs, - client.query(query).getResults().getNumFound()); - } - assertTrue("total numDocs <= 0, WTF? Test is useless", - 0 < totalShardNumDocs); - - } - - private void testStopAndStartCoresInOneInstance() throws Exception { - JettySolrRunner jetty = jettys.get(0); - try (final HttpSolrClient httpSolrClient = (HttpSolrClient) jetty.newClient(15000, 60000)) { - ThreadPoolExecutor executor = null; - try { - executor = new ExecutorUtil.MDCAwareThreadPoolExecutor(0, Integer.MAX_VALUE, - 5, TimeUnit.SECONDS, new SynchronousQueue(), - new SolrNamedThreadFactory("testExecutor")); - int cnt = 3; - - // create the cores - createCollectionInOneInstance(httpSolrClient, jetty.getNodeName(), executor, "multiunload2", 1, cnt); - } finally { - if (executor != null) { - ExecutorUtil.shutdownAndAwaitTermination(executor); - } - } - } - - cloudJettys.get(0).jetty.stop(); - printLayout(); - - cloudJettys.get(0).jetty.start(); - cloudClient.getZkStateReader().forceUpdateCollection("multiunload2"); - try { - cloudClient.getZkStateReader().getLeaderRetry("multiunload2", "shard1", 30000); - } catch (SolrException e) { - printLayout(); - throw e; - } - - printLayout(); - - } - - /** - * Create a collection in single node - */ - protected void createCollectionInOneInstance(final SolrClient client, String nodeName, - ThreadPoolExecutor executor, final String collection, - final int numShards, int numReplicas) { - assertNotNull(nodeName); - try { - assertEquals(0, CollectionAdminRequest.createCollection(collection, "conf1", numShards, 1) - .setCreateNodeSet("") - .process(client).getStatus()); - } catch (SolrServerException | IOException e) { - throw new RuntimeException(e); - } - for (int i = 0; i < numReplicas; i++) { - final int freezeI = i; - executor.execute(() -> { - try { - assertTrue(CollectionAdminRequest.addReplicaToShard(collection, "shard"+((freezeI%numShards)+1)) - .setCoreName(collection + freezeI) - .setNode(nodeName).process(client).isSuccess()); - } catch (SolrServerException | IOException e) { - throw new RuntimeException(e); - } - }); - } - } - - protected String getBaseUrl(SolrClient client) { - String url2 = ((HttpSolrClient) client).getBaseURL() - .substring( - 0, - ((HttpSolrClient) client).getBaseURL().length() - - DEFAULT_COLLECTION.length() -1); - return url2; - } - - @Override - protected CollectionAdminResponse createCollection(Map> collectionInfos, - String collectionName, String configSetName, int numShards, int numReplicas, SolrClient client, String createNodeSetStr) throws SolrServerException, IOException { - // TODO: Use CollectionAdminRequest for this test - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("action", CollectionAction.CREATE.toString()); - - params.set(CollectionHandlingUtils.NUM_SLICES, numShards); - params.set(ZkStateReader.REPLICATION_FACTOR, numReplicas); - if (createNodeSetStr != null) params.set(CollectionHandlingUtils.CREATE_NODE_SET, createNodeSetStr); - - int clientIndex = clients.size() > 1 ? random().nextInt(2) : 0; - List list = new ArrayList<>(); - list.add(numShards); - list.add(numReplicas); - if (collectionInfos != null) { - collectionInfos.put(collectionName, list); - } - params.set("name", collectionName); - params.set("collection.configName", configSetName); - QueryRequest request = new QueryRequest(params); - request.setPath("/admin/collections"); - - CollectionAdminResponse res = new CollectionAdminResponse(); - if (client == null) { - final String baseUrl = ((HttpSolrClient) clients.get(clientIndex)).getBaseURL().substring( - 0, - ((HttpSolrClient) clients.get(clientIndex)).getBaseURL().length() - - DEFAULT_COLLECTION.length() - 1); - - try (SolrClient aClient = createNewSolrClient("", baseUrl)) { - res.setResponse(aClient.request(request)); - } - } else { - res.setResponse(client.request(request)); - } - return res; - } - - protected ZkCoreNodeProps getLeaderUrlFromZk(String collection, String slice) { - ClusterState clusterState = getCommonCloudSolrClient().getZkStateReader().getClusterState(); - ZkNodeProps leader = clusterState.getCollection(collection).getLeader(slice); - if (leader == null) { - throw new RuntimeException("Could not find leader:" + collection + " " + slice); - } - return new ZkCoreNodeProps(leader); - } - - /** - * Expects a RegexReplaceProcessorFactories in the chain which will - * "double up" the values in two (stored) string fields. - *

- * If the values are "double-doubled" or "not-doubled" then we know - * the processor was not run the appropriate number of times - *

- */ - private void testUpdateProcessorsRunOnlyOnce(final String chain) throws Exception { - - final String fieldA = "regex_dup_A_s"; - final String fieldB = "regex_dup_B_s"; - final String val = "x"; - final String expected = "x_x"; - final ModifiableSolrParams updateParams = new ModifiableSolrParams(); - updateParams.add(UpdateParams.UPDATE_CHAIN, chain); - - final int numLoops = atLeast(50); - - for (int i = 1; i < numLoops; i++) { - // add doc to random client - SolrClient updateClient = clients.get(random().nextInt(clients.size())); - SolrInputDocument doc = new SolrInputDocument(); - addFields(doc, id, i, fieldA, val, fieldB, val); - UpdateResponse ures = add(updateClient, updateParams, doc); - assertEquals(chain + ": update failed", 0, ures.getStatus()); - ures = updateClient.commit(); - assertEquals(chain + ": commit failed", 0, ures.getStatus()); - } - - // query for each doc, and check both fields to ensure the value is correct - for (int i = 1; i < numLoops; i++) { - final String query = id + ":" + i; - QueryResponse qres = queryServer(new SolrQuery(query)); - assertEquals(chain + ": query failed: " + query, - 0, qres.getStatus()); - assertEquals(chain + ": didn't find correct # docs with query: " + query, - 1, qres.getResults().getNumFound()); - SolrDocument doc = qres.getResults().get(0); - - for (String field : new String[] {fieldA, fieldB}) { - assertEquals(chain + ": doc#" + i+ " has wrong value for " + field, - expected, doc.getFirstValue(field)); - } - } - - } - - // cloud level test mainly needed just to make sure that versions and errors are propagated correctly - private void doOptimisticLockingAndUpdating() throws Exception { - log.info("### STARTING doOptimisticLockingAndUpdating"); - printLayout(); - - final SolrInputDocument sd = sdoc("id", 1000, "_version_", -1); - indexDoc(sd); - - ignoreException("version conflict"); - for (SolrClient client : clients) { - SolrException e = expectThrows(SolrException.class, () -> client.add(sd)); - assertEquals(409, e.code()); - } - unIgnoreException("version conflict"); - - // TODO: test deletes. SolrJ needs a good way to pass version for delete... - - final SolrInputDocument sd2 = sdoc("id", 1000, "foo_i",5); - clients.get(0).add(sd2); - - List expected = new ArrayList<>(); - int val = 0; - for (SolrClient client : clients) { - val += 10; - client.add(sdoc("id", 1000, "val_i", map("add",val), "foo_i",val)); - expected.add(val); - } - - QueryRequest qr = new QueryRequest(params("qt", "/get", "id","1000")); - for (SolrClient client : clients) { - val += 10; - NamedList rsp = client.request(qr); - String match = JSONTestUtil.matchObj("/val_i", rsp.get("doc"), expected); - if (match != null) throw new RuntimeException(match); - } - } - - private void testNumberOfCommitsWithCommitAfterAdd() - throws SolrServerException, IOException { - log.info("### STARTING testNumberOfCommitsWithCommitAfterAdd"); - long startCommits = getNumCommits((HttpSolrClient) clients.get(0)); - - - NamedList result = clients.get(0).request( - new StreamingUpdateRequest("/update", - getFile("books_numeric_ids.csv"), "application/csv") - .setCommitWithin(900000) - .setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true)); - - long endCommits = getNumCommits((HttpSolrClient) clients.get(0)); - - assertEquals(startCommits + 1L, endCommits); - } - - private Long getNumCommits(HttpSolrClient sourceClient) throws - SolrServerException, IOException { - // construct the /admin/metrics URL - URL url = new URL(sourceClient.getBaseURL()); - String path = url.getPath().substring(1); - String[] elements = path.split("/"); - String collection = elements[elements.length - 1]; - String urlString = url.toString(); - urlString = urlString.substring(0, urlString.length() - collection.length() - 1); - try (HttpSolrClient client = getHttpSolrClient(urlString, 15000, 60000)) { - ModifiableSolrParams params = new ModifiableSolrParams(); - //params.set("qt", "/admin/metrics?prefix=UPDATE.updateHandler®istry=solr.core." + collection); - params.set("qt", "/admin/metrics"); - params.set("prefix", "UPDATE.updateHandler"); - params.set("registry", "solr.core." + collection); - // use generic request to avoid extra processing of queries - QueryRequest req = new QueryRequest(params); - NamedList resp = client.request(req); - NamedList metrics = (NamedList) resp.get("metrics"); - NamedList uhandlerCat = (NamedList) metrics.getVal(0); - @SuppressWarnings({"unchecked"}) - Map commits = (Map) uhandlerCat.get("UPDATE.updateHandler.commits"); - return (Long) commits.get("count"); - } - } - - private void testANewCollectionInOneInstanceWithManualShardAssignement() throws Exception { - log.info("### STARTING testANewCollectionInOneInstanceWithManualShardAssignement"); - assertEquals(0, CollectionAdminRequest.createCollection(oneInstanceCollection2, "conf1", 2, 2) - .setCreateNodeSet("") - .process(cloudClient).getStatus()); - - List collectionClients = new ArrayList<>(); - for (int i = 0; i < 4; i++) { - CollectionAdminResponse resp = CollectionAdminRequest - .addReplicaToShard(oneInstanceCollection2, "shard" + ((i%2)+1)) - .setNode(jettys.get(0).getNodeName()) - .process(cloudClient); - for (String coreName : resp.getCollectionCoresStatus().keySet()) { - collectionClients.add(createNewSolrClient(coreName, jettys.get(0).getBaseUrl().toString())); - } - - - } - - SolrClient client1 = collectionClients.get(0); - SolrClient client2 = collectionClients.get(1); - SolrClient client3 = collectionClients.get(2); - SolrClient client4 = collectionClients.get(3); - - - // no one should be recovering - waitForRecoveriesToFinish(oneInstanceCollection2, getCommonCloudSolrClient().getZkStateReader(), false, true); - - assertAllActive(oneInstanceCollection2, getCommonCloudSolrClient().getZkStateReader()); - - //printLayout(); - - // TODO: enable when we don't falsely get slice1... - // solrj.getZkStateReader().getLeaderUrl(oneInstanceCollection2, "slice1", 30000); - // solrj.getZkStateReader().getLeaderUrl(oneInstanceCollection2, "slice2", 30000); - client2.add(getDoc(id, "1")); - client3.add(getDoc(id, "2")); - client4.add(getDoc(id, "3")); - - client1.commit(); - SolrQuery query = new SolrQuery("*:*"); - query.set("distrib", false); - long oneDocs = client1.query(query).getResults().getNumFound(); - long twoDocs = client2.query(query).getResults().getNumFound(); - long threeDocs = client3.query(query).getResults().getNumFound(); - long fourDocs = client4.query(query).getResults().getNumFound(); - - query.set("collection", oneInstanceCollection2); - query.set("distrib", true); - long allDocs = getCommonCloudSolrClient().query(query).getResults().getNumFound(); - -// System.out.println("1:" + oneDocs); -// System.out.println("2:" + twoDocs); -// System.out.println("3:" + threeDocs); -// System.out.println("4:" + fourDocs); -// System.out.println("All Docs:" + allDocs); - -// assertEquals(oneDocs, threeDocs); -// assertEquals(twoDocs, fourDocs); -// assertNotSame(oneDocs, twoDocs); - assertEquals(3, allDocs); - - // we added a role of none on these creates - check for it - ZkStateReader zkStateReader = getCommonCloudSolrClient().getZkStateReader(); - zkStateReader.forceUpdateCollection(oneInstanceCollection2); - Map slices = zkStateReader.getClusterState().getCollection(oneInstanceCollection2).getSlicesMap(); - assertNotNull(slices); - - ZkCoreNodeProps props = new ZkCoreNodeProps(getCommonCloudSolrClient().getZkStateReader().getClusterState() - .getCollection(oneInstanceCollection2).getLeader("shard1")); - - // now test that unloading a core gets us a new leader - try (HttpSolrClient unloadClient = getHttpSolrClient(jettys.get(0).getBaseUrl().toString(), 15000, 60000)) { - Unload unloadCmd = new Unload(true); - unloadCmd.setCoreName(props.getCoreName()); - - String leader = props.getCoreUrl(); - - testExecutor.execute(new Runnable() { - - @Override - public void run() { - try { - unloadClient.request(unloadCmd); - } catch (SolrServerException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - }); - - try { - getCommonCloudSolrClient().getZkStateReader().waitForState(oneInstanceCollection2, 20000, TimeUnit.MILLISECONDS, (n, c) -> { - - - try { - if (leader.equals(zkStateReader.getLeaderUrl(oneInstanceCollection2, "shard1", 10000))) { - return false; - } - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - return true; - }); - } catch (TimeoutException | InterruptedException e) { - fail("Leader never changed"); - } - } - - IOUtils.close(collectionClients); - - } - - private void testSearchByCollectionName() throws SolrServerException, IOException { - log.info("### STARTING testSearchByCollectionName"); - SolrClient client = clients.get(0); - final String baseUrl = ((HttpSolrClient) client).getBaseURL().substring( - 0, - ((HttpSolrClient) client).getBaseURL().length() - - DEFAULT_COLLECTION.length() - 1); - - // the cores each have different names, but if we add the collection name to the url - // we should get mapped to the right core - try (SolrClient client1 = createNewSolrClient(oneInstanceCollection, baseUrl)) { - SolrQuery query = new SolrQuery("*:*"); - long oneDocs = client1.query(query).getResults().getNumFound(); - assertEquals(3, oneDocs); - } - } - - private void testUpdateByCollectionName() throws SolrServerException, IOException { - log.info("### STARTING testUpdateByCollectionName"); - SolrClient client = clients.get(0); - final String baseUrl = ((HttpSolrClient) client).getBaseURL().substring( - 0, - ((HttpSolrClient) client).getBaseURL().length() - - DEFAULT_COLLECTION.length() - 1); - - // the cores each have different names, but if we add the collection name to the url - // we should get mapped to the right core - // test hitting an update url - try (SolrClient client1 = createNewSolrClient(oneInstanceCollection, baseUrl)) { - client1.commit(); - } - } - - private void testANewCollectionInOneInstance() throws Exception { - log.info("### STARTING testANewCollectionInOneInstance"); - CollectionAdminResponse response = CollectionAdminRequest.createCollection(oneInstanceCollection, "conf1", 2, 2) - .setCreateNodeSet(jettys.get(0).getNodeName()) - .process(cloudClient); - assertEquals(0, response.getStatus()); - List collectionClients = new ArrayList<>(); - for (String coreName : response.getCollectionCoresStatus().keySet()) { - collectionClients.add(createNewSolrClient(coreName, jettys.get(0).getBaseUrl().toString())); - } - - SolrClient client1 = collectionClients.get(0); - SolrClient client2 = collectionClients.get(1); - SolrClient client3 = collectionClients.get(2); - SolrClient client4 = collectionClients.get(3); - - waitForRecoveriesToFinish(oneInstanceCollection, getCommonCloudSolrClient().getZkStateReader(), false); - assertAllActive(oneInstanceCollection, getCommonCloudSolrClient().getZkStateReader()); - - client2.add(getDoc(id, "1")); - client3.add(getDoc(id, "2")); - client4.add(getDoc(id, "3")); - - client1.commit(); - SolrQuery query = new SolrQuery("*:*"); - query.set("distrib", false); - long oneDocs = client1.query(query).getResults().getNumFound(); - long twoDocs = client2.query(query).getResults().getNumFound(); - long threeDocs = client3.query(query).getResults().getNumFound(); - long fourDocs = client4.query(query).getResults().getNumFound(); - - query.set("collection", oneInstanceCollection); - query.set("distrib", true); - long allDocs = getCommonCloudSolrClient().query(query).getResults().getNumFound(); - -// System.out.println("1:" + oneDocs); -// System.out.println("2:" + twoDocs); -// System.out.println("3:" + threeDocs); -// System.out.println("4:" + fourDocs); -// System.out.println("All Docs:" + allDocs); - - assertEquals(3, allDocs); - IOUtils.close(collectionClients); - - } - - private void createCollection(String collection, - List collectionClients, String baseUrl, int num) { - createSolrCore(collection, collectionClients, baseUrl, num, null); - } - - private void createSolrCore(final String collection, - List collectionClients, final String baseUrl, final int num, - final String shardId) { - Callable call = () -> { - try (HttpSolrClient client = getHttpSolrClient(baseUrl)) { - // client.setConnectionTimeout(15000); - Create createCmd = new Create(); - createCmd.setRoles("none"); - createCmd.setCoreName(collection + num); - createCmd.setCollection(collection); - - if (random().nextBoolean()) { - // sometimes we use an explicit core node name - createCmd.setCoreNodeName("anode" + nodeCounter.incrementAndGet()); - } - - if (shardId == null) { - createCmd.setNumShards(2); - } - createCmd.setDataDir(getDataDir(createTempDir(collection).toFile().getAbsolutePath())); - if (shardId != null) { - createCmd.setShardId(shardId); - } - client.request(createCmd); - } catch (Exception e) { - e.printStackTrace(); - //fail - } - return null; - }; - - pending.add(completionService.submit(call)); - - - collectionClients.add(createNewSolrClient(collection + num, baseUrl)); - } - - private void testMultipleCollections() throws Exception { - log.info("### STARTING testMultipleCollections"); - // create another 2 collections and search across them - createNewCollection("collection2"); - createNewCollection("collection3"); - - while (pending != null && pending.size() > 0) { - - Future future = completionService.take(); - if (future == null) return; - pending.remove(future); - } - - indexDoc("collection2", getDoc(id, "10000000")); - indexDoc("collection2", getDoc(id, "10000001")); - indexDoc("collection2", getDoc(id, "10000003")); - getCommonCloudSolrClient().setDefaultCollection("collection2"); - getCommonCloudSolrClient().add(getDoc(id, "10000004")); - getCommonCloudSolrClient().setDefaultCollection(null); - - indexDoc("collection3", getDoc(id, "20000000")); - indexDoc("collection3", getDoc(id, "20000001")); - getCommonCloudSolrClient().setDefaultCollection("collection3"); - getCommonCloudSolrClient().add(getDoc(id, "10000005")); - getCommonCloudSolrClient().setDefaultCollection(null); - - otherCollectionClients.get("collection2").get(0).commit(); - otherCollectionClients.get("collection3").get(0).commit(); - - getCommonCloudSolrClient().setDefaultCollection("collection1"); - long collection1Docs = getCommonCloudSolrClient().query(new SolrQuery("*:*")).getResults() - .getNumFound(); - - long collection2Docs = otherCollectionClients.get("collection2").get(0) - .query(new SolrQuery("*:*")).getResults().getNumFound(); - - long collection3Docs = otherCollectionClients.get("collection3").get(0) - .query(new SolrQuery("*:*")).getResults().getNumFound(); - - - SolrQuery query = new SolrQuery("*:*"); - query.set("collection", "collection2,collection3"); - long found = clients.get(0).query(query).getResults().getNumFound(); - assertEquals(collection2Docs + collection3Docs, found); - - query = new SolrQuery("*:*"); - query.set("collection", "collection1,collection2,collection3"); - found = clients.get(0).query(query).getResults().getNumFound(); - assertEquals(collection1Docs + collection2Docs + collection3Docs, found); - - // try to search multiple with cloud client - found = getCommonCloudSolrClient().query(query).getResults().getNumFound(); - assertEquals(collection1Docs + collection2Docs + collection3Docs, found); - - query.set("collection", "collection2,collection3"); - found = getCommonCloudSolrClient().query(query).getResults().getNumFound(); - assertEquals(collection2Docs + collection3Docs, found); - - query.set("collection", "collection3"); - found = getCommonCloudSolrClient().query(query).getResults().getNumFound(); - assertEquals(collection3Docs, found); - - query.remove("collection"); - found = getCommonCloudSolrClient().query(query).getResults().getNumFound(); - assertEquals(collection1Docs, found); - - assertEquals(collection3Docs, collection2Docs - 1); - } - - protected void indexDoc(String collection, SolrInputDocument doc) throws IOException, SolrServerException { - List clients = otherCollectionClients.get(collection); - int which = (doc.getField(id).toString().hashCode() & 0x7fffffff) % clients.size(); - SolrClient client = clients.get(which); - client.add(doc); - } - - @SuppressWarnings({"unchecked"}) - private void createNewCollection(final String collection) throws InterruptedException { - try { - assertEquals(0, CollectionAdminRequest - .createCollection(collection, "conf1", 2, 1) - .setCreateNodeSet("") - .process(cloudClient).getStatus()); - } catch (Exception e) { - e.printStackTrace(); - //fails - } - final List collectionClients = new ArrayList<>(); - otherCollectionClients.put(collection, collectionClients); - int unique = 0 ; - for (final JettySolrRunner runner : jettys) { - unique++; - final int frozeUnique = unique; - Callable call = () -> { - - try { - assertTrue(CollectionAdminRequest - .addReplicaToShard(collection, "shard"+ ((frozeUnique%2)+1)) - .setNode(runner.getNodeName()) - .process(cloudClient).isSuccess()); - } catch (Exception e) { - e.printStackTrace(); - //fails - } - return null; - }; - - collectionClients.add(createNewSolrClient(collection, runner.getBaseUrl().toString())); - pending.add(completionService.submit(call)); - while (pending != null && pending.size() > 0) { - - Future future = completionService.take(); - if (future == null) return; - pending.remove(future); - } - } - } - - protected SolrClient createNewSolrClient(String collection, String baseUrl) { - try { - // setup the server... - HttpSolrClient client = getHttpSolrClient(baseUrl + "/" + collection); - - return client; - } - catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - protected SolrClient createNewSolrClient(String collection, String baseUrl, int connectionTimeoutMillis, int socketTimeoutMillis) { - try { - // setup the server... - HttpSolrClient client = getHttpSolrClient(baseUrl + "/" + collection, connectionTimeoutMillis, socketTimeoutMillis); - - return client; - } - catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - @Override - protected QueryResponse queryServer(ModifiableSolrParams params) throws SolrServerException, IOException { - - if (r.nextBoolean()) - return super.queryServer(params); - - if (r.nextBoolean()) - params.set("collection",DEFAULT_COLLECTION); - - QueryResponse rsp = getCommonCloudSolrClient().query(params); - return rsp; - } - - @Override - public void distribTearDown() throws Exception { - super.distribTearDown(); - if (otherCollectionClients != null) { - for (List clientList : otherCollectionClients.values()) { - IOUtils.close(clientList); - } - } - otherCollectionClients = null; - List tasks = executor.shutdownNow(); - assertTrue(tasks.isEmpty()); + super.test(); } } diff --git a/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java index f8391680b70..9b44db89555 100644 --- a/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java @@ -56,7 +56,7 @@ */ @Slow @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776") -public class UnloadDistributedZkTest extends BasicDistributedZkTest { +public class UnloadDistributedZkTest extends AbstractBasicDistributedZkTestBase { public UnloadDistributedZkTest() { super(); } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java new file mode 100644 index 00000000000..85f362fcd01 --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java @@ -0,0 +1,1350 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud; + +import java.io.IOException; +import java.lang.invoke.MethodHandles; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.CompletionService; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorCompletionService; +import java.util.concurrent.Future; +import java.util.concurrent.SynchronousQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; + +import org.apache.lucene.util.IOUtils; +import org.apache.solr.JSONTestUtil; +import org.apache.solr.client.solrj.SolrClient; +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.embedded.JettySolrRunner; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.request.AbstractUpdateRequest; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.request.CoreAdminRequest.Create; +import org.apache.solr.client.solrj.request.CoreAdminRequest.Unload; +import org.apache.solr.client.solrj.request.QueryRequest; +import org.apache.solr.client.solrj.request.StreamingUpdateRequest; +import org.apache.solr.client.solrj.request.UpdateRequest; +import org.apache.solr.client.solrj.response.CollectionAdminResponse; +import org.apache.solr.client.solrj.response.FacetField; +import org.apache.solr.client.solrj.response.Group; +import org.apache.solr.client.solrj.response.GroupCommand; +import org.apache.solr.client.solrj.response.GroupResponse; +import org.apache.solr.client.solrj.response.QueryResponse; +import org.apache.solr.client.solrj.response.UpdateResponse; +import org.apache.solr.cloud.api.collections.CollectionHandlingUtils; +import org.apache.solr.common.SolrDocument; +import org.apache.solr.common.SolrDocumentList; +import org.apache.solr.common.SolrException; +import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.common.cloud.ClusterState; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.apache.solr.common.cloud.ZkCoreNodeProps; +import org.apache.solr.common.cloud.ZkNodeProps; +import org.apache.solr.common.cloud.ZkStateReader; +import org.apache.solr.common.params.CollectionParams.CollectionAction; +import org.apache.solr.common.params.CommonParams; +import org.apache.solr.common.params.ModifiableSolrParams; +import org.apache.solr.common.params.UpdateParams; +import org.apache.solr.common.util.ExecutorUtil; +import org.apache.solr.common.util.NamedList; +import org.apache.solr.common.util.SolrNamedThreadFactory; +import org.apache.solr.util.TestInjection; +import org.apache.solr.util.TestInjection.Hook; +import org.junit.BeforeClass; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * This test simply does a bunch of basic things in solrcloud mode and asserts things + * work as expected. + */ +public abstract class AbstractBasicDistributedZkTestBase extends AbstractFullDistribZkTestBase { + + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + private static final String DEFAULT_COLLECTION = "collection1"; + + private final boolean onlyLeaderIndexes = random().nextBoolean(); + + String t1="a_t"; + String i1="a_i1"; + String tlong = "other_tl1"; + String tsort="t_sortable"; + + String oddField="oddField_s"; + String missingField="ignore_exception__missing_but_valid_field_t"; + + private Map> otherCollectionClients = new HashMap<>(); + + private String oneInstanceCollection = "oneInstanceCollection"; + private String oneInstanceCollection2 = "oneInstanceCollection2"; + + private AtomicInteger nodeCounter = new AtomicInteger(); + + CompletionService completionService; + Set> pending; + + private static Hook newSearcherHook = new Hook() { + volatile CountDownLatch latch; + AtomicReference collection = new AtomicReference<>(); + + @Override + public void newSearcher(String collectionName) { + String c = collection.get(); + if (c != null && c.equals(collectionName)) { + log.info("Hook detected newSearcher"); + try { + latch.countDown(); + } catch (NullPointerException e) { + + } + } + } + + public void waitForSearcher(String collection, int cnt, int timeoutms, boolean failOnTimeout) throws InterruptedException { + latch = new CountDownLatch(cnt); + this.collection.set(collection); + boolean timeout = !latch.await(timeoutms, TimeUnit.MILLISECONDS); + if (timeout && failOnTimeout) { + fail("timed out waiting for new searcher event " + latch.getCount()); + } + } + + }; + + public AbstractBasicDistributedZkTestBase() { + // we need DVs on point fields to compute stats & facets + if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true"); + + sliceCount = 2; + completionService = new ExecutorCompletionService<>(executor); + pending = new HashSet<>(); + + } + + @BeforeClass + public static void beforeBDZKTClass() { + TestInjection.newSearcherHook(newSearcherHook); + } + + @Override + protected boolean useTlogReplicas() { + return false; // TODO: tlog replicas makes commits take way to long due to what is likely a bug and it's TestInjection use + } + + @Override + protected void setDistributedParams(ModifiableSolrParams params) { + + if (r.nextBoolean()) { + // don't set shards, let that be figured out from the cloud state + } else { + // use shard ids rather than physical locations + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < getShardCount(); i++) { + if (i > 0) + sb.append(','); + sb.append("shard" + (i + 3)); + } + params.set("shards", sb.toString()); + } + } + + @Test + @ShardsFixed(num = 4) + // commented out on: 17-Feb-2019 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018 + protected void test() throws Exception { + // setLoggingLevel(null); + + ZkStateReader zkStateReader = cloudClient.getZkStateReader(); + // make sure we have leaders for each shard + for (int j = 1; j < sliceCount; j++) { + zkStateReader.getLeaderRetry(DEFAULT_COLLECTION, "shard" + j, 10000); + } // make sure we again have leaders for each shard + + waitForRecoveriesToFinish(false); + + handle.clear(); + handle.put("timestamp", SKIPVAL); + + del("*:*"); + queryAndCompareShards(params("q", "*:*", "distrib", "false", "sanity_check", "is_empty")); + + // ask every individual replica of every shard to update+commit the same doc id + // with an incrementing counter on each update+commit + int foo_i_counter = 0; + for (SolrClient client : clients) { + foo_i_counter++; + indexDoc(client, params("commit", "true"), // SOLR-4923 + sdoc(id,1, i1,100, tlong,100, "foo_i", foo_i_counter)); + // after every update+commit, check all the shards consistency + queryAndCompareShards(params("q", "id:1", "distrib", "false", + "sanity_check", "non_distrib_id_1_lookup")); + queryAndCompareShards(params("q", "id:1", + "sanity_check", "distrib_id_1_lookup")); + } + + indexr(id,1, i1, 100, tlong, 100,t1,"now is the time for all good men" + ,"foo_f", 1.414f, "foo_b", "true", "foo_d", 1.414d, tsort, "now is the time for all good men"); + indexr(id, 2, i1, 50, tlong, 50, t1, "to come to the aid of their country." + , tsort, "to come to the aid of their country."); + indexr(id, 3, i1, 2, tlong, 2, t1, "how now brown cow", tsort, "how now brown cow"); + indexr(id, 4, i1, -100, tlong, 101, t1, "the quick fox jumped over the lazy dog" + , tsort, "the quick fox jumped over the lazy dog"); + indexr(id, 5, i1, 500, tlong, 500, t1, "the quick fox jumped way over the lazy dog" + , tsort, "the quick fox jumped over the lazy dog"); + indexr(id, 6, i1, -600, tlong, 600, t1, "humpty dumpy sat on a wall", tsort, "the quick fox jumped over the lazy dog"); + indexr(id, 7, i1, 123, tlong, 123, t1, "humpty dumpy had a great fall", tsort, "the quick fox jumped over the lazy dog"); + indexr(id,8, i1, 876, tlong, 876,t1,"all the kings horses and all the kings men",tsort,"all the kings horses and all the kings men"); + indexr(id, 9, i1, 7, tlong, 7, t1, "couldn't put humpty together again", tsort, "the quick fox jumped over the lazy dog"); + indexr(id,10, i1, 4321, tlong, 4321,t1,"this too shall pass",tsort,"this too shall pass"); + indexr(id,11, i1, -987, tlong, 987,t1,"An eye for eye only ends up making the whole world blind." + ,tsort,"An eye for eye only ends up making the whole world blind."); + indexr(id,12, i1, 379, tlong, 379,t1,"Great works are performed, not by strength, but by perseverance.", + tsort,"Great works are performed, not by strength, but by perseverance."); + indexr(id,13, i1, 232, tlong, 232,t1,"no eggs on wall, lesson learned", oddField, "odd man out", + tsort,"no eggs on wall, lesson learned"); + + indexr(id, 14, "SubjectTerms_mfacet", new String[] {"mathematical models", "mathematical analysis"}); + indexr(id, 15, "SubjectTerms_mfacet", new String[] {"test 1", "test 2", "test3"}); + indexr(id, 16, "SubjectTerms_mfacet", new String[] {"test 1", "test 2", "test3"}); + String[] vals = new String[100]; + for (int i=0; i<100; i++) { + vals[i] = "test " + i; + } + indexr(id, 17, "SubjectTerms_mfacet", vals); + + for (int i=100; i<150; i++) { + indexr(id, i); + } + + commit(); + + testTokenizedGrouping(); + testSortableTextFaceting(); + testSortableTextSorting(); + testSortableTextGrouping(); + + queryAndCompareShards(params("q", "*:*", + "sort", "id desc", + "distrib", "false", + "sanity_check", "is_empty")); + + // random value sort + for (String f : fieldNames) { + query(false, new String[] {"q","*:*", "sort",f+" desc"}); + query(false, new String[] {"q","*:*", "sort",f+" asc"}); + } + + // these queries should be exactly ordered and scores should exactly match + query(false, new String[] {"q","*:*", "sort",i1+" desc"}); + query(false, new String[] {"q","*:*", "sort",i1+" asc"}); + query(false, new String[] {"q","*:*", "sort",i1+" desc", "fl","*,score"}); + query(false, new String[] {"q","*:*", "sort","n_tl1 asc", "fl","*,score"}); + query(false, new String[] {"q","*:*", "sort","n_tl1 desc"}); + handle.put("maxScore", SKIPVAL); + query(false, new String[] {"q","{!func}"+i1});// does not expect maxScore. So if it comes ,ignore it. JavaBinCodec.writeSolrDocumentList() + //is agnostic of request params. + handle.remove("maxScore"); + query(false, new String[] {"q","{!func}"+i1, "fl","*,score"}); // even scores should match exactly here + + handle.put("highlighting", UNORDERED); + handle.put("response", UNORDERED); + + handle.put("maxScore", SKIPVAL); + query(false, new String[] {"q","quick"}); + query(false, new String[] {"q","all","fl","id","start","0"}); + query(false, new String[] {"q","all","fl","foofoofoo","start","0"}); // no fields in returned docs + query(false, new String[] {"q","all","fl","id","start","100"}); + + handle.put("score", SKIPVAL); + query(false, new String[] {"q","quick","fl","*,score"}); + query(false, new String[] {"q","all","fl","*,score","start","1"}); + query(false, new String[] {"q","all","fl","*,score","start","100"}); + + query(false, new String[] {"q","now their fox sat had put","fl","*,score", + "hl","true","hl.fl",t1}); + + query(false, new String[] {"q","now their fox sat had put","fl","foofoofoo", + "hl","true","hl.fl",t1}); + + query(false, new String[] {"q","matchesnothing","fl","*,score"}); + + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1}); + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","count"}); + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","count", "facet.mincount",2}); + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","index"}); + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","index", "facet.mincount",2}); + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1,"facet.limit",1}); + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.query","quick", "facet.query","all", "facet.query","*:*"}); + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.offset",1}); + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.mincount",2}); + + // test faceting multiple things at once + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.query","quick", "facet.query","all", "facet.query","*:*" + ,"facet.field",t1}); + + // test filter tagging, facet exclusion, and naming (multi-select facet support) + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.query","{!key=myquick}quick", "facet.query","{!key=myall ex=a}all", "facet.query","*:*" + ,"facet.field","{!key=mykey ex=a}"+t1 + ,"facet.field","{!key=other ex=b}"+t1 + ,"facet.field","{!key=again ex=a,b}"+t1 + ,"facet.field",t1 + ,"fq","{!tag=a}id_i1:[1 TO 7]", "fq","{!tag=b}id_i1:[3 TO 9]"} + ); + query(false, new Object[] {"q", "*:*", "facet", "true", "facet.field", "{!ex=t1}SubjectTerms_mfacet", "fq", "{!tag=t1}SubjectTerms_mfacet:(test 1)", "facet.limit", "10", "facet.mincount", "1"}); + + // test field that is valid in schema but missing in all shards + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",missingField, "facet.mincount",2}); + // test field that is valid in schema and missing in some shards + query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",oddField, "facet.mincount",2}); + + query(false, new Object[] {"q","*:*", "sort",i1+" desc", "stats", "true", "stats.field", i1}); + + /*** TODO: the failure may come back in "exception" + try { + // test error produced for field that is invalid for schema + query("q","*:*", "rows",100, "facet","true", "facet.field",invalidField, "facet.mincount",2); + TestCase.fail("SolrServerException expected for invalid field that is not in schema"); + } catch (SolrServerException ex) { + // expected + } + ***/ + + // Try to get better coverage for refinement queries by turning off over requesting. + // This makes it much more likely that we may not get the top facet values and hence + // we turn of that checking. + handle.put("facet_fields", SKIPVAL); + query(false, new Object[] {"q","*:*", "rows",0, "facet","true", "facet.field",t1,"facet.limit",5, "facet.shard.limit",5}); + // check a complex key name + query(false, new Object[] {"q","*:*", "rows",0, "facet","true", "facet.field","{!key='a b/c \\' \\} foo'}"+t1,"facet.limit",5, "facet.shard.limit",5}); + handle.remove("facet_fields"); + + + // index the same document to two servers and make sure things + // don't blow up. + if (clients.size()>=2) { + index(id,100, i1, 107 ,t1,"oh no, a duplicate!"); + for (int i=0; i ffs = resp.getFacetFields(); + for (FacetField ff : ffs) { + if (ff.getName().equals(tsort) == false) continue; + for (FacetField.Count count : ff.getValues()) { + long num = count.getCount(); + switch (count.getName()) { + case "all the kings horses and all the kings men": + case "An eye for eye only ends up making the whole world blind.": + case "Great works are performed, not by strength, but by perseverance.": + case "how now brown cow": + case "no eggs on wall, lesson learned": + case "now is the time for all good men": + case "this too shall pass": + case "to come to the aid of their country.": + assertEquals("Should have exactly one facet count for field " + ff.getName(), 1, num); + break; + case "the quick fox jumped over the lazy dog": + assertEquals("Should have 5 docs for the lazy dog", 5, num); + break; + default: + fail("No case for facet '" + ff.getName() + "'"); + + } + } + } + } + + private void testSortableTextSorting() throws Exception { + SolrQuery query = new SolrQuery("*:*"); + query.addSort(tsort, SolrQuery.ORDER.desc); + query.addField("*"); + query.addField("eoe_sortable"); + query.addField(tsort); + QueryResponse resp = queryServer(query); + + SolrDocumentList docs = resp.getResults(); + + String title = docs.get(0).getFieldValue(tsort).toString(); + for (SolrDocument doc : docs) { + assertTrue("Docs should be back in sorted order, descending", title.compareTo(doc.getFieldValue(tsort).toString()) >= 0); + title = doc.getFieldValue(tsort).toString(); + } + } + + private void testSortableTextGrouping() throws Exception { + SolrQuery query = new SolrQuery("*:*"); + query.add("group", "true"); + query.add("group.field", tsort); + QueryResponse resp = queryServer(query); + GroupResponse groupResp = resp.getGroupResponse(); + List grpCmds = groupResp.getValues(); + for (GroupCommand grpCmd : grpCmds) { + if (grpCmd.getName().equals(tsort) == false) continue; + for (Group grp : grpCmd.getValues()) { + long count = grp.getResult().getNumFound(); + if (grp.getGroupValue() == null) continue; // Don't count the groups without an entry as the numnber is variable + switch (grp.getGroupValue()) { + case "all the kings horses and all the kings men": + case "An eye for eye only ends up making the whole world blind.": + case "Great works are performed, not by strength, but by perseverance.": + case "how now brown cow": + case "no eggs on wall, lesson learned": + case "now is the time for all good men": + case "this too shall pass": + case "to come to the aid of their country.": + assertEquals("Should have exactly one facet count for field " + grpCmd.getName(), 1, count); + break; + case "the quick fox jumped over the lazy dog": + assertEquals("Should have 5 docs for the lazy dog", 5, count); + break; + default: + fail("No case for facet '" + grpCmd.getName() + "'"); + + } + } + } + } + + private void testTokenizedGrouping() throws Exception { + SolrException ex = expectThrows(SolrException.class, () -> { + query(false, new String[]{"q", "*:*", "group", "true", "group.field", t1}); + }); + assertTrue("Expected error from server that SortableTextFields are required", ex.getMessage().contains("Sorting on a tokenized field that is not a SortableTextField is not supported in cloud mode")); + } + + private void assertSliceCounts(String msg, long expected, DocCollection dColl) throws Exception { + long found = checkSlicesSameCounts(dColl); + + if (found != expected) { + // we get one do over in a bad race + Thread.sleep(1000); + found = checkSlicesSameCounts(dColl); + } + + assertEquals(msg, expected, checkSlicesSameCounts(dColl)); + } + + // Ensure that total docs found is the expected number. + private void waitForDocCount(long expectedNumFound, long waitMillis, String failureMessage) + throws Exception { + AtomicLong total = new AtomicLong(-1); + try { + getCommonCloudSolrClient().getZkStateReader().waitForState(DEFAULT_COLLECTION, waitMillis, TimeUnit.MILLISECONDS, (n, c) -> { + long docTotal; + try { + docTotal = checkSlicesSameCounts(c); + } catch (SolrServerException | IOException e) { + throw new RuntimeException(e); + } + total.set(docTotal); + if (docTotal == expectedNumFound) { + return true; + } + return false; + }); + } catch (TimeoutException | InterruptedException e) { + + } + // We could fail here if we broke out of the above because we exceeded the time allowed. + assertEquals(failureMessage, expectedNumFound, total.get()); + + // This should be redundant, but it caught a test error after all. + for (SolrClient client : clients) { + assertEquals(failureMessage, expectedNumFound, client.query(new SolrQuery("*:*")).getResults().getNumFound()); + } + } + + // Insure that counts are the same for all replicas in each shard + // Return the total doc count for the query. + private long checkSlicesSameCounts(DocCollection dColl) throws SolrServerException, IOException { + long docTotal = 0; // total number of documents found counting only one replica per slice. + for (Slice slice : dColl.getActiveSlices()) { + long sliceDocCount = -1; + for (Replica rep : slice.getReplicas()) { + try (HttpSolrClient one = getHttpSolrClient(rep.getCoreUrl())) { + SolrQuery query = new SolrQuery("*:*"); + query.setDistrib(false); + QueryResponse resp = one.query(query); + long hits = resp.getResults().getNumFound(); + if (sliceDocCount == -1) { + sliceDocCount = hits; + docTotal += hits; + } else { + if (hits != sliceDocCount) { + return -1; + } + } + } + } + } + return docTotal; + } + + private void testShardParamVariations() throws Exception { + SolrQuery query = new SolrQuery("*:*"); + Map shardCounts = new HashMap<>(); + + for (String shard : shardToJetty.keySet()) { + // every client should give the same numDocs for this shard + // shffle the clients in a diff order for each shard + List solrclients = new ArrayList<>(this.clients); + Collections.shuffle(solrclients, random()); + for (SolrClient client : solrclients) { + query.set("shards", shard); + long numDocs = client.query(query).getResults().getNumFound(); + assertTrue("numDocs < 0 for shard "+shard+" via "+client, + 0 <= numDocs); + if (!shardCounts.containsKey(shard)) { + shardCounts.put(shard, numDocs); + } + assertEquals("inconsitent numDocs for shard "+shard+" via "+client, + shardCounts.get(shard).longValue(), numDocs); + + List replicaJetties + = new ArrayList<>(shardToJetty.get(shard)); + Collections.shuffle(replicaJetties, random()); + + // each replica should also give the same numDocs + ArrayList replicaAlts = new ArrayList<>(replicaJetties.size() * 2); + for (CloudJettyRunner replicaJetty : shardToJetty.get(shard)) { + String replica = replicaJetty.url; + query.set("shards", replica); + + // replicas already shuffled, use this in the alternative check below + if (0 == random().nextInt(3) || replicaAlts.size() < 2) { + replicaAlts.add(replica); + } + + numDocs = client.query(query).getResults().getNumFound(); + assertTrue("numDocs < 0 for replica "+replica+" via "+client, + 0 <= numDocs); + assertEquals("inconsitent numDocs for shard "+shard+ + " in replica "+replica+" via "+client, + shardCounts.get(shard).longValue(), numDocs); + } + + // any combination of replica alternatives should give same numDocs + String replicas = String.join("|", replicaAlts); + query.set("shards", replicas); + numDocs = client.query(query).getResults().getNumFound(); + assertTrue("numDocs < 0 for replicas "+replicas+" via "+client, + 0 <= numDocs); + assertEquals("inconsitent numDocs for replicas "+replicas+ + " via "+client, + shardCounts.get(shard).longValue(), numDocs); + } + } + + // sums of multiple shards should add up regardless of how we + // query those shards or which client we use + long randomShardCountsExpected = 0; + ArrayList randomShards = new ArrayList<>(shardCounts.size()); + for (Map.Entry shardData : shardCounts.entrySet()) { + if (random().nextBoolean() || randomShards.size() < 2) { + String shard = shardData.getKey(); + randomShardCountsExpected += shardData.getValue(); + if (random().nextBoolean()) { + // use shard id + randomShards.add(shard); + } else { + // use some set explicit replicas + ArrayList replicas = new ArrayList<>(7); + for (CloudJettyRunner replicaJetty : shardToJetty.get(shard)) { + if (0 == random().nextInt(3) || 0 == replicas.size()) { + replicas.add(replicaJetty.url); + } + } + Collections.shuffle(replicas, random()); + randomShards.add(String.join("|", replicas)); + } + } + } + String randShards = String.join(",", randomShards); + query.set("shards", randShards); + for (SolrClient client : this.clients) { + assertEquals("numDocs for "+randShards+" via "+client, + randomShardCountsExpected, + client.query(query).getResults().getNumFound()); + } + + // total num docs must match sum of every shard's numDocs + query = new SolrQuery("*:*"); + long totalShardNumDocs = 0; + for (Long c : shardCounts.values()) { + totalShardNumDocs += c; + } + for (SolrClient client : clients) { + assertEquals("sum of shard numDocs on client: " + client, + totalShardNumDocs, + client.query(query).getResults().getNumFound()); + } + assertTrue("total numDocs <= 0, WTF? Test is useless", + 0 < totalShardNumDocs); + + } + + private void testStopAndStartCoresInOneInstance() throws Exception { + JettySolrRunner jetty = jettys.get(0); + try (final HttpSolrClient httpSolrClient = (HttpSolrClient) jetty.newClient(15000, 60000)) { + ThreadPoolExecutor executor = null; + try { + executor = new ExecutorUtil.MDCAwareThreadPoolExecutor(0, Integer.MAX_VALUE, + 5, TimeUnit.SECONDS, new SynchronousQueue(), + new SolrNamedThreadFactory("testExecutor")); + int cnt = 3; + + // create the cores + createCollectionInOneInstance(httpSolrClient, jetty.getNodeName(), executor, "multiunload2", 1, cnt); + } finally { + if (executor != null) { + ExecutorUtil.shutdownAndAwaitTermination(executor); + } + } + } + + cloudJettys.get(0).jetty.stop(); + printLayout(); + + cloudJettys.get(0).jetty.start(); + cloudClient.getZkStateReader().forceUpdateCollection("multiunload2"); + try { + cloudClient.getZkStateReader().getLeaderRetry("multiunload2", "shard1", 30000); + } catch (SolrException e) { + printLayout(); + throw e; + } + + printLayout(); + + } + + /** + * Create a collection in single node + */ + protected void createCollectionInOneInstance(final SolrClient client, String nodeName, + ThreadPoolExecutor executor, final String collection, + final int numShards, int numReplicas) { + assertNotNull(nodeName); + try { + assertEquals(0, CollectionAdminRequest.createCollection(collection, "conf1", numShards, 1) + .setCreateNodeSet("") + .process(client).getStatus()); + } catch (SolrServerException | IOException e) { + throw new RuntimeException(e); + } + for (int i = 0; i < numReplicas; i++) { + final int freezeI = i; + executor.execute(() -> { + try { + assertTrue(CollectionAdminRequest.addReplicaToShard(collection, "shard"+((freezeI%numShards)+1)) + .setCoreName(collection + freezeI) + .setNode(nodeName).process(client).isSuccess()); + } catch (SolrServerException | IOException e) { + throw new RuntimeException(e); + } + }); + } + } + + protected String getBaseUrl(SolrClient client) { + String url2 = ((HttpSolrClient) client).getBaseURL() + .substring( + 0, + ((HttpSolrClient) client).getBaseURL().length() + - DEFAULT_COLLECTION.length() -1); + return url2; + } + + @Override + protected CollectionAdminResponse createCollection(Map> collectionInfos, + String collectionName, String configSetName, int numShards, int numReplicas, SolrClient client, String createNodeSetStr) throws SolrServerException, IOException { + // TODO: Use CollectionAdminRequest for this test + ModifiableSolrParams params = new ModifiableSolrParams(); + params.set("action", CollectionAction.CREATE.toString()); + + params.set(CollectionHandlingUtils.NUM_SLICES, numShards); + params.set(ZkStateReader.REPLICATION_FACTOR, numReplicas); + if (createNodeSetStr != null) params.set(CollectionHandlingUtils.CREATE_NODE_SET, createNodeSetStr); + + int clientIndex = clients.size() > 1 ? random().nextInt(2) : 0; + List list = new ArrayList<>(); + list.add(numShards); + list.add(numReplicas); + if (collectionInfos != null) { + collectionInfos.put(collectionName, list); + } + params.set("name", collectionName); + params.set("collection.configName", configSetName); + QueryRequest request = new QueryRequest(params); + request.setPath("/admin/collections"); + + CollectionAdminResponse res = new CollectionAdminResponse(); + if (client == null) { + final String baseUrl = ((HttpSolrClient) clients.get(clientIndex)).getBaseURL().substring( + 0, + ((HttpSolrClient) clients.get(clientIndex)).getBaseURL().length() + - DEFAULT_COLLECTION.length() - 1); + + try (SolrClient aClient = createNewSolrClient("", baseUrl)) { + res.setResponse(aClient.request(request)); + } + } else { + res.setResponse(client.request(request)); + } + return res; + } + + protected ZkCoreNodeProps getLeaderUrlFromZk(String collection, String slice) { + ClusterState clusterState = getCommonCloudSolrClient().getZkStateReader().getClusterState(); + ZkNodeProps leader = clusterState.getCollection(collection).getLeader(slice); + if (leader == null) { + throw new RuntimeException("Could not find leader:" + collection + " " + slice); + } + return new ZkCoreNodeProps(leader); + } + + /** + * Expects a RegexReplaceProcessorFactories in the chain which will + * "double up" the values in two (stored) string fields. + *

+ * If the values are "double-doubled" or "not-doubled" then we know + * the processor was not run the appropriate number of times + *

+ */ + private void testUpdateProcessorsRunOnlyOnce(final String chain) throws Exception { + + final String fieldA = "regex_dup_A_s"; + final String fieldB = "regex_dup_B_s"; + final String val = "x"; + final String expected = "x_x"; + final ModifiableSolrParams updateParams = new ModifiableSolrParams(); + updateParams.add(UpdateParams.UPDATE_CHAIN, chain); + + final int numLoops = atLeast(50); + + for (int i = 1; i < numLoops; i++) { + // add doc to random client + SolrClient updateClient = clients.get(random().nextInt(clients.size())); + SolrInputDocument doc = new SolrInputDocument(); + addFields(doc, id, i, fieldA, val, fieldB, val); + UpdateResponse ures = add(updateClient, updateParams, doc); + assertEquals(chain + ": update failed", 0, ures.getStatus()); + ures = updateClient.commit(); + assertEquals(chain + ": commit failed", 0, ures.getStatus()); + } + + // query for each doc, and check both fields to ensure the value is correct + for (int i = 1; i < numLoops; i++) { + final String query = id + ":" + i; + QueryResponse qres = queryServer(new SolrQuery(query)); + assertEquals(chain + ": query failed: " + query, + 0, qres.getStatus()); + assertEquals(chain + ": didn't find correct # docs with query: " + query, + 1, qres.getResults().getNumFound()); + SolrDocument doc = qres.getResults().get(0); + + for (String field : new String[] {fieldA, fieldB}) { + assertEquals(chain + ": doc#" + i+ " has wrong value for " + field, + expected, doc.getFirstValue(field)); + } + } + + } + + // cloud level test mainly needed just to make sure that versions and errors are propagated correctly + private void doOptimisticLockingAndUpdating() throws Exception { + log.info("### STARTING doOptimisticLockingAndUpdating"); + printLayout(); + + final SolrInputDocument sd = sdoc("id", 1000, "_version_", -1); + indexDoc(sd); + + ignoreException("version conflict"); + for (SolrClient client : clients) { + SolrException e = expectThrows(SolrException.class, () -> client.add(sd)); + assertEquals(409, e.code()); + } + unIgnoreException("version conflict"); + + // TODO: test deletes. SolrJ needs a good way to pass version for delete... + + final SolrInputDocument sd2 = sdoc("id", 1000, "foo_i",5); + clients.get(0).add(sd2); + + List expected = new ArrayList<>(); + int val = 0; + for (SolrClient client : clients) { + val += 10; + client.add(sdoc("id", 1000, "val_i", map("add",val), "foo_i",val)); + expected.add(val); + } + + QueryRequest qr = new QueryRequest(params("qt", "/get", "id","1000")); + for (SolrClient client : clients) { + val += 10; + NamedList rsp = client.request(qr); + String match = JSONTestUtil.matchObj("/val_i", rsp.get("doc"), expected); + if (match != null) throw new RuntimeException(match); + } + } + + private void testNumberOfCommitsWithCommitAfterAdd() + throws SolrServerException, IOException { + log.info("### STARTING testNumberOfCommitsWithCommitAfterAdd"); + long startCommits = getNumCommits((HttpSolrClient) clients.get(0)); + + + NamedList result = clients.get(0).request( + new StreamingUpdateRequest("/update", + getFile("books_numeric_ids.csv"), "application/csv") + .setCommitWithin(900000) + .setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true)); + + long endCommits = getNumCommits((HttpSolrClient) clients.get(0)); + + assertEquals(startCommits + 1L, endCommits); + } + + private Long getNumCommits(HttpSolrClient sourceClient) throws + SolrServerException, IOException { + // construct the /admin/metrics URL + URL url = new URL(sourceClient.getBaseURL()); + String path = url.getPath().substring(1); + String[] elements = path.split("/"); + String collection = elements[elements.length - 1]; + String urlString = url.toString(); + urlString = urlString.substring(0, urlString.length() - collection.length() - 1); + try (HttpSolrClient client = getHttpSolrClient(urlString, 15000, 60000)) { + ModifiableSolrParams params = new ModifiableSolrParams(); + //params.set("qt", "/admin/metrics?prefix=UPDATE.updateHandler®istry=solr.core." + collection); + params.set("qt", "/admin/metrics"); + params.set("prefix", "UPDATE.updateHandler"); + params.set("registry", "solr.core." + collection); + // use generic request to avoid extra processing of queries + QueryRequest req = new QueryRequest(params); + NamedList resp = client.request(req); + NamedList metrics = (NamedList) resp.get("metrics"); + NamedList uhandlerCat = (NamedList) metrics.getVal(0); + @SuppressWarnings({"unchecked"}) + Map commits = (Map) uhandlerCat.get("UPDATE.updateHandler.commits"); + return (Long) commits.get("count"); + } + } + + private void testANewCollectionInOneInstanceWithManualShardAssignement() throws Exception { + log.info("### STARTING testANewCollectionInOneInstanceWithManualShardAssignement"); + assertEquals(0, CollectionAdminRequest.createCollection(oneInstanceCollection2, "conf1", 2, 2) + .setCreateNodeSet("") + .process(cloudClient).getStatus()); + + List collectionClients = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + CollectionAdminResponse resp = CollectionAdminRequest + .addReplicaToShard(oneInstanceCollection2, "shard" + ((i%2)+1)) + .setNode(jettys.get(0).getNodeName()) + .process(cloudClient); + for (String coreName : resp.getCollectionCoresStatus().keySet()) { + collectionClients.add(createNewSolrClient(coreName, jettys.get(0).getBaseUrl().toString())); + } + + + } + + SolrClient client1 = collectionClients.get(0); + SolrClient client2 = collectionClients.get(1); + SolrClient client3 = collectionClients.get(2); + SolrClient client4 = collectionClients.get(3); + + + // no one should be recovering + waitForRecoveriesToFinish(oneInstanceCollection2, getCommonCloudSolrClient().getZkStateReader(), false, true); + + assertAllActive(oneInstanceCollection2, getCommonCloudSolrClient().getZkStateReader()); + + //printLayout(); + + // TODO: enable when we don't falsely get slice1... + // solrj.getZkStateReader().getLeaderUrl(oneInstanceCollection2, "slice1", 30000); + // solrj.getZkStateReader().getLeaderUrl(oneInstanceCollection2, "slice2", 30000); + client2.add(getDoc(id, "1")); + client3.add(getDoc(id, "2")); + client4.add(getDoc(id, "3")); + + client1.commit(); + SolrQuery query = new SolrQuery("*:*"); + query.set("distrib", false); + long oneDocs = client1.query(query).getResults().getNumFound(); + long twoDocs = client2.query(query).getResults().getNumFound(); + long threeDocs = client3.query(query).getResults().getNumFound(); + long fourDocs = client4.query(query).getResults().getNumFound(); + + query.set("collection", oneInstanceCollection2); + query.set("distrib", true); + long allDocs = getCommonCloudSolrClient().query(query).getResults().getNumFound(); + +// System.out.println("1:" + oneDocs); +// System.out.println("2:" + twoDocs); +// System.out.println("3:" + threeDocs); +// System.out.println("4:" + fourDocs); +// System.out.println("All Docs:" + allDocs); + +// assertEquals(oneDocs, threeDocs); +// assertEquals(twoDocs, fourDocs); +// assertNotSame(oneDocs, twoDocs); + assertEquals(3, allDocs); + + // we added a role of none on these creates - check for it + ZkStateReader zkStateReader = getCommonCloudSolrClient().getZkStateReader(); + zkStateReader.forceUpdateCollection(oneInstanceCollection2); + Map slices = zkStateReader.getClusterState().getCollection(oneInstanceCollection2).getSlicesMap(); + assertNotNull(slices); + + ZkCoreNodeProps props = new ZkCoreNodeProps(getCommonCloudSolrClient().getZkStateReader().getClusterState() + .getCollection(oneInstanceCollection2).getLeader("shard1")); + + // now test that unloading a core gets us a new leader + try (HttpSolrClient unloadClient = getHttpSolrClient(jettys.get(0).getBaseUrl().toString(), 15000, 60000)) { + Unload unloadCmd = new Unload(true); + unloadCmd.setCoreName(props.getCoreName()); + + String leader = props.getCoreUrl(); + + testExecutor.execute(new Runnable() { + + @Override + public void run() { + try { + unloadClient.request(unloadCmd); + } catch (SolrServerException e) { + throw new RuntimeException(e); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + }); + + try { + getCommonCloudSolrClient().getZkStateReader().waitForState(oneInstanceCollection2, 20000, TimeUnit.MILLISECONDS, (n, c) -> { + + + try { + if (leader.equals(zkStateReader.getLeaderUrl(oneInstanceCollection2, "shard1", 10000))) { + return false; + } + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return true; + }); + } catch (TimeoutException | InterruptedException e) { + fail("Leader never changed"); + } + } + + IOUtils.close(collectionClients); + + } + + private void testSearchByCollectionName() throws SolrServerException, IOException { + log.info("### STARTING testSearchByCollectionName"); + SolrClient client = clients.get(0); + final String baseUrl = ((HttpSolrClient) client).getBaseURL().substring( + 0, + ((HttpSolrClient) client).getBaseURL().length() + - DEFAULT_COLLECTION.length() - 1); + + // the cores each have different names, but if we add the collection name to the url + // we should get mapped to the right core + try (SolrClient client1 = createNewSolrClient(oneInstanceCollection, baseUrl)) { + SolrQuery query = new SolrQuery("*:*"); + long oneDocs = client1.query(query).getResults().getNumFound(); + assertEquals(3, oneDocs); + } + } + + private void testUpdateByCollectionName() throws SolrServerException, IOException { + log.info("### STARTING testUpdateByCollectionName"); + SolrClient client = clients.get(0); + final String baseUrl = ((HttpSolrClient) client).getBaseURL().substring( + 0, + ((HttpSolrClient) client).getBaseURL().length() + - DEFAULT_COLLECTION.length() - 1); + + // the cores each have different names, but if we add the collection name to the url + // we should get mapped to the right core + // test hitting an update url + try (SolrClient client1 = createNewSolrClient(oneInstanceCollection, baseUrl)) { + client1.commit(); + } + } + + private void testANewCollectionInOneInstance() throws Exception { + log.info("### STARTING testANewCollectionInOneInstance"); + CollectionAdminResponse response = CollectionAdminRequest.createCollection(oneInstanceCollection, "conf1", 2, 2) + .setCreateNodeSet(jettys.get(0).getNodeName()) + .process(cloudClient); + assertEquals(0, response.getStatus()); + List collectionClients = new ArrayList<>(); + for (String coreName : response.getCollectionCoresStatus().keySet()) { + collectionClients.add(createNewSolrClient(coreName, jettys.get(0).getBaseUrl().toString())); + } + + SolrClient client1 = collectionClients.get(0); + SolrClient client2 = collectionClients.get(1); + SolrClient client3 = collectionClients.get(2); + SolrClient client4 = collectionClients.get(3); + + waitForRecoveriesToFinish(oneInstanceCollection, getCommonCloudSolrClient().getZkStateReader(), false); + assertAllActive(oneInstanceCollection, getCommonCloudSolrClient().getZkStateReader()); + + client2.add(getDoc(id, "1")); + client3.add(getDoc(id, "2")); + client4.add(getDoc(id, "3")); + + client1.commit(); + SolrQuery query = new SolrQuery("*:*"); + query.set("distrib", false); + long oneDocs = client1.query(query).getResults().getNumFound(); + long twoDocs = client2.query(query).getResults().getNumFound(); + long threeDocs = client3.query(query).getResults().getNumFound(); + long fourDocs = client4.query(query).getResults().getNumFound(); + + query.set("collection", oneInstanceCollection); + query.set("distrib", true); + long allDocs = getCommonCloudSolrClient().query(query).getResults().getNumFound(); + +// System.out.println("1:" + oneDocs); +// System.out.println("2:" + twoDocs); +// System.out.println("3:" + threeDocs); +// System.out.println("4:" + fourDocs); +// System.out.println("All Docs:" + allDocs); + + assertEquals(3, allDocs); + IOUtils.close(collectionClients); + + } + + private void createCollection(String collection, + List collectionClients, String baseUrl, int num) { + createSolrCore(collection, collectionClients, baseUrl, num, null); + } + + private void createSolrCore(final String collection, + List collectionClients, final String baseUrl, final int num, + final String shardId) { + Callable call = () -> { + try (HttpSolrClient client = getHttpSolrClient(baseUrl)) { + // client.setConnectionTimeout(15000); + Create createCmd = new Create(); + createCmd.setRoles("none"); + createCmd.setCoreName(collection + num); + createCmd.setCollection(collection); + + if (random().nextBoolean()) { + // sometimes we use an explicit core node name + createCmd.setCoreNodeName("anode" + nodeCounter.incrementAndGet()); + } + + if (shardId == null) { + createCmd.setNumShards(2); + } + createCmd.setDataDir(getDataDir(createTempDir(collection).toFile().getAbsolutePath())); + if (shardId != null) { + createCmd.setShardId(shardId); + } + client.request(createCmd); + } catch (Exception e) { + e.printStackTrace(); + //fail + } + return null; + }; + + pending.add(completionService.submit(call)); + + + collectionClients.add(createNewSolrClient(collection + num, baseUrl)); + } + + private void testMultipleCollections() throws Exception { + log.info("### STARTING testMultipleCollections"); + // create another 2 collections and search across them + createNewCollection("collection2"); + createNewCollection("collection3"); + + while (pending != null && pending.size() > 0) { + + Future future = completionService.take(); + if (future == null) return; + pending.remove(future); + } + + indexDoc("collection2", getDoc(id, "10000000")); + indexDoc("collection2", getDoc(id, "10000001")); + indexDoc("collection2", getDoc(id, "10000003")); + getCommonCloudSolrClient().setDefaultCollection("collection2"); + getCommonCloudSolrClient().add(getDoc(id, "10000004")); + getCommonCloudSolrClient().setDefaultCollection(null); + + indexDoc("collection3", getDoc(id, "20000000")); + indexDoc("collection3", getDoc(id, "20000001")); + getCommonCloudSolrClient().setDefaultCollection("collection3"); + getCommonCloudSolrClient().add(getDoc(id, "10000005")); + getCommonCloudSolrClient().setDefaultCollection(null); + + otherCollectionClients.get("collection2").get(0).commit(); + otherCollectionClients.get("collection3").get(0).commit(); + + getCommonCloudSolrClient().setDefaultCollection("collection1"); + long collection1Docs = getCommonCloudSolrClient().query(new SolrQuery("*:*")).getResults() + .getNumFound(); + + long collection2Docs = otherCollectionClients.get("collection2").get(0) + .query(new SolrQuery("*:*")).getResults().getNumFound(); + + long collection3Docs = otherCollectionClients.get("collection3").get(0) + .query(new SolrQuery("*:*")).getResults().getNumFound(); + + + SolrQuery query = new SolrQuery("*:*"); + query.set("collection", "collection2,collection3"); + long found = clients.get(0).query(query).getResults().getNumFound(); + assertEquals(collection2Docs + collection3Docs, found); + + query = new SolrQuery("*:*"); + query.set("collection", "collection1,collection2,collection3"); + found = clients.get(0).query(query).getResults().getNumFound(); + assertEquals(collection1Docs + collection2Docs + collection3Docs, found); + + // try to search multiple with cloud client + found = getCommonCloudSolrClient().query(query).getResults().getNumFound(); + assertEquals(collection1Docs + collection2Docs + collection3Docs, found); + + query.set("collection", "collection2,collection3"); + found = getCommonCloudSolrClient().query(query).getResults().getNumFound(); + assertEquals(collection2Docs + collection3Docs, found); + + query.set("collection", "collection3"); + found = getCommonCloudSolrClient().query(query).getResults().getNumFound(); + assertEquals(collection3Docs, found); + + query.remove("collection"); + found = getCommonCloudSolrClient().query(query).getResults().getNumFound(); + assertEquals(collection1Docs, found); + + assertEquals(collection3Docs, collection2Docs - 1); + } + + protected void indexDoc(String collection, SolrInputDocument doc) throws IOException, SolrServerException { + List clients = otherCollectionClients.get(collection); + int which = (doc.getField(id).toString().hashCode() & 0x7fffffff) % clients.size(); + SolrClient client = clients.get(which); + client.add(doc); + } + + @SuppressWarnings({"unchecked"}) + private void createNewCollection(final String collection) throws InterruptedException { + try { + assertEquals(0, CollectionAdminRequest + .createCollection(collection, "conf1", 2, 1) + .setCreateNodeSet("") + .process(cloudClient).getStatus()); + } catch (Exception e) { + e.printStackTrace(); + //fails + } + final List collectionClients = new ArrayList<>(); + otherCollectionClients.put(collection, collectionClients); + int unique = 0 ; + for (final JettySolrRunner runner : jettys) { + unique++; + final int frozeUnique = unique; + Callable call = () -> { + + try { + assertTrue(CollectionAdminRequest + .addReplicaToShard(collection, "shard"+ ((frozeUnique%2)+1)) + .setNode(runner.getNodeName()) + .process(cloudClient).isSuccess()); + } catch (Exception e) { + e.printStackTrace(); + //fails + } + return null; + }; + + collectionClients.add(createNewSolrClient(collection, runner.getBaseUrl().toString())); + pending.add(completionService.submit(call)); + while (pending != null && pending.size() > 0) { + + Future future = completionService.take(); + if (future == null) return; + pending.remove(future); + } + } + } + + protected SolrClient createNewSolrClient(String collection, String baseUrl) { + try { + // setup the server... + HttpSolrClient client = getHttpSolrClient(baseUrl + "/" + collection); + + return client; + } + catch (Exception ex) { + throw new RuntimeException(ex); + } + } + + protected SolrClient createNewSolrClient(String collection, String baseUrl, int connectionTimeoutMillis, int socketTimeoutMillis) { + try { + // setup the server... + HttpSolrClient client = getHttpSolrClient(baseUrl + "/" + collection, connectionTimeoutMillis, socketTimeoutMillis); + + return client; + } + catch (Exception ex) { + throw new RuntimeException(ex); + } + } + + @Override + protected QueryResponse queryServer(ModifiableSolrParams params) throws SolrServerException, IOException { + + if (r.nextBoolean()) + return super.queryServer(params); + + if (r.nextBoolean()) + params.set("collection",DEFAULT_COLLECTION); + + QueryResponse rsp = getCommonCloudSolrClient().query(params); + return rsp; + } + + @Override + public void distribTearDown() throws Exception { + super.distribTearDown(); + if (otherCollectionClients != null) { + for (List clientList : otherCollectionClients.values()) { + IOUtils.close(clientList); + } + } + otherCollectionClients = null; + List tasks = executor.shutdownNow(); + assertTrue(tasks.isEmpty()); + } +} From 7567da71c15e4275ff517ba26a43125fb2a98d48 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 11:36:11 +0200 Subject: [PATCH 11/52] HDFS contrib module: separate HDFS test classes from Core test classes (5.: HdfsChaosMonkeySafeLeaderTest) - HdfsChaosMonkeySafeLeaderTest extends ChaosMonkeySafeLeaderTest - separated by introducing AbstractChaosMonkeySafeLeaderTestBase --- .../hdfs/HdfsChaosMonkeySafeLeaderTest.java | 11 +- .../solr/cloud/ChaosMonkeySafeLeaderTest.java | 192 +--------------- ...AbstractChaosMonkeySafeLeaderTestBase.java | 211 ++++++++++++++++++ 3 files changed, 227 insertions(+), 187 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeySafeLeaderTestBase.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java index 402d5cf07c6..b52aec36e3d 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java @@ -22,13 +22,15 @@ import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.ChaosMonkeySafeLeaderTest; +import org.apache.solr.cloud.AbstractChaosMonkeySafeLeaderTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; import com.carrotsearch.randomizedtesting.annotations.Nightly; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; +import org.junit.Test; + @Slow @Nightly @@ -37,7 +39,8 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsChaosMonkeySafeLeaderTest extends ChaosMonkeySafeLeaderTest { +public class HdfsChaosMonkeySafeLeaderTest extends AbstractChaosMonkeySafeLeaderTestBase { + private static final String DIRECTORY_FACTORY = "org.apache.solr.core.HdfsDirectoryFactory"; private static MiniDFSCluster dfsCluster; @BeforeClass @@ -68,4 +71,8 @@ public void distribSetUp() throws Exception { protected String getDataDir(String dataDir) throws IOException { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } + + protected String getDirectoryFactory() { + return DIRECTORY_FACTORY; + } } diff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java index af9fdbe0ea5..414e3a4e736 100644 --- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java @@ -17,196 +17,18 @@ package org.apache.solr.cloud; import org.apache.lucene.util.LuceneTestCase.Slow; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.impl.CloudSolrClient; -import org.apache.solr.common.SolrInputDocument; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; +/* + * Implementation moved to AbstractChaosMonkeySafeLeaderTestBase as is used by HDFS contrib module test + */ @Slow -public class ChaosMonkeySafeLeaderTest extends AbstractFullDistribZkTestBase { - - private static final Integer RUN_LENGTH = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.runlength", "-1")); - - @BeforeClass - public static void beforeSuperClass() { - schemaString = "schema15.xml"; // we need a string id - System.setProperty("solr.autoCommit.maxTime", "15000"); - System.clearProperty("solr.httpclient.retries"); - System.clearProperty("solr.retries.on.forward"); - System.clearProperty("solr.retries.to.followers"); - setErrorHook(); - } - - @AfterClass - public static void afterSuperClass() { - System.clearProperty("solr.autoCommit.maxTime"); - clearErrorHook(); - } - - protected static final String[] fieldNames = new String[]{"f_i", "f_f", "f_d", "f_l", "f_dt"}; - protected static final RandVal[] randVals = new RandVal[]{rint, rfloat, rdouble, rlong, rdate}; - - public String[] getFieldNames() { - return fieldNames; - } - - public RandVal[] getRandValues() { - return randVals; - } - - @Override - public void distribSetUp() throws Exception { - useFactory("solr.StandardDirectoryFactory"); - super.distribSetUp(); - } - - public ChaosMonkeySafeLeaderTest() { - super(); - sliceCount = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.slicecount", "-1")); - if (sliceCount == -1) { - sliceCount = random().nextInt(TEST_NIGHTLY ? 5 : 3) + 1; - } +public class ChaosMonkeySafeLeaderTest extends AbstractChaosMonkeySafeLeaderTestBase { - int numShards = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.shardcount", "-1")); - if (numShards == -1) { - // we make sure that there's at least one shard with more than one replica - // so that the ChaosMonkey has something to kill - numShards = sliceCount + random().nextInt(TEST_NIGHTLY ? 12 : 2) + 1; - } - fixShardCount(numShards); - } - - @Test - public void test() throws Exception { - - handle.clear(); - handle.put("timestamp", SKIPVAL); - - // randomly turn on 1 seconds 'soft' commit - randomlyEnableAutoSoftCommit(); - - tryDelete(); - - List threads = new ArrayList<>(); - int threadCount = 2; - int batchSize = 1; - if (random().nextBoolean()) { - batchSize = random().nextInt(98) + 2; - } - - boolean pauseBetweenUpdates = TEST_NIGHTLY ? random().nextBoolean() : true; - int maxUpdates = -1; - if (!pauseBetweenUpdates) { - maxUpdates = 1000 + random().nextInt(1000); - } else { - maxUpdates = 15000; - } - - for (int i = 0; i < threadCount; i++) { - StoppableIndexingThread indexThread = new StoppableIndexingThread(controlClient, cloudClient, Integer.toString(i), true, maxUpdates, batchSize, pauseBetweenUpdates); // random().nextInt(999) + 1 - threads.add(indexThread); - indexThread.start(); - } - - chaosMonkey.startTheMonkey(false, 500); - try { - long runLength; - if (RUN_LENGTH != -1) { - runLength = RUN_LENGTH; - } else { - int[] runTimes; - if (TEST_NIGHTLY) { - runTimes = new int[] {5000, 6000, 10000, 15000, 25000, 30000, - 30000, 45000, 90000, 120000}; - } else { - runTimes = new int[] {5000, 7000, 15000}; - } - runLength = runTimes[random().nextInt(runTimes.length - 1)]; - } - - Thread.sleep(runLength); - } finally { - chaosMonkey.stopTheMonkey(); - } - - for (StoppableIndexingThread indexThread : threads) { - indexThread.safeStop(); - } - - // wait for stop... - for (StoppableIndexingThread indexThread : threads) { - indexThread.join(); - } - - for (StoppableIndexingThread indexThread : threads) { - assertEquals(0, indexThread.getFailCount()); - } - - // try and wait for any replications and what not to finish... - - Thread.sleep(2000); - - waitForThingsToLevelOut(3, TimeUnit.MINUTES); - - // even if things were leveled out, a jetty may have just been stopped or something - // we wait again and wait to level out again to make sure the system is not still in flux - - Thread.sleep(3000); - - waitForThingsToLevelOut(3, TimeUnit.MINUTES); + private static final String DIRECTORY_FACTORY = "solr.StandardDirectoryFactory"; - checkShardConsistency(batchSize == 1, true); - - if (VERBOSE) System.out.println("control docs:" + controlClient.query(new SolrQuery("*:*")).getResults().getNumFound() + "\n\n"); - - // try and make a collection to make sure the overseer has survived the expiration and session loss - - // sometimes we restart zookeeper as well - if (random().nextBoolean()) { - zkServer.shutdown(); - zkServer = new ZkTestServer(zkServer.getZkDir(), zkServer.getPort()); - zkServer.run(false); - } - - try (CloudSolrClient client = createCloudClient("collection1")) { - createCollection(null, "testcollection", 1, 1, client, null, "conf1"); - - } - List numShardsNumReplicas = new ArrayList<>(2); - numShardsNumReplicas.add(1); - numShardsNumReplicas.add(1); - checkForCollection("testcollection",numShardsNumReplicas, null); - } - - private void tryDelete() throws Exception { - long start = System.nanoTime(); - long timeout = start + TimeUnit.NANOSECONDS.convert(10, TimeUnit.SECONDS); - while (System.nanoTime() < timeout) { - try { - del("*:*"); - break; - } catch (SolrServerException e) { - // cluster may not be up yet - e.printStackTrace(); - } - Thread.sleep(100); - } - } - - // skip the randoms - they can deadlock... @Override - protected void indexr(Object... fields) throws Exception { - SolrInputDocument doc = new SolrInputDocument(); - addFields(doc, fields); - addFields(doc, "rnd_b", true); - indexDoc(doc); + protected String getDirectoryFactory() { + return DIRECTORY_FACTORY; } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeySafeLeaderTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeySafeLeaderTestBase.java new file mode 100644 index 00000000000..0078b98783b --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeySafeLeaderTestBase.java @@ -0,0 +1,211 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.solr.cloud; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.impl.CloudSolrClient; +import org.apache.solr.common.SolrInputDocument; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public abstract class AbstractChaosMonkeySafeLeaderTestBase extends AbstractFullDistribZkTestBase { + private static final Integer RUN_LENGTH = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.runlength", "-1")); + + @BeforeClass + public static void beforeSuperClass() { + schemaString = "schema15.xml"; // we need a string id + System.setProperty("solr.autoCommit.maxTime", "15000"); + System.clearProperty("solr.httpclient.retries"); + System.clearProperty("solr.retries.on.forward"); + System.clearProperty("solr.retries.to.followers"); + setErrorHook(); + } + + @AfterClass + public static void afterSuperClass() { + System.clearProperty("solr.autoCommit.maxTime"); + clearErrorHook(); + } + + protected static final String[] fieldNames = new String[]{"f_i", "f_f", "f_d", "f_l", "f_dt"}; + protected static final RandVal[] randVals = new RandVal[]{rint, rfloat, rdouble, rlong, rdate}; + + public String[] getFieldNames() { + return fieldNames; + } + + public RandVal[] getRandValues() { + return randVals; + } + + protected abstract String getDirectoryFactory(); + @Override + public void distribSetUp() throws Exception { + useFactory(getDirectoryFactory()); + super.distribSetUp(); + } + + public AbstractChaosMonkeySafeLeaderTestBase() { + super(); + sliceCount = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.slicecount", "-1")); + if (sliceCount == -1) { + sliceCount = random().nextInt(TEST_NIGHTLY ? 5 : 3) + 1; + } + + int numShards = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.shardcount", "-1")); + if (numShards == -1) { + // we make sure that there's at least one shard with more than one replica + // so that the ChaosMonkey has something to kill + numShards = sliceCount + random().nextInt(TEST_NIGHTLY ? 12 : 2) + 1; + } + fixShardCount(numShards); + } + + @Test + public void test() throws Exception { + + handle.clear(); + handle.put("timestamp", SKIPVAL); + + // randomly turn on 1 seconds 'soft' commit + randomlyEnableAutoSoftCommit(); + + tryDelete(); + + List threads = new ArrayList<>(); + int threadCount = 2; + int batchSize = 1; + if (random().nextBoolean()) { + batchSize = random().nextInt(98) + 2; + } + + boolean pauseBetweenUpdates = TEST_NIGHTLY ? random().nextBoolean() : true; + int maxUpdates = -1; + if (!pauseBetweenUpdates) { + maxUpdates = 1000 + random().nextInt(1000); + } else { + maxUpdates = 15000; + } + + for (int i = 0; i < threadCount; i++) { + StoppableIndexingThread indexThread = new StoppableIndexingThread(controlClient, cloudClient, Integer.toString(i), true, maxUpdates, batchSize, pauseBetweenUpdates); // random().nextInt(999) + 1 + threads.add(indexThread); + indexThread.start(); + } + + chaosMonkey.startTheMonkey(false, 500); + try { + long runLength; + if (RUN_LENGTH != -1) { + runLength = RUN_LENGTH; + } else { + int[] runTimes; + if (TEST_NIGHTLY) { + runTimes = new int[] {5000, 6000, 10000, 15000, 25000, 30000, + 30000, 45000, 90000, 120000}; + } else { + runTimes = new int[] {5000, 7000, 15000}; + } + runLength = runTimes[random().nextInt(runTimes.length - 1)]; + } + + Thread.sleep(runLength); + } finally { + chaosMonkey.stopTheMonkey(); + } + + for (StoppableIndexingThread indexThread : threads) { + indexThread.safeStop(); + } + + // wait for stop... + for (StoppableIndexingThread indexThread : threads) { + indexThread.join(); + } + + for (StoppableIndexingThread indexThread : threads) { + assertEquals(0, indexThread.getFailCount()); + } + + // try and wait for any replications and what not to finish... + + Thread.sleep(2000); + + waitForThingsToLevelOut(3, TimeUnit.MINUTES); + + // even if things were leveled out, a jetty may have just been stopped or something + // we wait again and wait to level out again to make sure the system is not still in flux + + Thread.sleep(3000); + + waitForThingsToLevelOut(3, TimeUnit.MINUTES); + + checkShardConsistency(batchSize == 1, true); + + if (VERBOSE) System.out.println("control docs:" + controlClient.query(new SolrQuery("*:*")).getResults().getNumFound() + "\n\n"); + + // try and make a collection to make sure the overseer has survived the expiration and session loss + + // sometimes we restart zookeeper as well + if (random().nextBoolean()) { + zkServer.shutdown(); + zkServer = new ZkTestServer(zkServer.getZkDir(), zkServer.getPort()); + zkServer.run(false); + } + + try (CloudSolrClient client = createCloudClient("collection1")) { + createCollection(null, "testcollection", 1, 1, client, null, "conf1"); + + } + List numShardsNumReplicas = new ArrayList<>(2); + numShardsNumReplicas.add(1); + numShardsNumReplicas.add(1); + checkForCollection("testcollection",numShardsNumReplicas, null); + } + + private void tryDelete() throws Exception { + long start = System.nanoTime(); + long timeout = start + TimeUnit.NANOSECONDS.convert(10, TimeUnit.SECONDS); + while (System.nanoTime() < timeout) { + try { + del("*:*"); + break; + } catch (SolrServerException e) { + // cluster may not be up yet + e.printStackTrace(); + } + Thread.sleep(100); + } + } + + // skip the randoms - they can deadlock... + @Override + protected void indexr(Object... fields) throws Exception { + SolrInputDocument doc = new SolrInputDocument(); + addFields(doc, fields); + addFields(doc, "rnd_b", true); + indexDoc(doc); + } + +} \ No newline at end of file From 508e053341731860ba4400e3f848b977d9e7e208 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 12:06:43 +0200 Subject: [PATCH 12/52] HDFS contrib module: separate HDFS test classes from Core test classes (6.: HdfsBasicDistributedZk2Test) - HdfsBasicDistributedZk2Test extends BasicDistributedZk2Test - separated by introducing AbstractBasicDistributedZk2TestBase --- .../hdfs/src/test-files/books_numeric_ids.csv | 11 + .../hdfs/HdfsBasicDistributedZk2Test.java | 6 +- .../solr/cloud/BasicDistributedZk2Test.java | 430 +--------------- .../AbstractBasicDistributedZk2TestBase.java | 457 ++++++++++++++++++ 4 files changed, 476 insertions(+), 428 deletions(-) create mode 100644 solr/contrib/hdfs/src/test-files/books_numeric_ids.csv create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java diff --git a/solr/contrib/hdfs/src/test-files/books_numeric_ids.csv b/solr/contrib/hdfs/src/test-files/books_numeric_ids.csv new file mode 100644 index 00000000000..817e8b769cf --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/books_numeric_ids.csv @@ -0,0 +1,11 @@ +id,cat,name,price,inStock,author_t,series_t,sequence_i,genre_s +0553573403,book,A Game of Thrones,7.99,true,George R.R. Martin,"A Song of Ice and Fire",1,fantasy +0553579908,book,A Clash of Kings,7.99,true,George R.R. Martin,"A Song of Ice and Fire",2,fantasy +0553573429,book,A Storm of Swords,7.99,true,George R.R. Martin,"A Song of Ice and Fire",3,fantasy +0553293354,book,Foundation,7.99,true,Isaac Asimov,Foundation Novels,1,scifi +0812521390,book,The Black Company,6.99,false,Glen Cook,The Chronicles of The Black Company,1,fantasy +0812550706,book,Ender's Game,6.99,true,Orson Scott Card,Ender,1,scifi +0441385532,book,Jhereg,7.95,false,Steven Brust,Vlad Taltos,1,fantasy +0380014300,book,Nine Princes In Amber,6.99,true,Roger Zelazny,the Chronicles of Amber,1,fantasy +0805080481,book,The Book of Three,5.99,true,Lloyd Alexander,The Chronicles of Prydain,1,fantasy +0805080499,book,The Black Cauldron,5.99,true,Lloyd Alexander,The Chronicles of Prydain,2,fantasy diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java index db0df8f193e..a8d3587b3fe 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java @@ -22,7 +22,7 @@ import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.BasicDistributedZk2Test; +import org.apache.solr.cloud.AbstractBasicDistributedZk2TestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -30,6 +30,7 @@ import com.carrotsearch.randomizedtesting.annotations.Nightly; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; + @Slow @Nightly @ThreadLeakFilters(defaultFilters = true, filters = { @@ -37,7 +38,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsBasicDistributedZk2Test extends BasicDistributedZk2Test { +public class HdfsBasicDistributedZk2Test extends AbstractBasicDistributedZk2TestBase { private static MiniDFSCluster dfsCluster; @BeforeClass @@ -58,4 +59,5 @@ public static void teardownClass() throws Exception { protected String getDataDir(String dataDir) throws IOException { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } + } diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java index c3a30d8e47f..f6b96a98f10 100644 --- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java +++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java @@ -16,444 +16,22 @@ */ package org.apache.solr.cloud; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.concurrent.TimeUnit; - -import org.apache.lucene.mockfile.FilterPath; import org.apache.solr.SolrTestCaseJ4.SuppressSSL; -import org.apache.solr.client.solrj.SolrClient; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.impl.HttpSolrClient; -import org.apache.solr.client.solrj.request.CollectionAdminRequest; -import org.apache.solr.client.solrj.request.QueryRequest; -import org.apache.solr.client.solrj.request.UpdateRequest; -import org.apache.solr.client.solrj.response.QueryResponse; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.common.cloud.ZkNodeProps; -import org.apache.solr.common.cloud.ZkStateReader; -import org.apache.solr.common.params.CommonParams; -import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.handler.BackupStatusChecker; -import org.apache.solr.handler.ReplicationHandler; import org.junit.Test; /** * This test simply does a bunch of basic things in solrcloud mode and asserts things * work as expected. + * Implementation moved to AbstractBasicDistributedZk2TestBase as it is used by HDFS contrib module tests. */ @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776") -public class BasicDistributedZk2Test extends AbstractFullDistribZkTestBase { - private static final String SHARD2 = "shard2"; - private static final String SHARD1 = "shard1"; - private static final String ONE_NODE_COLLECTION = "onenodecollection"; - private final boolean onlyLeaderIndexes = random().nextBoolean(); - - - public BasicDistributedZk2Test() { - super(); - // we need DVs on point fields to compute stats & facets - if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true"); - - sliceCount = 2; - } +public class BasicDistributedZk2Test extends AbstractBasicDistributedZk2TestBase { - @Override - protected boolean useTlogReplicas() { - return false; // TODO: tlog replicas makes commits take way to long due to what is likely a bug and it's TestInjection use - } - @Test + @Override @ShardsFixed(num = 4) public void test() throws Exception { - boolean testFinished = false; - try { - handle.clear(); - handle.put("timestamp", SKIPVAL); - - testNodeWithoutCollectionForwarding(); - - indexr(id, 1, i1, 100, tlong, 100, t1, - "now is the time for all good men", "foo_f", 1.414f, "foo_b", "true", - "foo_d", 1.414d); - - commit(); - - // make sure we are in a steady state... - waitForRecoveriesToFinish(false); - - assertDocCounts(false); - - indexAbunchOfDocs(); - - // check again - waitForRecoveriesToFinish(false); - - commit(); - - assertDocCounts(VERBOSE); - checkQueries(); - - assertDocCounts(VERBOSE); - - query("q", "*:*", "sort", "n_tl1 desc"); - - brindDownShardIndexSomeDocsAndRecover(); - - query("q", "*:*", "sort", "n_tl1 desc"); - - // test adding another replica to a shard - it should do a - // recovery/replication to pick up the index from the leader - addNewReplica(); - - long docId = testUpdateAndDelete(); - - // index a bad doc... - expectThrows(SolrException.class, () -> indexr(t1, "a doc with no id")); - - // TODO: bring this to its own method? - // try indexing to a leader that has no replicas up - ZkStateReader zkStateReader = cloudClient.getZkStateReader(); - ZkNodeProps leaderProps = zkStateReader.getLeaderRetry( - DEFAULT_COLLECTION, SHARD2); - - String nodeName = leaderProps.getStr(ZkStateReader.NODE_NAME_PROP); - chaosMonkey.stopShardExcept(SHARD2, nodeName); - - SolrClient client = getClient(nodeName); - - index_specific(client, "id", docId + 1, t1, "what happens here?"); - - // expire a session... - CloudJettyRunner cloudJetty = shardToJetty.get(SHARD1).get(0); - chaosMonkey.expireSession(cloudJetty.jetty); - - indexr("id", docId + 1, t1, "slip this doc in"); - - waitForRecoveriesToFinish(false); - - checkShardConsistency(SHARD1); - checkShardConsistency(SHARD2); - - testFinished = true; - } finally { - if (!testFinished) { - printLayoutOnTearDown = true; - } - } - - } - - private void testNodeWithoutCollectionForwarding() throws Exception { - assertEquals(0, CollectionAdminRequest - .createCollection(ONE_NODE_COLLECTION, "conf1", 1, 1) - .setCreateNodeSet("") - .process(cloudClient).getStatus()); - assertTrue(CollectionAdminRequest - .addReplicaToShard(ONE_NODE_COLLECTION, "shard1") - .setCoreName(ONE_NODE_COLLECTION + "core") - .process(cloudClient).isSuccess()); - - waitForCollection(cloudClient.getZkStateReader(), ONE_NODE_COLLECTION, 1); - waitForRecoveriesToFinish(ONE_NODE_COLLECTION, cloudClient.getZkStateReader(), false); - - cloudClient.getZkStateReader().getLeaderRetry(ONE_NODE_COLLECTION, SHARD1, 30000); - - int docs = 2; - for (SolrClient client : clients) { - final String clientUrl = getBaseUrl((HttpSolrClient) client); - addAndQueryDocs(clientUrl, docs); - docs += 2; - } - } - - // 2 docs added every call - private void addAndQueryDocs(final String baseUrl, int docs) - throws Exception { - - SolrQuery query = new SolrQuery("*:*"); - - try (HttpSolrClient qclient = getHttpSolrClient(baseUrl + "/onenodecollection" + "core")) { - - // it might take a moment for the proxy node to see us in their cloud state - waitForNon403or404or503(qclient); - - // add a doc - SolrInputDocument doc = new SolrInputDocument(); - doc.addField("id", docs); - qclient.add(doc); - qclient.commit(); - - - QueryResponse results = qclient.query(query); - assertEquals(docs - 1, results.getResults().getNumFound()); - } - - try (HttpSolrClient qclient = getHttpSolrClient(baseUrl + "/onenodecollection")) { - QueryResponse results = qclient.query(query); - assertEquals(docs - 1, results.getResults().getNumFound()); - - SolrInputDocument doc = new SolrInputDocument(); - doc.addField("id", docs + 1); - qclient.add(doc); - qclient.commit(); - - query = new SolrQuery("*:*"); - query.set("rows", 0); - results = qclient.query(query); - assertEquals(docs, results.getResults().getNumFound()); - } - } - - private long testUpdateAndDelete() throws Exception { - long docId = 99999999L; - indexr("id", docId, t1, "originalcontent"); - - commit(); - - ModifiableSolrParams params = new ModifiableSolrParams(); - params.add("q", t1 + ":originalcontent"); - QueryResponse results = clients.get(0).query(params); - assertEquals(1, results.getResults().getNumFound()); - - // update doc - indexr("id", docId, t1, "updatedcontent"); - - commit(); - - results = clients.get(0).query(params); - assertEquals(0, results.getResults().getNumFound()); - - params.set("q", t1 + ":updatedcontent"); - - results = clients.get(0).query(params); - assertEquals(1, results.getResults().getNumFound()); - - UpdateRequest uReq = new UpdateRequest(); - // uReq.setParam(UpdateParams.UPDATE_CHAIN, DISTRIB_UPDATE_CHAIN); - uReq.deleteById(Long.toString(docId)).process(clients.get(0)); - - commit(); - - results = clients.get(0).query(params); - assertEquals(0, results.getResults().getNumFound()); - return docId; - } - - private void brindDownShardIndexSomeDocsAndRecover() throws Exception { - SolrQuery query = new SolrQuery("*:*"); - query.set("distrib", false); - - commit(); - - long deadShardCount = shardToJetty.get(SHARD2).get(0).client.solrClient - .query(query).getResults().getNumFound(); - - query("q", "*:*", "sort", "n_tl1 desc"); - - int oldLiveNodes = cloudClient.getZkStateReader().getZkClient().getChildren(ZkStateReader.LIVE_NODES_ZKNODE, null, true).size(); - - assertEquals(5, oldLiveNodes); - - // kill a shard - CloudJettyRunner deadShard = chaosMonkey.stopShard(SHARD1, 0); - - // ensure shard is dead - expectThrows(SolrServerException.class, - "This server should be down and this update should have failed", - () -> index_specific(deadShard.client.solrClient, id, 999, i1, 107, t1, "specific doc!") - ); - - commit(); - - query("q", "*:*", "sort", "n_tl1 desc"); - - // long cloudClientDocs = cloudClient.query(new - // SolrQuery("*:*")).getResults().getNumFound(); - // System.out.println("clouddocs:" + cloudClientDocs); - - // try to index to a living shard at shard2 - - - long numFound1 = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); - - cloudClient.getZkStateReader().getLeaderRetry(DEFAULT_COLLECTION, SHARD1, 60000); - - try { - index_specific(shardToJetty.get(SHARD1).get(1).client.solrClient, id, 1000, i1, 108, t1, - "specific doc!"); - } catch (Exception e) { - // wait and try again - Thread.sleep(4000); - index_specific(shardToJetty.get(SHARD1).get(1).client.solrClient, id, 1000, i1, 108, t1, - "specific doc!"); - } - - commit(); - - checkShardConsistency(true, false); - - query("q", "*:*", "sort", "n_tl1 desc"); - - - cloudClient.setDefaultCollection(DEFAULT_COLLECTION); - - long numFound2 = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); - - assertEquals(numFound1 + 1, numFound2); - - SolrInputDocument doc = new SolrInputDocument(); - doc.addField("id", 1001); - - controlClient.add(doc); - - // try adding a doc with CloudSolrServer - UpdateRequest ureq = new UpdateRequest(); - ureq.add(doc); - // ureq.setParam("update.chain", DISTRIB_UPDATE_CHAIN); - - try { - ureq.process(cloudClient); - } catch(SolrServerException e){ - // try again - Thread.sleep(3500); - ureq.process(cloudClient); - } - - commit(); - - query("q", "*:*", "sort", "n_tl1 desc"); - - long numFound3 = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); - - // lets just check that the one doc since last commit made it in... - assertEquals(numFound2 + 1, numFound3); - - // test debugging - testDebugQueries(); - - if (VERBOSE) { - System.err.println(controlClient.query(new SolrQuery("*:*")).getResults() - .getNumFound()); - - for (SolrClient client : clients) { - try { - SolrQuery q = new SolrQuery("*:*"); - q.set("distrib", false); - System.err.println(client.query(q).getResults() - .getNumFound()); - } catch (Exception e) { - - } - } - } - // TODO: This test currently fails because debug info is obtained only - // on shards with matches. - // query("q","matchesnothing","fl","*,score", "debugQuery", "true"); - - // this should trigger a recovery phase on deadShard - deadShard.jetty.start(); - - // make sure we have published we are recovering - Thread.sleep(1500); - - waitForRecoveriesToFinish(false); - - deadShardCount = shardToJetty.get(SHARD1).get(0).client.solrClient - .query(query).getResults().getNumFound(); - // if we properly recovered, we should now have the couple missing docs that - // came in while shard was down - checkShardConsistency(true, false); - - - // recover over 100 docs so we do more than just peer sync (replicate recovery) - chaosMonkey.stopJetty(deadShard); - - for (int i = 0; i < 226; i++) { - doc = new SolrInputDocument(); - doc.addField("id", 2000 + i); - controlClient.add(doc); - ureq = new UpdateRequest(); - ureq.add(doc); - // ureq.setParam("update.chain", DISTRIB_UPDATE_CHAIN); - ureq.process(cloudClient); - } - commit(); - - Thread.sleep(1500); - - deadShard.jetty.start(); - - // make sure we have published we are recovering - Thread.sleep(1500); - - waitForThingsToLevelOut(1, TimeUnit.MINUTES); - - Thread.sleep(500); - - waitForRecoveriesToFinish(false); - - checkShardConsistency(true, false); - - // try a backup command - try(final HttpSolrClient client = getHttpSolrClient((String) shardToJetty.get(SHARD2).get(0).info.get("base_url"))) { - final String backupName = "the_backup"; - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("qt", ReplicationHandler.PATH); - params.set("command", "backup"); - params.set("name", backupName); - final Path location = FilterPath.unwrap(createTempDir()).toRealPath(); - // Allow non-standard location outside SOLR_HOME - jettys.forEach(j -> j.getCoreContainer().getAllowPaths().add(location)); - params.set("location", location.toString()); - - QueryRequest request = new QueryRequest(params); - client.request(request, DEFAULT_TEST_COLLECTION_NAME); - - - final BackupStatusChecker backupStatus - = new BackupStatusChecker(client, "/" + DEFAULT_TEST_COLLECTION_NAME + "/replication"); - final String backupDirName = backupStatus.waitForBackupSuccess(backupName, 30); - assertTrue("Backup dir does not exist: " + backupDirName, - Files.exists(location.resolve(backupDirName))); - } - - } - - private void addNewReplica() throws Exception { - - waitForRecoveriesToFinish(false); - - // new server should be part of first shard - // how many docs are on the new shard? - for (CloudJettyRunner cjetty : shardToJetty.get(SHARD1)) { - if (VERBOSE) System.err.println("shard1 total:" - + cjetty.client.solrClient.query(new SolrQuery("*:*")).getResults().getNumFound()); - } - for (CloudJettyRunner cjetty : shardToJetty.get(SHARD2)) { - if (VERBOSE) System.err.println("shard2 total:" - + cjetty.client.solrClient.query(new SolrQuery("*:*")).getResults().getNumFound()); - } - - checkShardConsistency(SHARD1); - checkShardConsistency(SHARD2); - - assertDocCounts(VERBOSE); - } - - private void testDebugQueries() throws Exception { - handle.put("explain", SKIPVAL); - handle.put("debug", UNORDERED); - handle.put("time", SKIPVAL); - handle.put("track", SKIP); - query("q", "now their fox sat had put", "fl", "*,score", - CommonParams.DEBUG_QUERY, "true"); - query("q", "id_i1:[1 TO 5]", CommonParams.DEBUG_QUERY, "true"); - query("q", "id_i1:[1 TO 5]", CommonParams.DEBUG, CommonParams.TIMING); - query("q", "id_i1:[1 TO 5]", CommonParams.DEBUG, CommonParams.RESULTS); - query("q", "id_i1:[1 TO 5]", CommonParams.DEBUG, CommonParams.QUERY); + super.test(); } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java new file mode 100644 index 00000000000..77540ae2bac --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java @@ -0,0 +1,457 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.concurrent.TimeUnit; + +import org.apache.lucene.mockfile.FilterPath; +import org.apache.solr.client.solrj.SolrClient; +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.request.QueryRequest; +import org.apache.solr.client.solrj.request.UpdateRequest; +import org.apache.solr.client.solrj.response.QueryResponse; +import org.apache.solr.common.SolrException; +import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.common.cloud.ZkNodeProps; +import org.apache.solr.common.cloud.ZkStateReader; +import org.apache.solr.common.params.CommonParams; +import org.apache.solr.common.params.ModifiableSolrParams; +import org.apache.solr.handler.BackupStatusChecker; +import org.apache.solr.handler.ReplicationHandler; +import org.junit.Test; + +/** + * This test simply does a bunch of basic things in solrcloud mode and asserts things + * work as expected. + */ +public abstract class AbstractBasicDistributedZk2TestBase extends AbstractFullDistribZkTestBase { + private static final String SHARD2 = "shard2"; + private static final String SHARD1 = "shard1"; + private static final String ONE_NODE_COLLECTION = "onenodecollection"; + private final boolean onlyLeaderIndexes = random().nextBoolean(); + + + public AbstractBasicDistributedZk2TestBase() { + super(); + // we need DVs on point fields to compute stats & facets + if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true"); + + sliceCount = 2; + } + + @Override + protected boolean useTlogReplicas() { + return false; // TODO: tlog replicas makes commits take way to long due to what is likely a bug and it's TestInjection use + } + + @Test + @ShardsFixed(num = 4) + public void test() throws Exception { + boolean testFinished = false; + try { + handle.clear(); + handle.put("timestamp", SKIPVAL); + + testNodeWithoutCollectionForwarding(); + + indexr(id, 1, i1, 100, tlong, 100, t1, + "now is the time for all good men", "foo_f", 1.414f, "foo_b", "true", + "foo_d", 1.414d); + + commit(); + + // make sure we are in a steady state... + waitForRecoveriesToFinish(false); + + assertDocCounts(false); + + indexAbunchOfDocs(); + + // check again + waitForRecoveriesToFinish(false); + + commit(); + + assertDocCounts(VERBOSE); + checkQueries(); + + assertDocCounts(VERBOSE); + + query("q", "*:*", "sort", "n_tl1 desc"); + + bringDownShardIndexSomeDocsAndRecover(); + + query("q", "*:*", "sort", "n_tl1 desc"); + + // test adding another replica to a shard - it should do a + // recovery/replication to pick up the index from the leader + addNewReplica(); + + long docId = testUpdateAndDelete(); + + // index a bad doc... + expectThrows(SolrException.class, () -> indexr(t1, "a doc with no id")); + + // TODO: bring this to its own method? + // try indexing to a leader that has no replicas up + ZkStateReader zkStateReader = cloudClient.getZkStateReader(); + ZkNodeProps leaderProps = zkStateReader.getLeaderRetry( + DEFAULT_COLLECTION, SHARD2); + + String nodeName = leaderProps.getStr(ZkStateReader.NODE_NAME_PROP); + chaosMonkey.stopShardExcept(SHARD2, nodeName); + + SolrClient client = getClient(nodeName); + + index_specific(client, "id", docId + 1, t1, "what happens here?"); + + // expire a session... + CloudJettyRunner cloudJetty = shardToJetty.get(SHARD1).get(0); + chaosMonkey.expireSession(cloudJetty.jetty); + + indexr("id", docId + 1, t1, "slip this doc in"); + + waitForRecoveriesToFinish(false); + + checkShardConsistency(SHARD1); + checkShardConsistency(SHARD2); + + testFinished = true; + } finally { + if (!testFinished) { + printLayoutOnTearDown = true; + } + } + + } + + private void testNodeWithoutCollectionForwarding() throws Exception { + assertEquals(0, CollectionAdminRequest + .createCollection(ONE_NODE_COLLECTION, "conf1", 1, 1) + .setCreateNodeSet("") + .process(cloudClient).getStatus()); + assertTrue(CollectionAdminRequest + .addReplicaToShard(ONE_NODE_COLLECTION, "shard1") + .setCoreName(ONE_NODE_COLLECTION + "core") + .process(cloudClient).isSuccess()); + + waitForCollection(cloudClient.getZkStateReader(), ONE_NODE_COLLECTION, 1); + waitForRecoveriesToFinish(ONE_NODE_COLLECTION, cloudClient.getZkStateReader(), false); + + cloudClient.getZkStateReader().getLeaderRetry(ONE_NODE_COLLECTION, SHARD1, 30000); + + int docs = 2; + for (SolrClient client : clients) { + final String clientUrl = getBaseUrl((HttpSolrClient) client); + addAndQueryDocs(clientUrl, docs); + docs += 2; + } + } + + // 2 docs added every call + private void addAndQueryDocs(final String baseUrl, int docs) + throws Exception { + + SolrQuery query = new SolrQuery("*:*"); + + try (HttpSolrClient qclient = getHttpSolrClient(baseUrl + "/onenodecollection" + "core")) { + + // it might take a moment for the proxy node to see us in their cloud state + waitForNon403or404or503(qclient); + + // add a doc + SolrInputDocument doc = new SolrInputDocument(); + doc.addField("id", docs); + qclient.add(doc); + qclient.commit(); + + + QueryResponse results = qclient.query(query); + assertEquals(docs - 1, results.getResults().getNumFound()); + } + + try (HttpSolrClient qclient = getHttpSolrClient(baseUrl + "/onenodecollection")) { + QueryResponse results = qclient.query(query); + assertEquals(docs - 1, results.getResults().getNumFound()); + + SolrInputDocument doc = new SolrInputDocument(); + doc.addField("id", docs + 1); + qclient.add(doc); + qclient.commit(); + + query = new SolrQuery("*:*"); + query.set("rows", 0); + results = qclient.query(query); + assertEquals(docs, results.getResults().getNumFound()); + } + } + + private long testUpdateAndDelete() throws Exception { + long docId = 99999999L; + indexr("id", docId, t1, "originalcontent"); + + commit(); + + ModifiableSolrParams params = new ModifiableSolrParams(); + params.add("q", t1 + ":originalcontent"); + QueryResponse results = clients.get(0).query(params); + assertEquals(1, results.getResults().getNumFound()); + + // update doc + indexr("id", docId, t1, "updatedcontent"); + + commit(); + + results = clients.get(0).query(params); + assertEquals(0, results.getResults().getNumFound()); + + params.set("q", t1 + ":updatedcontent"); + + results = clients.get(0).query(params); + assertEquals(1, results.getResults().getNumFound()); + + UpdateRequest uReq = new UpdateRequest(); + // uReq.setParam(UpdateParams.UPDATE_CHAIN, DISTRIB_UPDATE_CHAIN); + uReq.deleteById(Long.toString(docId)).process(clients.get(0)); + + commit(); + + results = clients.get(0).query(params); + assertEquals(0, results.getResults().getNumFound()); + return docId; + } + + private void bringDownShardIndexSomeDocsAndRecover() throws Exception { + SolrQuery query = new SolrQuery("*:*"); + query.set("distrib", false); + + commit(); + + long deadShardCount = shardToJetty.get(SHARD2).get(0).client.solrClient + .query(query).getResults().getNumFound(); + + query("q", "*:*", "sort", "n_tl1 desc"); + + int oldLiveNodes = cloudClient.getZkStateReader().getZkClient().getChildren(ZkStateReader.LIVE_NODES_ZKNODE, null, true).size(); + + assertEquals(5, oldLiveNodes); + + // kill a shard + CloudJettyRunner deadShard = chaosMonkey.stopShard(SHARD1, 0); + + // ensure shard is dead + expectThrows(SolrServerException.class, + "This server should be down and this update should have failed", + () -> index_specific(deadShard.client.solrClient, id, 999, i1, 107, t1, "specific doc!") + ); + + commit(); + + query("q", "*:*", "sort", "n_tl1 desc"); + + // long cloudClientDocs = cloudClient.query(new + // SolrQuery("*:*")).getResults().getNumFound(); + // System.out.println("clouddocs:" + cloudClientDocs); + + // try to index to a living shard at shard2 + + + long numFound1 = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); + + cloudClient.getZkStateReader().getLeaderRetry(DEFAULT_COLLECTION, SHARD1, 60000); + + try { + index_specific(shardToJetty.get(SHARD1).get(1).client.solrClient, id, 1000, i1, 108, t1, + "specific doc!"); + } catch (Exception e) { + // wait and try again + Thread.sleep(4000); + index_specific(shardToJetty.get(SHARD1).get(1).client.solrClient, id, 1000, i1, 108, t1, + "specific doc!"); + } + + commit(); + + checkShardConsistency(true, false); + + query("q", "*:*", "sort", "n_tl1 desc"); + + + cloudClient.setDefaultCollection(DEFAULT_COLLECTION); + + long numFound2 = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); + + assertEquals(numFound1 + 1, numFound2); + + SolrInputDocument doc = new SolrInputDocument(); + doc.addField("id", 1001); + + controlClient.add(doc); + + // try adding a doc with CloudSolrServer + UpdateRequest ureq = new UpdateRequest(); + ureq.add(doc); + // ureq.setParam("update.chain", DISTRIB_UPDATE_CHAIN); + + try { + ureq.process(cloudClient); + } catch(SolrServerException e){ + // try again + Thread.sleep(3500); + ureq.process(cloudClient); + } + + commit(); + + query("q", "*:*", "sort", "n_tl1 desc"); + + long numFound3 = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound(); + + // lets just check that the one doc since last commit made it in... + assertEquals(numFound2 + 1, numFound3); + + // test debugging + testDebugQueries(); + + if (VERBOSE) { + System.err.println(controlClient.query(new SolrQuery("*:*")).getResults() + .getNumFound()); + + for (SolrClient client : clients) { + try { + SolrQuery q = new SolrQuery("*:*"); + q.set("distrib", false); + System.err.println(client.query(q).getResults() + .getNumFound()); + } catch (Exception e) { + + } + } + } + // TODO: This test currently fails because debug info is obtained only + // on shards with matches. + // query("q","matchesnothing","fl","*,score", "debugQuery", "true"); + + // this should trigger a recovery phase on deadShard + deadShard.jetty.start(); + + // make sure we have published we are recovering + Thread.sleep(1500); + + waitForRecoveriesToFinish(false); + + deadShardCount = shardToJetty.get(SHARD1).get(0).client.solrClient + .query(query).getResults().getNumFound(); + // if we properly recovered, we should now have the couple missing docs that + // came in while shard was down + checkShardConsistency(true, false); + + + // recover over 100 docs so we do more than just peer sync (replicate recovery) + chaosMonkey.stopJetty(deadShard); + + for (int i = 0; i < 226; i++) { + doc = new SolrInputDocument(); + doc.addField("id", 2000 + i); + controlClient.add(doc); + ureq = new UpdateRequest(); + ureq.add(doc); + // ureq.setParam("update.chain", DISTRIB_UPDATE_CHAIN); + ureq.process(cloudClient); + } + commit(); + + Thread.sleep(1500); + + deadShard.jetty.start(); + + // make sure we have published we are recovering + Thread.sleep(1500); + + waitForThingsToLevelOut(1, TimeUnit.MINUTES); + + Thread.sleep(500); + + waitForRecoveriesToFinish(false); + + checkShardConsistency(true, false); + + // try a backup command + try(final HttpSolrClient client = getHttpSolrClient((String) shardToJetty.get(SHARD2).get(0).info.get("base_url"))) { + final String backupName = "the_backup"; + ModifiableSolrParams params = new ModifiableSolrParams(); + params.set("qt", ReplicationHandler.PATH); + params.set("command", "backup"); + params.set("name", backupName); + final Path location = FilterPath.unwrap(createTempDir()).toRealPath(); + // Allow non-standard location outside SOLR_HOME + jettys.forEach(j -> j.getCoreContainer().getAllowPaths().add(location)); + params.set("location", location.toString()); + + QueryRequest request = new QueryRequest(params); + client.request(request, DEFAULT_TEST_COLLECTION_NAME); + + + final BackupStatusChecker backupStatus + = new BackupStatusChecker(client, "/" + DEFAULT_TEST_COLLECTION_NAME + "/replication"); + final String backupDirName = backupStatus.waitForBackupSuccess(backupName, 30); + assertTrue("Backup dir does not exist: " + backupDirName, + Files.exists(location.resolve(backupDirName))); + } + + } + + private void addNewReplica() throws Exception { + + waitForRecoveriesToFinish(false); + + // new server should be part of first shard + // how many docs are on the new shard? + for (CloudJettyRunner cjetty : shardToJetty.get(SHARD1)) { + if (VERBOSE) System.err.println("shard1 total:" + + cjetty.client.solrClient.query(new SolrQuery("*:*")).getResults().getNumFound()); + } + for (CloudJettyRunner cjetty : shardToJetty.get(SHARD2)) { + if (VERBOSE) System.err.println("shard2 total:" + + cjetty.client.solrClient.query(new SolrQuery("*:*")).getResults().getNumFound()); + } + + checkShardConsistency(SHARD1); + checkShardConsistency(SHARD2); + + assertDocCounts(VERBOSE); + } + + private void testDebugQueries() throws Exception { + handle.put("explain", SKIPVAL); + handle.put("debug", UNORDERED); + handle.put("time", SKIPVAL); + handle.put("track", SKIP); + query("q", "now their fox sat had put", "fl", "*,score", + CommonParams.DEBUG_QUERY, "true"); + query("q", "id_i1:[1 TO 5]", CommonParams.DEBUG_QUERY, "true"); + query("q", "id_i1:[1 TO 5]", CommonParams.DEBUG, CommonParams.TIMING); + query("q", "id_i1:[1 TO 5]", CommonParams.DEBUG, CommonParams.RESULTS); + query("q", "id_i1:[1 TO 5]", CommonParams.DEBUG, CommonParams.QUERY); + } + +} From 77f7be89848afd10d4f2afa4adb643c19940b38b Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 12:47:56 +0200 Subject: [PATCH 13/52] HDFS contrib module: separate HDFS test classes from Core test classes (7.: HdfsRecoveryZkTest) - HdfsRecoveryZkTest extends RecoveryZkTest - introduced AbstractRecoveryZkTestBase --- .../configsets/cloud-hdfs/conf/schema.xml | 28 ++++ .../configsets/cloud-hdfs/conf/solrconfig.xml | 52 ++++++ .../solr/cloud/hdfs/HdfsRecoveryZkTest.java | 5 +- .../org/apache/solr/cloud/RecoveryZkTest.java | 133 +-------------- .../cloud/AbstractRecoveryZkTestBase.java | 156 ++++++++++++++++++ 5 files changed, 245 insertions(+), 129 deletions(-) create mode 100644 solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/schema.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractRecoveryZkTestBase.java diff --git a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/schema.xml b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/schema.xml new file mode 100644 index 00000000000..52a63f41944 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/schema.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml new file mode 100644 index 00000000000..648e92ea538 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + hdfs + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + + + explicit + true + text + + + + + diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java index 45192fe0dd8..4b27b4857d2 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java @@ -22,7 +22,7 @@ import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.RecoveryZkTest; +import org.apache.solr.cloud.AbstractRecoveryZkTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -34,7 +34,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsRecoveryZkTest extends RecoveryZkTest { +public class HdfsRecoveryZkTest extends AbstractRecoveryZkTestBase { private static MiniDFSCluster dfsCluster; @BeforeClass @@ -56,4 +56,5 @@ public static void teardownClass() throws Exception { } } } + } diff --git a/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java b/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java index a5f1e063148..3671cddc9c0 100644 --- a/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java @@ -16,141 +16,20 @@ */ package org.apache.solr.cloud; -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - import org.apache.lucene.util.LuceneTestCase.Slow; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.embedded.JettySolrRunner; -import org.apache.solr.client.solrj.impl.HttpSolrClient; -import org.apache.solr.client.solrj.request.CollectionAdminRequest; -import org.apache.solr.client.solrj.request.UpdateRequest; -import org.apache.solr.common.cloud.DocCollection; -import org.apache.solr.common.cloud.Replica; -import org.apache.solr.common.cloud.Slice; -import org.junit.After; -import org.junit.BeforeClass; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +/* + * Implementation moved to AbstractRecoveryZkTestBase as it is used by HDFS contrib tests. + */ @Slow -public class RecoveryZkTest extends SolrCloudTestCase { - - private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - @BeforeClass - public static void setupCluster() throws Exception { - configureCluster(2) - .addConfig("conf", configset("cloud-minimal")) - .configure(); - } - - private final List threads = new ArrayList<>(); - - @After - public void stopThreads() throws InterruptedException { - for (StoppableIndexingThread t : threads) { - t.safeStop(); - } - for (StoppableIndexingThread t : threads) { - t.join(); - } - threads.clear(); - } +public class RecoveryZkTest extends AbstractRecoveryZkTestBase { @Test + @Override //commented 2-Aug-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 28-June-2018 public void test() throws Exception { - - final String collection = "recoverytest"; - - CollectionAdminRequest.createCollection(collection, "conf", 1, 2) - .process(cluster.getSolrClient()); - waitForState("Expected a collection with one shard and two replicas", collection, clusterShape(1, 2)); - cluster.getSolrClient().setDefaultCollection(collection); - - // start a couple indexing threads - - int[] maxDocList = new int[] {300, 700, 1200, 1350, 3000}; - int[] maxDocNightlyList = new int[] {3000, 7000, 12000, 30000, 45000, 60000}; - - int maxDoc; - if (!TEST_NIGHTLY) { - maxDoc = maxDocList[random().nextInt(maxDocList.length - 1)]; - } else { - maxDoc = maxDocNightlyList[random().nextInt(maxDocList.length - 1)]; - } - log.info("Indexing {} documents", maxDoc); - - final StoppableIndexingThread indexThread - = new StoppableIndexingThread(null, cluster.getSolrClient(), "1", true, maxDoc, 1, true); - threads.add(indexThread); - indexThread.start(); - - final StoppableIndexingThread indexThread2 - = new StoppableIndexingThread(null, cluster.getSolrClient(), "2", true, maxDoc, 1, true); - threads.add(indexThread2); - indexThread2.start(); - - // give some time to index... - int[] waitTimes = new int[] {200, 2000, 3000}; - Thread.sleep(waitTimes[random().nextInt(waitTimes.length - 1)]); - - // bring shard replica down - DocCollection state = getCollectionState(collection); - Replica leader = state.getLeader("shard1"); - Replica replica = getRandomReplica(state.getSlice("shard1"), (r) -> leader != r); - - JettySolrRunner jetty = cluster.getReplicaJetty(replica); - jetty.stop(); - - // wait a moment - lets allow some docs to be indexed so replication time is non 0 - Thread.sleep(waitTimes[random().nextInt(waitTimes.length - 1)]); - - // bring shard replica up - jetty.start(); - - // make sure replication can start - Thread.sleep(3000); - - // stop indexing threads - indexThread.safeStop(); - indexThread2.safeStop(); - - indexThread.join(); - indexThread2.join(); - - new UpdateRequest() - .commit(cluster.getSolrClient(), collection); - - cluster.getSolrClient().waitForState(collection, 120, TimeUnit.SECONDS, clusterShape(1, 2)); - - // test that leader and replica have same doc count - state = getCollectionState(collection); - assertShardConsistency(state.getSlice("shard1"), true); - - } - - private void assertShardConsistency(Slice shard, boolean expectDocs) throws Exception { - List replicas = shard.getReplicas(r -> r.getState() == Replica.State.ACTIVE); - long[] numCounts = new long[replicas.size()]; - int i = 0; - for (Replica replica : replicas) { - try (HttpSolrClient client = new HttpSolrClient.Builder(replica.getCoreUrl()) - .withHttpClient(cluster.getSolrClient().getHttpClient()).build()) { - numCounts[i] = client.query(new SolrQuery("*:*").add("distrib", "false")).getResults().getNumFound(); - i++; - } - } - for (int j = 1; j < replicas.size(); j++) { - if (numCounts[j] != numCounts[j - 1]) - fail("Mismatch in counts between replicas"); // TODO improve this! - if (numCounts[j] == 0 && expectDocs) - fail("Expected docs on shard " + shard.getName() + " but found none"); - } + super.test(); } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRecoveryZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRecoveryZkTestBase.java new file mode 100644 index 00000000000..388980ec2bd --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRecoveryZkTestBase.java @@ -0,0 +1,156 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud; + +import java.lang.invoke.MethodHandles; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.apache.lucene.util.LuceneTestCase.Slow; +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.embedded.JettySolrRunner; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.request.UpdateRequest; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.junit.After; +import org.junit.BeforeClass; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Slow +public abstract class AbstractRecoveryZkTestBase extends SolrCloudTestCase { + + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + @BeforeClass + public static void setupCluster() throws Exception { + configureCluster(2) + .addConfig("conf", configset("cloud-minimal")) + .configure(); + } + + private final List threads = new ArrayList<>(); + + @After + public void stopThreads() throws InterruptedException { + for (StoppableIndexingThread t : threads) { + t.safeStop(); + } + for (StoppableIndexingThread t : threads) { + t.join(); + } + threads.clear(); + } + + @Test + //commented 2-Aug-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 28-June-2018 + public void test() throws Exception { + + final String collection = "recoverytest"; + + CollectionAdminRequest.createCollection(collection, "conf", 1, 2) + .process(cluster.getSolrClient()); + waitForState("Expected a collection with one shard and two replicas", collection, clusterShape(1, 2)); + cluster.getSolrClient().setDefaultCollection(collection); + + // start a couple indexing threads + + int[] maxDocList = new int[] {300, 700, 1200, 1350, 3000}; + int[] maxDocNightlyList = new int[] {3000, 7000, 12000, 30000, 45000, 60000}; + + int maxDoc; + if (!TEST_NIGHTLY) { + maxDoc = maxDocList[random().nextInt(maxDocList.length - 1)]; + } else { + maxDoc = maxDocNightlyList[random().nextInt(maxDocList.length - 1)]; + } + log.info("Indexing {} documents", maxDoc); + + final StoppableIndexingThread indexThread + = new StoppableIndexingThread(null, cluster.getSolrClient(), "1", true, maxDoc, 1, true); + threads.add(indexThread); + indexThread.start(); + + final StoppableIndexingThread indexThread2 + = new StoppableIndexingThread(null, cluster.getSolrClient(), "2", true, maxDoc, 1, true); + threads.add(indexThread2); + indexThread2.start(); + + // give some time to index... + int[] waitTimes = new int[] {200, 2000, 3000}; + Thread.sleep(waitTimes[random().nextInt(waitTimes.length - 1)]); + + // bring shard replica down + DocCollection state = getCollectionState(collection); + Replica leader = state.getLeader("shard1"); + Replica replica = getRandomReplica(state.getSlice("shard1"), (r) -> leader != r); + + JettySolrRunner jetty = cluster.getReplicaJetty(replica); + jetty.stop(); + + // wait a moment - lets allow some docs to be indexed so replication time is non 0 + Thread.sleep(waitTimes[random().nextInt(waitTimes.length - 1)]); + + // bring shard replica up + jetty.start(); + + // make sure replication can start + Thread.sleep(3000); + + // stop indexing threads + indexThread.safeStop(); + indexThread2.safeStop(); + + indexThread.join(); + indexThread2.join(); + + new UpdateRequest() + .commit(cluster.getSolrClient(), collection); + + cluster.getSolrClient().waitForState(collection, 120, TimeUnit.SECONDS, clusterShape(1, 2)); + + // test that leader and replica have same doc count + state = getCollectionState(collection); + assertShardConsistency(state.getSlice("shard1"), true); + + } + + private void assertShardConsistency(Slice shard, boolean expectDocs) throws Exception { + List replicas = shard.getReplicas(r -> r.getState() == Replica.State.ACTIVE); + long[] numCounts = new long[replicas.size()]; + int i = 0; + for (Replica replica : replicas) { + try (HttpSolrClient client = new HttpSolrClient.Builder(replica.getCoreUrl()) + .withHttpClient(cluster.getSolrClient().getHttpClient()).build()) { + numCounts[i] = client.query(new SolrQuery("*:*").add("distrib", "false")).getResults().getNumFound(); + i++; + } + } + for (int j = 1; j < replicas.size(); j++) { + if (numCounts[j] != numCounts[j - 1]) + fail("Mismatch in counts between replicas"); // TODO improve this! + if (numCounts[j] == 0 && expectDocs) + fail("Expected docs on shard " + shard.getName() + " but found none"); + } + } + +} From e90b3a51ecffac97c14890d82deb680bf3dfcc58 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 13:15:44 +0200 Subject: [PATCH 14/52] HDFS contrib module: separate HDFS test classes from Core test classes (8.: MoveReplicaTest) - MoveReplicaHDFSTest extends MoveReplicaTest - introduced AbstractMoveReplicaTestBase --- .../solr/cloud/MoveReplicaHDFSTest.java | 13 +- .../apache/solr/cloud/MoveReplicaTest.java | 346 +--------------- .../cloud/AbstractMoveReplicaTestBase.java | 377 ++++++++++++++++++ 3 files changed, 388 insertions(+), 348 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractMoveReplicaTestBase.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java index 23fe32bffc0..aee051e425d 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java @@ -20,6 +20,7 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import org.apache.hadoop.hdfs.MiniDFSCluster; +import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase.AwaitsFix; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.lucene.util.QuickPatchThreadsFilter; @@ -40,7 +41,7 @@ }) @TimeoutSuite(millis = TimeUnits.HOUR) @AwaitsFix(bugUrl="https://issues.apache.org/jira/browse/SOLR-13924") -public class MoveReplicaHDFSTest extends MoveReplicaTest { +public class MoveReplicaHDFSTest extends AbstractMoveReplicaTestBase { private static MiniDFSCluster dfsCluster; @BeforeClass @@ -65,7 +66,7 @@ protected String getConfigSet() { @Test public void testNormalMove() throws Exception { inPlaceMove = false; - test(); + super.test(); } @Test @@ -78,13 +79,9 @@ public void testNormalMove() throws Exception { @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 14-Oct-2018 public void testNormalFailedMove() throws Exception { inPlaceMove = false; - testFailedMove(); - } - - @Test - @AwaitsFix(bugUrl="https://issues.apache.org/jira/browse/SOLR-12080") // added 03-Oct-2018 - public void testFailedMove() throws Exception { super.testFailedMove(); } + + } diff --git a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaTest.java b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaTest.java index ff96d6cbf3c..1d4d34ca9f6 100644 --- a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaTest.java @@ -17,226 +17,18 @@ package org.apache.solr.cloud; -import java.io.IOException; -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.solr.client.solrj.SolrClient; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.embedded.JettySolrRunner; -import org.apache.solr.client.solrj.impl.CloudSolrClient; -import org.apache.solr.client.solrj.impl.HttpSolrClient; -import org.apache.solr.client.solrj.request.CollectionAdminRequest; -import org.apache.solr.client.solrj.request.CoreAdminRequest; -import org.apache.solr.client.solrj.response.CoreAdminResponse; -import org.apache.solr.client.solrj.response.RequestStatusState; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.common.cloud.DocCollection; -import org.apache.solr.common.cloud.Replica; -import org.apache.solr.common.cloud.Slice; -import org.apache.solr.common.util.NamedList; -import org.apache.solr.util.IdUtils; -import org.junit.After; -import org.junit.Before; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class MoveReplicaTest extends SolrCloudTestCase { - private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - // used by MoveReplicaHDFSTest - protected boolean inPlaceMove = true; - protected boolean isCollectionApiDistributed = false; - - protected String getConfigSet() { - return "cloud-dynamic"; - } - @Before - public void beforeTest() throws Exception { - inPlaceMove = true; - - configureCluster(4) - .addConfig("conf1", configset(getConfigSet())) - .addConfig("conf2", configset(getConfigSet())) - .withSolrXml(TEST_PATH().resolve("solr.xml")) - .configure(); - - // If Collection API is distributed let's not wait for Overseer. - if (isCollectionApiDistributed = new CollectionAdminRequest.RequestApiDistributedProcessing().process(cluster.getSolrClient()).getIsCollectionApiDistributed()) { - return; - } - - NamedList overSeerStatus = cluster.getSolrClient().request(CollectionAdminRequest.getOverseerStatus()); - JettySolrRunner overseerJetty = null; - String overseerLeader = (String) overSeerStatus.get("leader"); - for (JettySolrRunner jetty : cluster.getJettySolrRunners()) { - if (jetty.getNodeName().equals(overseerLeader)) { - overseerJetty = jetty; - break; - } - } - if (overseerJetty == null) { - fail("no overseer leader!"); - } - } +/** + * Implementation moved to AbstractMoveReplicaTestBase as it is referenced by HDFS contrib module tests. + */ +public class MoveReplicaTest extends AbstractMoveReplicaTestBase { - @After - public void afterTest() throws Exception { - try { - shutdownCluster(); - } finally { - super.tearDown(); - } - } @Test // commented out on: 17-Feb-2019 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018 public void test() throws Exception { - String coll = getTestClass().getSimpleName() + "_coll_" + inPlaceMove; - if (log.isInfoEnabled()) { - log.info("total_jettys: {}", cluster.getJettySolrRunners().size()); - } - int REPLICATION = 2; - - CloudSolrClient cloudClient = cluster.getSolrClient(); - - // random create tlog or pull type replicas with nrt - boolean isTlog = random().nextBoolean(); - CollectionAdminRequest.Create create = CollectionAdminRequest.createCollection(coll, "conf1", 2, 1, isTlog ? 1 : 0, !isTlog ? 1 : 0); - cloudClient.request(create); - - addDocs(coll, 100); - - Replica replica = getRandomReplica(coll, cloudClient); - Set liveNodes = cloudClient.getZkStateReader().getClusterState().getLiveNodes(); - ArrayList l = new ArrayList<>(liveNodes); - Collections.shuffle(l, random()); - String targetNode = null; - for (String node : liveNodes) { - if (!replica.getNodeName().equals(node)) { - targetNode = node; - break; - } - } - assertNotNull(targetNode); - String shardId = null; - for (Slice slice : cloudClient.getZkStateReader().getClusterState().getCollection(coll).getSlices()) { - if (slice.getReplicas().contains(replica)) { - shardId = slice.getName(); - } - } - - int sourceNumCores = getNumOfCores(cloudClient, replica.getNodeName(), coll, replica.getType().name()); - int targetNumCores = getNumOfCores(cloudClient, targetNode, coll, replica.getType().name()); - - CollectionAdminRequest.MoveReplica moveReplica = createMoveReplicaRequest(coll, replica, targetNode); - moveReplica.setInPlaceMove(inPlaceMove); - String asyncId = IdUtils.randomId(); - moveReplica.processAsync(asyncId, cloudClient); - CollectionAdminRequest.RequestStatus requestStatus = CollectionAdminRequest.requestStatus(asyncId); - // wait for async request success - boolean success = false; - for (int i = 0; i < 200; i++) { - CollectionAdminRequest.RequestStatusResponse rsp = requestStatus.process(cloudClient); - if (rsp.getRequestStatus() == RequestStatusState.COMPLETED) { - success = true; - break; - } - assertNotSame(rsp.getRequestStatus(), RequestStatusState.FAILED); - Thread.sleep(500); - } - assertTrue(success); - assertEquals("should be one less core on the source node!", sourceNumCores - 1, getNumOfCores(cloudClient, replica.getNodeName(), coll, replica.getType().name())); - assertEquals("should be one more core on target node!", targetNumCores + 1, getNumOfCores(cloudClient, targetNode, coll, replica.getType().name())); - // wait for recovery - boolean recovered = false; - for (int i = 0; i < 300; i++) { - DocCollection collState = getCollectionState(coll); - log.debug("###### {}", collState); - Collection replicas = collState.getSlice(shardId).getReplicas(); - boolean allActive = true; - boolean hasLeaders = true; - if (replicas != null && !replicas.isEmpty()) { - for (Replica r : replicas) { - if (!r.getNodeName().equals(targetNode)) { - continue; - } - if (!r.isActive(Collections.singleton(targetNode))) { - log.info("Not active: {}", r); - allActive = false; - } - } - } else { - allActive = false; - } - for (Slice slice : collState.getSlices()) { - if (slice.getLeader() == null) { - hasLeaders = false; - } - } - if (allActive && hasLeaders) { - // check the number of active replicas - assertEquals("total number of replicas", REPLICATION, replicas.size()); - recovered = true; - break; - } else { - log.info("--- waiting, allActive={}, hasLeaders={}", allActive, hasLeaders); - Thread.sleep(1000); - } - } - assertTrue("replica never fully recovered", recovered); - - assertEquals(100, cluster.getSolrClient().query(coll, new SolrQuery("*:*")).getResults().getNumFound()); - - moveReplica = createMoveReplicaRequest(coll, replica, targetNode, shardId); - moveReplica.setInPlaceMove(inPlaceMove); - moveReplica.process(cloudClient); - checkNumOfCores(cloudClient, replica.getNodeName(), coll, sourceNumCores); - // wait for recovery - recovered = false; - for (int i = 0; i < 300; i++) { - DocCollection collState = getCollectionState(coll); - log.debug("###### {}", collState); - Collection replicas = collState.getSlice(shardId).getReplicas(); - boolean allActive = true; - boolean hasLeaders = true; - if (replicas != null && !replicas.isEmpty()) { - for (Replica r : replicas) { - if (!r.getNodeName().equals(replica.getNodeName())) { - continue; - } - if (!r.isActive(Collections.singleton(replica.getNodeName()))) { - log.info("Not active yet: {}", r); - allActive = false; - } - } - } else { - allActive = false; - } - for (Slice slice : collState.getSlices()) { - if (slice.getLeader() == null) { - hasLeaders = false; - } - } - if (allActive && hasLeaders) { - assertEquals("total number of replicas", REPLICATION, replicas.size()); - recovered = true; - break; - } else { - Thread.sleep(1000); - } - } - assertTrue("replica never fully recovered", recovered); - - assertEquals(100, cluster.getSolrClient().query(coll, new SolrQuery("*:*")).getResults().getNumFound()); + super.test(); } //Commented out 5-Dec-2017 @@ -246,132 +38,6 @@ public void test() throws Exception { //17-Aug-2018 commented @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018 // commented out on: 17-Feb-2019 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018 public void testFailedMove() throws Exception { - String coll = getTestClass().getSimpleName() + "_failed_coll_" + inPlaceMove; - int REPLICATION = 2; - - CloudSolrClient cloudClient = cluster.getSolrClient(); - - // random create tlog or pull type replicas with nrt - boolean isTlog = random().nextBoolean(); - CollectionAdminRequest.Create create = CollectionAdminRequest.createCollection(coll, "conf1", 2, 1, isTlog ? 1 : 0, !isTlog ? 1 : 0); - cloudClient.request(create); - - addDocs(coll, 100); - - NamedList overSeerStatus = cluster.getSolrClient().request(CollectionAdminRequest.getOverseerStatus()); - String overseerLeader = (String) overSeerStatus.get("leader"); - - // don't kill overseer in this test - Replica replica; - int count = 10; - do { - replica = getRandomReplica(coll, cloudClient); - } while (!replica.getNodeName().equals(overseerLeader) && count-- > 0); - assertNotNull("could not find non-overseer replica???", replica); - Set liveNodes = cloudClient.getZkStateReader().getClusterState().getLiveNodes(); - ArrayList l = new ArrayList<>(liveNodes); - Collections.shuffle(l, random()); - String targetNode = null; - for (String node : liveNodes) { - if (!replica.getNodeName().equals(node) && (isCollectionApiDistributed || !overseerLeader.equals(node))) { - targetNode = node; - break; - } - } - assertNotNull(targetNode); - CollectionAdminRequest.MoveReplica moveReplica = createMoveReplicaRequest(coll, replica, targetNode); - moveReplica.setInPlaceMove(inPlaceMove); - // start moving - String asyncId = IdUtils.randomId(); - moveReplica.processAsync(asyncId, cloudClient); - // shut down target node - for (int i = 0; i < cluster.getJettySolrRunners().size(); i++) { - if (cluster.getJettySolrRunner(i).getNodeName().equals(targetNode)) { - JettySolrRunner j = cluster.stopJettySolrRunner(i); - cluster.waitForJettyToStop(j); - break; - } - } - CollectionAdminRequest.RequestStatus requestStatus = CollectionAdminRequest.requestStatus(asyncId); - // wait for async request success - boolean success = true; - for (int i = 0; i < 200; i++) { - CollectionAdminRequest.RequestStatusResponse rsp = requestStatus.process(cloudClient); - assertNotSame(rsp.getRequestStatus().toString(), rsp.getRequestStatus(), RequestStatusState.COMPLETED); - if (rsp.getRequestStatus() == RequestStatusState.FAILED) { - success = false; - break; - } - Thread.sleep(500); - } - assertFalse(success); - - if (log.isInfoEnabled()) { - log.info("--- current collection state: {}", cloudClient.getZkStateReader().getClusterState().getCollection(coll)); - } - assertEquals(100, cluster.getSolrClient().query(coll, new SolrQuery("*:*")).getResults().getNumFound()); - } - - private CollectionAdminRequest.MoveReplica createMoveReplicaRequest(String coll, Replica replica, String targetNode, String shardId) { - return new CollectionAdminRequest.MoveReplica(coll, shardId, targetNode, replica.getNodeName()); - } - - private CollectionAdminRequest.MoveReplica createMoveReplicaRequest(String coll, Replica replica, String targetNode) { - return new CollectionAdminRequest.MoveReplica(coll, replica.getName(), targetNode); - } - - private Replica getRandomReplica(String coll, CloudSolrClient cloudClient) { - List replicas = cloudClient.getZkStateReader().getClusterState().getCollection(coll).getReplicas(); - Collections.shuffle(replicas, random()); - return replicas.get(0); - } - - private void checkNumOfCores(CloudSolrClient cloudClient, String nodeName, String collectionName, int expectedCores) throws IOException, SolrServerException { - assertEquals(nodeName + " does not have expected number of cores", expectedCores, getNumOfCores(cloudClient, nodeName, collectionName)); - } - - private int getNumOfCores(CloudSolrClient cloudClient, String nodeName, String collectionName) throws IOException, SolrServerException { - return getNumOfCores(cloudClient, nodeName, collectionName, null); - } - - private int getNumOfCores(CloudSolrClient cloudClient, String nodeName, String collectionName, String replicaType) throws IOException, SolrServerException { - try (HttpSolrClient coreclient = getHttpSolrClient(cloudClient.getZkStateReader().getBaseUrlForNodeName(nodeName))) { - CoreAdminResponse status = CoreAdminRequest.getStatus(null, coreclient); - if (status.getCoreStatus().size() == 0) { - return 0; - } - if (collectionName == null && replicaType == null) { - return status.getCoreStatus().size(); - } - // filter size by collection name - int size = 0; - for (Map.Entry> stringNamedListEntry : status.getCoreStatus()) { - if (collectionName != null) { - String coll = (String) stringNamedListEntry.getValue().findRecursive("cloud", "collection"); - if (!collectionName.equals(coll)) { - continue; - } - } - if (replicaType != null) { - String type = (String) stringNamedListEntry.getValue().findRecursive("cloud", "replicaType"); - if (!replicaType.equals(type)) { - continue; - } - } - size++; - } - return size; - } - } - - protected void addDocs(String collection, int numDocs) throws Exception { - SolrClient solrClient = cluster.getSolrClient(); - for (int docId = 1; docId <= numDocs; docId++) { - SolrInputDocument doc = new SolrInputDocument(); - doc.addField("id", docId); - solrClient.add(collection, doc); - } - solrClient.commit(collection); - Thread.sleep(5000); + super.testFailedMove(); } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractMoveReplicaTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractMoveReplicaTestBase.java new file mode 100644 index 00000000000..ba893ff236a --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractMoveReplicaTestBase.java @@ -0,0 +1,377 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.solr.cloud; + +import java.io.IOException; +import java.lang.invoke.MethodHandles; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.solr.client.solrj.SolrClient; +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.embedded.JettySolrRunner; +import org.apache.solr.client.solrj.impl.CloudSolrClient; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.request.CoreAdminRequest; +import org.apache.solr.client.solrj.response.CoreAdminResponse; +import org.apache.solr.client.solrj.response.RequestStatusState; +import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.apache.solr.common.util.NamedList; +import org.apache.solr.util.IdUtils; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public abstract class AbstractMoveReplicaTestBase extends SolrCloudTestCase { + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + // used by MoveReplicaHDFSTest + protected boolean inPlaceMove = true; + protected boolean isCollectionApiDistributed = false; + + protected String getConfigSet() { + return "cloud-dynamic"; + } + + @Before + public void beforeTest() throws Exception { + inPlaceMove = true; + + configureCluster(4) + .addConfig("conf1", configset(getConfigSet())) + .addConfig("conf2", configset(getConfigSet())) + .withSolrXml(TEST_PATH().resolve("solr.xml")) + .configure(); + + // If Collection API is distributed let's not wait for Overseer. + if (isCollectionApiDistributed = new CollectionAdminRequest.RequestApiDistributedProcessing().process(cluster.getSolrClient()).getIsCollectionApiDistributed()) { + return; + } + + NamedList overSeerStatus = cluster.getSolrClient().request(CollectionAdminRequest.getOverseerStatus()); + JettySolrRunner overseerJetty = null; + String overseerLeader = (String) overSeerStatus.get("leader"); + for (JettySolrRunner jetty : cluster.getJettySolrRunners()) { + if (jetty.getNodeName().equals(overseerLeader)) { + overseerJetty = jetty; + break; + } + } + if (overseerJetty == null) { + fail("no overseer leader!"); + } + } + + @After + public void afterTest() throws Exception { + try { + shutdownCluster(); + } finally { + super.tearDown(); + } + } + + @Test + // commented out on: 17-Feb-2019 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018 + public void test() throws Exception { + String coll = getTestClass().getSimpleName() + "_coll_" + inPlaceMove; + if (log.isInfoEnabled()) { + log.info("total_jettys: {}", cluster.getJettySolrRunners().size()); + } + int REPLICATION = 2; + + CloudSolrClient cloudClient = cluster.getSolrClient(); + + // random create tlog or pull type replicas with nrt + boolean isTlog = random().nextBoolean(); + CollectionAdminRequest.Create create = CollectionAdminRequest.createCollection(coll, "conf1", 2, 1, isTlog ? 1 : 0, !isTlog ? 1 : 0); + cloudClient.request(create); + + addDocs(coll, 100); + + Replica replica = getRandomReplica(coll, cloudClient); + Set liveNodes = cloudClient.getZkStateReader().getClusterState().getLiveNodes(); + ArrayList l = new ArrayList<>(liveNodes); + Collections.shuffle(l, random()); + String targetNode = null; + for (String node : liveNodes) { + if (!replica.getNodeName().equals(node)) { + targetNode = node; + break; + } + } + assertNotNull(targetNode); + String shardId = null; + for (Slice slice : cloudClient.getZkStateReader().getClusterState().getCollection(coll).getSlices()) { + if (slice.getReplicas().contains(replica)) { + shardId = slice.getName(); + } + } + + int sourceNumCores = getNumOfCores(cloudClient, replica.getNodeName(), coll, replica.getType().name()); + int targetNumCores = getNumOfCores(cloudClient, targetNode, coll, replica.getType().name()); + + CollectionAdminRequest.MoveReplica moveReplica = createMoveReplicaRequest(coll, replica, targetNode); + moveReplica.setInPlaceMove(inPlaceMove); + String asyncId = IdUtils.randomId(); + moveReplica.processAsync(asyncId, cloudClient); + CollectionAdminRequest.RequestStatus requestStatus = CollectionAdminRequest.requestStatus(asyncId); + // wait for async request success + boolean success = false; + for (int i = 0; i < 200; i++) { + CollectionAdminRequest.RequestStatusResponse rsp = requestStatus.process(cloudClient); + if (rsp.getRequestStatus() == RequestStatusState.COMPLETED) { + success = true; + break; + } + assertNotSame(rsp.getRequestStatus(), RequestStatusState.FAILED); + Thread.sleep(500); + } + assertTrue(success); + assertEquals("should be one less core on the source node!", sourceNumCores - 1, getNumOfCores(cloudClient, replica.getNodeName(), coll, replica.getType().name())); + assertEquals("should be one more core on target node!", targetNumCores + 1, getNumOfCores(cloudClient, targetNode, coll, replica.getType().name())); + // wait for recovery + boolean recovered = false; + for (int i = 0; i < 300; i++) { + DocCollection collState = getCollectionState(coll); + log.debug("###### {}", collState); + Collection replicas = collState.getSlice(shardId).getReplicas(); + boolean allActive = true; + boolean hasLeaders = true; + if (replicas != null && !replicas.isEmpty()) { + for (Replica r : replicas) { + if (!r.getNodeName().equals(targetNode)) { + continue; + } + if (!r.isActive(Collections.singleton(targetNode))) { + log.info("Not active: {}", r); + allActive = false; + } + } + } else { + allActive = false; + } + for (Slice slice : collState.getSlices()) { + if (slice.getLeader() == null) { + hasLeaders = false; + } + } + if (allActive && hasLeaders) { + // check the number of active replicas + assertEquals("total number of replicas", REPLICATION, replicas.size()); + recovered = true; + break; + } else { + log.info("--- waiting, allActive={}, hasLeaders={}", allActive, hasLeaders); + Thread.sleep(1000); + } + } + assertTrue("replica never fully recovered", recovered); + + assertEquals(100, cluster.getSolrClient().query(coll, new SolrQuery("*:*")).getResults().getNumFound()); + + moveReplica = createMoveReplicaRequest(coll, replica, targetNode, shardId); + moveReplica.setInPlaceMove(inPlaceMove); + moveReplica.process(cloudClient); + checkNumOfCores(cloudClient, replica.getNodeName(), coll, sourceNumCores); + // wait for recovery + recovered = false; + for (int i = 0; i < 300; i++) { + DocCollection collState = getCollectionState(coll); + log.debug("###### {}", collState); + Collection replicas = collState.getSlice(shardId).getReplicas(); + boolean allActive = true; + boolean hasLeaders = true; + if (replicas != null && !replicas.isEmpty()) { + for (Replica r : replicas) { + if (!r.getNodeName().equals(replica.getNodeName())) { + continue; + } + if (!r.isActive(Collections.singleton(replica.getNodeName()))) { + log.info("Not active yet: {}", r); + allActive = false; + } + } + } else { + allActive = false; + } + for (Slice slice : collState.getSlices()) { + if (slice.getLeader() == null) { + hasLeaders = false; + } + } + if (allActive && hasLeaders) { + assertEquals("total number of replicas", REPLICATION, replicas.size()); + recovered = true; + break; + } else { + Thread.sleep(1000); + } + } + assertTrue("replica never fully recovered", recovered); + + assertEquals(100, cluster.getSolrClient().query(coll, new SolrQuery("*:*")).getResults().getNumFound()); + } + + //Commented out 5-Dec-2017 + // @AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-11458") + @Test + // 12-Jun-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 17-Mar-2018 This JIRA is fixed, but this test still fails + //17-Aug-2018 commented @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018 + // commented out on: 17-Feb-2019 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // annotated on: 24-Dec-2018 + public void testFailedMove() throws Exception { + String coll = getTestClass().getSimpleName() + "_failed_coll_" + inPlaceMove; + int REPLICATION = 2; + + CloudSolrClient cloudClient = cluster.getSolrClient(); + + // random create tlog or pull type replicas with nrt + boolean isTlog = random().nextBoolean(); + CollectionAdminRequest.Create create = CollectionAdminRequest.createCollection(coll, "conf1", 2, 1, isTlog ? 1 : 0, !isTlog ? 1 : 0); + cloudClient.request(create); + + addDocs(coll, 100); + + NamedList overSeerStatus = cluster.getSolrClient().request(CollectionAdminRequest.getOverseerStatus()); + String overseerLeader = (String) overSeerStatus.get("leader"); + + // don't kill overseer in this test + Replica replica; + int count = 10; + do { + replica = getRandomReplica(coll, cloudClient); + } while (!replica.getNodeName().equals(overseerLeader) && count-- > 0); + assertNotNull("could not find non-overseer replica???", replica); + Set liveNodes = cloudClient.getZkStateReader().getClusterState().getLiveNodes(); + ArrayList l = new ArrayList<>(liveNodes); + Collections.shuffle(l, random()); + String targetNode = null; + for (String node : liveNodes) { + if (!replica.getNodeName().equals(node) && (isCollectionApiDistributed || !overseerLeader.equals(node))) { + targetNode = node; + break; + } + } + assertNotNull(targetNode); + CollectionAdminRequest.MoveReplica moveReplica = createMoveReplicaRequest(coll, replica, targetNode); + moveReplica.setInPlaceMove(inPlaceMove); + // start moving + String asyncId = IdUtils.randomId(); + moveReplica.processAsync(asyncId, cloudClient); + // shut down target node + for (int i = 0; i < cluster.getJettySolrRunners().size(); i++) { + if (cluster.getJettySolrRunner(i).getNodeName().equals(targetNode)) { + JettySolrRunner j = cluster.stopJettySolrRunner(i); + cluster.waitForJettyToStop(j); + break; + } + } + CollectionAdminRequest.RequestStatus requestStatus = CollectionAdminRequest.requestStatus(asyncId); + // wait for async request success + boolean success = true; + for (int i = 0; i < 200; i++) { + CollectionAdminRequest.RequestStatusResponse rsp = requestStatus.process(cloudClient); + assertNotSame(rsp.getRequestStatus().toString(), rsp.getRequestStatus(), RequestStatusState.COMPLETED); + if (rsp.getRequestStatus() == RequestStatusState.FAILED) { + success = false; + break; + } + Thread.sleep(500); + } + assertFalse(success); + + if (log.isInfoEnabled()) { + log.info("--- current collection state: {}", cloudClient.getZkStateReader().getClusterState().getCollection(coll)); + } + assertEquals(100, cluster.getSolrClient().query(coll, new SolrQuery("*:*")).getResults().getNumFound()); + } + + private CollectionAdminRequest.MoveReplica createMoveReplicaRequest(String coll, Replica replica, String targetNode, String shardId) { + return new CollectionAdminRequest.MoveReplica(coll, shardId, targetNode, replica.getNodeName()); + } + + private CollectionAdminRequest.MoveReplica createMoveReplicaRequest(String coll, Replica replica, String targetNode) { + return new CollectionAdminRequest.MoveReplica(coll, replica.getName(), targetNode); + } + + private Replica getRandomReplica(String coll, CloudSolrClient cloudClient) { + List replicas = cloudClient.getZkStateReader().getClusterState().getCollection(coll).getReplicas(); + Collections.shuffle(replicas, random()); + return replicas.get(0); + } + + private void checkNumOfCores(CloudSolrClient cloudClient, String nodeName, String collectionName, int expectedCores) throws IOException, SolrServerException { + assertEquals(nodeName + " does not have expected number of cores", expectedCores, getNumOfCores(cloudClient, nodeName, collectionName)); + } + + private int getNumOfCores(CloudSolrClient cloudClient, String nodeName, String collectionName) throws IOException, SolrServerException { + return getNumOfCores(cloudClient, nodeName, collectionName, null); + } + + private int getNumOfCores(CloudSolrClient cloudClient, String nodeName, String collectionName, String replicaType) throws IOException, SolrServerException { + try (HttpSolrClient coreclient = getHttpSolrClient(cloudClient.getZkStateReader().getBaseUrlForNodeName(nodeName))) { + CoreAdminResponse status = CoreAdminRequest.getStatus(null, coreclient); + if (status.getCoreStatus().size() == 0) { + return 0; + } + if (collectionName == null && replicaType == null) { + return status.getCoreStatus().size(); + } + // filter size by collection name + int size = 0; + for (Map.Entry> stringNamedListEntry : status.getCoreStatus()) { + if (collectionName != null) { + String coll = (String) stringNamedListEntry.getValue().findRecursive("cloud", "collection"); + if (!collectionName.equals(coll)) { + continue; + } + } + if (replicaType != null) { + String type = (String) stringNamedListEntry.getValue().findRecursive("cloud", "replicaType"); + if (!replicaType.equals(type)) { + continue; + } + } + size++; + } + return size; + } + } + + protected void addDocs(String collection, int numDocs) throws Exception { + SolrClient solrClient = cluster.getSolrClient(); + for (int docId = 1; docId <= numDocs; docId++) { + SolrInputDocument doc = new SolrInputDocument(); + doc.addField("id", docId); + solrClient.add(collection, doc); + } + solrClient.commit(collection); + Thread.sleep(5000); + } +} From b1128b7df6a96cd203db7eaffbf51237a388e441 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 13:25:01 +0200 Subject: [PATCH 15/52] HDFS contrib module: separate HDFS test classes from Core test classes (9.: RestartWhileUpdatingTest) - HDFSRestartWhileUpdatingTest extends RestartWhileUpdatingTest - introduced AbstractRestartWhileUpdatingTestBase --- .../hdfs/HdfsRestartWhileUpdatingTest.java | 6 +- .../solr/cloud/RestartWhileUpdatingTest.java | 173 +-------------- .../AbstractRestartWhileUpdatingTestBase.java | 197 ++++++++++++++++++ 3 files changed, 207 insertions(+), 169 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractRestartWhileUpdatingTestBase.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java index ebc6068d502..cd013fa84f0 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java @@ -20,7 +20,7 @@ import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.RestartWhileUpdatingTest; +import org.apache.solr.cloud.AbstractRestartWhileUpdatingTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -35,7 +35,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsRestartWhileUpdatingTest extends RestartWhileUpdatingTest { +public class HdfsRestartWhileUpdatingTest extends AbstractRestartWhileUpdatingTestBase { private static MiniDFSCluster dfsCluster; public HdfsRestartWhileUpdatingTest() throws Exception { @@ -60,4 +60,6 @@ public static void teardownClass() throws Exception { protected String getDataDir(String dataDir) { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } + + } diff --git a/solr/core/src/test/org/apache/solr/cloud/RestartWhileUpdatingTest.java b/solr/core/src/test/org/apache/solr/cloud/RestartWhileUpdatingTest.java index 7fc988d89bd..7079ccea1a5 100644 --- a/solr/core/src/test/org/apache/solr/cloud/RestartWhileUpdatingTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/RestartWhileUpdatingTest.java @@ -16,185 +16,24 @@ */ package org.apache.solr.cloud; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - import org.apache.lucene.util.LuceneTestCase.Nightly; import org.apache.lucene.util.LuceneTestCase.Slow; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.common.SolrInputDocument; -import org.junit.AfterClass; -import org.junit.BeforeClass; import org.junit.Test; @Slow @Nightly -public class RestartWhileUpdatingTest extends AbstractFullDistribZkTestBase { - - //private static final String DISTRIB_UPDATE_CHAIN = "distrib-update-chain"; - private List threads; - - private volatile boolean stopExpire = false; +/** + * Implementation moved to AbstractRestartWhileUpdatingTestBase because it is used by HDFS contrib module tests + */ +public class RestartWhileUpdatingTest extends AbstractRestartWhileUpdatingTestBase { public RestartWhileUpdatingTest() throws Exception { super(); - sliceCount = 1; - fixShardCount(3); - schemaString = "schema15.xml"; // we need a string id - useFactory("solr.StandardDirectoryFactory"); - } - - public static String[] fieldNames = new String[]{"f_i", "f_f", "f_d", "f_l", "f_dt"}; - public static RandVal[] randVals = new RandVal[]{rint, rfloat, rdouble, rlong, rdate}; - - protected String[] getFieldNames() { - return fieldNames; - } - - protected RandVal[] getRandValues() { - return randVals; - } - - @BeforeClass - public static void beforeRestartWhileUpdatingTest() { - System.setProperty("leaderVoteWait", "300000"); - System.setProperty("solr.autoCommit.maxTime", "30000"); - System.setProperty("solr.autoSoftCommit.maxTime", "3000"); - // SOLR-13212 // TestInjection.nonGracefullClose = "true:60"; - // SOLR-13189 // TestInjection.failReplicaRequests = "true:03"; - } - - @AfterClass - public static void afterRestartWhileUpdatingTest() { - System.clearProperty("leaderVoteWait"); - System.clearProperty("solr.autoCommit.maxTime"); - System.clearProperty("solr.autoSoftCommit.maxTime"); } @Test - public void test() throws Exception { - handle.clear(); - handle.put("timestamp", SKIPVAL); - - // start a couple indexing threads - - int[] maxDocList = new int[] {5000, 10000}; - - - int maxDoc = maxDocList[random().nextInt(maxDocList.length - 1)]; - - int numThreads = random().nextInt(4) + 1; - - threads = new ArrayList<>(numThreads); - - Thread expireThread = new Thread() { - public void run() { - while (!stopExpire) { - try { - Thread.sleep(random().nextInt(15000)); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - -// try { -// chaosMonkey.expireRandomSession(); -// } catch (KeeperException e) { -// throw new RuntimeException(e); -// } catch (InterruptedException e) { -// throw new RuntimeException(e); -// } - } - } - }; - -// Currently unused -// expireThread.start(); - - StoppableIndexingThread indexThread; - for (int i = 0; i < numThreads; i++) { - indexThread = new StoppableIndexingThread(controlClient, cloudClient, Integer.toString(i), true, maxDoc, 1, true); - threads.add(indexThread); - indexThread.start(); - } - - Thread.sleep(2000); - - int restartTimes = 1;//random().nextInt(4) + 1;; - for (int i = 0; i < restartTimes; i++) { - Thread.sleep(random().nextInt(30000)); - stopAndStartAllReplicas(); - Thread.sleep(random().nextInt(30000)); - } - - Thread.sleep(2000); - - // stop indexing threads - for (StoppableIndexingThread thread : threads) { - thread.safeStop(); - } - stopExpire = true; - expireThread.join(); - - Thread.sleep(1000); - - waitForThingsToLevelOut(320, TimeUnit.SECONDS); - - Thread.sleep(2000); - - waitForThingsToLevelOut(30, TimeUnit.SECONDS); - - Thread.sleep(5000); - - waitForRecoveriesToFinish(DEFAULT_COLLECTION, cloudClient.getZkStateReader(), false, true); - - for (StoppableIndexingThread thread : threads) { - thread.join(); - } - - checkShardConsistency(false, false); - } - - public void stopAndStartAllReplicas() throws Exception, InterruptedException { - chaosMonkey.stopAll(random().nextInt(1)); - - if (random().nextBoolean()) { - for (StoppableIndexingThread thread : threads) { - thread.safeStop(); - } - } - Thread.sleep(1000); - - chaosMonkey.startAll(); - } - @Override - protected void indexDoc(SolrInputDocument doc) throws IOException, - SolrServerException { - cloudClient.add(doc); - } - - - @Override - public void distribTearDown() throws Exception { - // make sure threads have been stopped... - if (threads != null) { - for (StoppableIndexingThread thread : threads) { - thread.safeStop(); - thread.safeStop(); - } - } - - super.distribTearDown(); - } - - // skip the randoms - they can deadlock... - @Override - protected void indexr(Object... fields) throws Exception { - SolrInputDocument doc = new SolrInputDocument(); - addFields(doc, fields); - addFields(doc, "rnd_b", true); - indexDoc(doc); + public void test() throws Exception { + super.test(); } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRestartWhileUpdatingTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRestartWhileUpdatingTestBase.java new file mode 100644 index 00000000000..41ad48f6000 --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRestartWhileUpdatingTestBase.java @@ -0,0 +1,197 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.common.SolrInputDocument; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public abstract class AbstractRestartWhileUpdatingTestBase extends AbstractFullDistribZkTestBase { + + //private static final String DISTRIB_UPDATE_CHAIN = "distrib-update-chain"; + private List threads; + + private volatile boolean stopExpire = false; + + public AbstractRestartWhileUpdatingTestBase() throws Exception { + super(); + sliceCount = 1; + fixShardCount(3); + schemaString = "schema15.xml"; // we need a string id + useFactory("solr.StandardDirectoryFactory"); + } + + public static String[] fieldNames = new String[]{"f_i", "f_f", "f_d", "f_l", "f_dt"}; + public static RandVal[] randVals = new RandVal[]{rint, rfloat, rdouble, rlong, rdate}; + + protected String[] getFieldNames() { + return fieldNames; + } + + protected RandVal[] getRandValues() { + return randVals; + } + + @BeforeClass + public static void beforeRestartWhileUpdatingTest() { + System.setProperty("leaderVoteWait", "300000"); + System.setProperty("solr.autoCommit.maxTime", "30000"); + System.setProperty("solr.autoSoftCommit.maxTime", "3000"); + // SOLR-13212 // TestInjection.nonGracefullClose = "true:60"; + // SOLR-13189 // TestInjection.failReplicaRequests = "true:03"; + } + + @AfterClass + public static void afterRestartWhileUpdatingTest() { + System.clearProperty("leaderVoteWait"); + System.clearProperty("solr.autoCommit.maxTime"); + System.clearProperty("solr.autoSoftCommit.maxTime"); + } + + + @Test + public void test() throws Exception { + handle.clear(); + handle.put("timestamp", SKIPVAL); + + // start a couple indexing threads + + int[] maxDocList = new int[] {5000, 10000}; + + + int maxDoc = maxDocList[random().nextInt(maxDocList.length - 1)]; + + int numThreads = random().nextInt(4) + 1; + + threads = new ArrayList<>(numThreads); + + Thread expireThread = new Thread() { + public void run() { + while (!stopExpire) { + try { + Thread.sleep(random().nextInt(15000)); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + +// try { +// chaosMonkey.expireRandomSession(); +// } catch (KeeperException e) { +// throw new RuntimeException(e); +// } catch (InterruptedException e) { +// throw new RuntimeException(e); +// } + } + } + }; + +// Currently unused +// expireThread.start(); + + StoppableIndexingThread indexThread; + for (int i = 0; i < numThreads; i++) { + indexThread = new StoppableIndexingThread(controlClient, cloudClient, Integer.toString(i), true, maxDoc, 1, true); + threads.add(indexThread); + indexThread.start(); + } + + Thread.sleep(2000); + + int restartTimes = 1;//random().nextInt(4) + 1;; + for (int i = 0; i < restartTimes; i++) { + Thread.sleep(random().nextInt(30000)); + stopAndStartAllReplicas(); + Thread.sleep(random().nextInt(30000)); + } + + Thread.sleep(2000); + + // stop indexing threads + for (StoppableIndexingThread thread : threads) { + thread.safeStop(); + } + stopExpire = true; + expireThread.join(); + + Thread.sleep(1000); + + waitForThingsToLevelOut(320, TimeUnit.SECONDS); + + Thread.sleep(2000); + + waitForThingsToLevelOut(30, TimeUnit.SECONDS); + + Thread.sleep(5000); + + waitForRecoveriesToFinish(DEFAULT_COLLECTION, cloudClient.getZkStateReader(), false, true); + + for (StoppableIndexingThread thread : threads) { + thread.join(); + } + + checkShardConsistency(false, false); + } + + public void stopAndStartAllReplicas() throws Exception, InterruptedException { + chaosMonkey.stopAll(random().nextInt(1)); + + if (random().nextBoolean()) { + for (StoppableIndexingThread thread : threads) { + thread.safeStop(); + } + } + Thread.sleep(1000); + + chaosMonkey.startAll(); + } + + @Override + protected void indexDoc(SolrInputDocument doc) throws IOException, + SolrServerException { + cloudClient.add(doc); + } + + + @Override + public void distribTearDown() throws Exception { + // make sure threads have been stopped... + if (threads != null) { + for (StoppableIndexingThread thread : threads) { + thread.safeStop(); + thread.safeStop(); + } + } + + super.distribTearDown(); + } + + // skip the randoms - they can deadlock... + @Override + protected void indexr(Object... fields) throws Exception { + SolrInputDocument doc = new SolrInputDocument(); + addFields(doc, fields); + addFields(doc, "rnd_b", true); + indexDoc(doc); + } +} From 1bbfcbd6e2b9160ebd7dabec8f57d82273c1e652 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 13:31:33 +0200 Subject: [PATCH 16/52] HDFS contrib module: separate HDFS test classes from Core test classes (10.: HdfsTlogReplayBufferedWhileIndexingTest) - HdfsTlogReplayBufferedWhileIndexingTest extends TlogReplayBufferedWhileIndexingTest - introduced AbstractTlogReplayBufferedWhileIndexingTestBase --- .../hdfs/HdfsRestartWhileUpdatingTest.java | 1 + ...fsTlogReplayBufferedWhileIndexingTest.java | 33 +---- .../TlogReplayBufferedWhileIndexingTest.java | 118 +-------------- ...ogReplayBufferedWhileIndexingTestBase.java | 139 ++++++++++++++++++ 4 files changed, 153 insertions(+), 138 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractTlogReplayBufferedWhileIndexingTestBase.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java index cd013fa84f0..98441c70399 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java @@ -27,6 +27,7 @@ import com.carrotsearch.randomizedtesting.annotations.Nightly; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; +import org.junit.Test; @Slow @Nightly diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java index 42cfcaa255a..0a9a7c40c90 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java @@ -16,17 +16,13 @@ */ package org.apache.solr.cloud.hdfs; -import org.apache.hadoop.hdfs.MiniDFSCluster; -import org.apache.lucene.util.QuickPatchThreadsFilter; +import com.carrotsearch.randomizedtesting.annotations.Nightly; +import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.apache.lucene.util.LuceneTestCase.Slow; +import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.TlogReplayBufferedWhileIndexingTest; +import org.apache.solr.cloud.AbstractTlogReplayBufferedWhileIndexingTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; -import org.junit.AfterClass; -import org.junit.BeforeClass; - -import com.carrotsearch.randomizedtesting.annotations.Nightly; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; @Slow @Nightly @@ -35,29 +31,10 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsTlogReplayBufferedWhileIndexingTest extends TlogReplayBufferedWhileIndexingTest { - private static MiniDFSCluster dfsCluster; +public class HdfsTlogReplayBufferedWhileIndexingTest extends AbstractTlogReplayBufferedWhileIndexingTestBase { public HdfsTlogReplayBufferedWhileIndexingTest() throws Exception { super(); } - @BeforeClass - public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); - } - - @AfterClass - public static void teardownClass() throws Exception { - try { - HdfsTestUtil.teardownClass(dfsCluster); - } finally { - dfsCluster = null; - } - } - - @Override - protected String getDataDir(String dataDir) { - return HdfsTestUtil.getDataDir(dfsCluster, dataDir); - } } diff --git a/solr/core/src/test/org/apache/solr/cloud/TlogReplayBufferedWhileIndexingTest.java b/solr/core/src/test/org/apache/solr/cloud/TlogReplayBufferedWhileIndexingTest.java index e4c12890d13..79ce05c9317 100644 --- a/solr/core/src/test/org/apache/solr/cloud/TlogReplayBufferedWhileIndexingTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/TlogReplayBufferedWhileIndexingTest.java @@ -16,130 +16,28 @@ */ package org.apache.solr.cloud; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - import org.apache.lucene.util.LuceneTestCase.Nightly; -import org.apache.solr.SolrTestCaseJ4.SuppressSSL; import org.apache.lucene.util.LuceneTestCase.Slow; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.embedded.JettySolrRunner; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.util.TestInjection; -import org.junit.AfterClass; -import org.junit.BeforeClass; +import org.apache.solr.SolrTestCaseJ4.SuppressSSL; import org.junit.Test; @Slow @Nightly @SuppressSSL -public class TlogReplayBufferedWhileIndexingTest extends AbstractFullDistribZkTestBase { +/* + * Implementation moved to AbstractTlogReplayBufferedWhileIndexingTestBase as it is also used by HDFS contrib + * module tests + */ +public class TlogReplayBufferedWhileIndexingTest extends AbstractTlogReplayBufferedWhileIndexingTestBase { - private List threads; - public TlogReplayBufferedWhileIndexingTest() throws Exception { super(); - sliceCount = 1; - fixShardCount(2); - schemaString = "schema15.xml"; // we need a string id - } - - @BeforeClass - public static void beforeRestartWhileUpdatingTest() throws Exception { - System.setProperty("leaderVoteWait", "300000"); - System.setProperty("solr.autoCommit.maxTime", "10000"); - System.setProperty("solr.autoSoftCommit.maxTime", "3000"); - TestInjection.updateLogReplayRandomPause = "true:10"; - TestInjection.updateRandomPause = "true:10"; - if (System.getProperty("solr.hdfs.home") != null) useFactory("solr.StandardDirectoryFactory"); - } - - @AfterClass - public static void afterRestartWhileUpdatingTest() { - System.clearProperty("leaderVoteWait"); - System.clearProperty("solr.autoCommit.maxTime"); - System.clearProperty("solr.autoSoftCommit.maxTime"); } @Test - public void test() throws Exception { - handle.clear(); - handle.put("timestamp", SKIPVAL); - - waitForRecoveriesToFinish(false); - - int numThreads = 3; - - threads = new ArrayList<>(numThreads); - - ArrayList allJetty = new ArrayList<>(); - allJetty.addAll(jettys); - allJetty.remove(shardToLeaderJetty.get("shard1").jetty); - assert allJetty.size() == 1 : allJetty.size(); - allJetty.get(0).stop(); - - StoppableIndexingThread indexThread; - for (int i = 0; i < numThreads; i++) { - boolean pauseBetweenUpdates = random().nextBoolean(); - int batchSize = random().nextInt(4) + 1; - indexThread = new StoppableIndexingThread(controlClient, cloudClient, Integer.toString(i), true, 900, batchSize, pauseBetweenUpdates); - threads.add(indexThread); - indexThread.start(); - } - - Thread.sleep(2000); - - allJetty.get(0).start(); - - Thread.sleep(45000); - - waitForThingsToLevelOut(); // we can insert random update delays, so this can take a while, especially when beasting this test - - Thread.sleep(2000); - - waitForRecoveriesToFinish(DEFAULT_COLLECTION, cloudClient.getZkStateReader(), false, true); - - for (StoppableIndexingThread thread : threads) { - thread.safeStop(); - } - - waitForThingsToLevelOut(30, TimeUnit.SECONDS); - - checkShardConsistency(false, false); - - } - @Override - protected void indexDoc(SolrInputDocument doc) throws IOException, - SolrServerException { - cloudClient.add(doc); + public void test() throws Exception { + super.test(); } - - @Override - public void distribTearDown() throws Exception { - // make sure threads have been stopped... - if (threads != null) { - for (StoppableIndexingThread thread : threads) { - thread.safeStop(); - } - - for (StoppableIndexingThread thread : threads) { - thread.join(); - } - } - - super.distribTearDown(); - } - - // skip the randoms - they can deadlock... - @Override - protected void indexr(Object... fields) throws Exception { - SolrInputDocument doc = new SolrInputDocument(); - addFields(doc, fields); - addFields(doc, "rnd_b", true); - indexDoc(doc); - } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractTlogReplayBufferedWhileIndexingTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractTlogReplayBufferedWhileIndexingTestBase.java new file mode 100644 index 00000000000..31e0098a050 --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractTlogReplayBufferedWhileIndexingTestBase.java @@ -0,0 +1,139 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.embedded.JettySolrRunner; +import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.util.TestInjection; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public abstract class AbstractTlogReplayBufferedWhileIndexingTestBase extends AbstractFullDistribZkTestBase { + + private List threads; + + public AbstractTlogReplayBufferedWhileIndexingTestBase() throws Exception { + super(); + sliceCount = 1; + fixShardCount(2); + schemaString = "schema15.xml"; // we need a string id + } + + @BeforeClass + public static void beforeRestartWhileUpdatingTest() throws Exception { + System.setProperty("leaderVoteWait", "300000"); + System.setProperty("solr.autoCommit.maxTime", "10000"); + System.setProperty("solr.autoSoftCommit.maxTime", "3000"); + TestInjection.updateLogReplayRandomPause = "true:10"; + TestInjection.updateRandomPause = "true:10"; + if (System.getProperty("solr.hdfs.home") != null) useFactory("solr.StandardDirectoryFactory"); + } + + @AfterClass + public static void afterRestartWhileUpdatingTest() { + System.clearProperty("leaderVoteWait"); + System.clearProperty("solr.autoCommit.maxTime"); + System.clearProperty("solr.autoSoftCommit.maxTime"); + } + + @Test + public void test() throws Exception { + handle.clear(); + handle.put("timestamp", SKIPVAL); + + waitForRecoveriesToFinish(false); + + int numThreads = 3; + + threads = new ArrayList<>(numThreads); + + ArrayList allJetty = new ArrayList<>(); + allJetty.addAll(jettys); + allJetty.remove(shardToLeaderJetty.get("shard1").jetty); + assert allJetty.size() == 1 : allJetty.size(); + allJetty.get(0).stop(); + + StoppableIndexingThread indexThread; + for (int i = 0; i < numThreads; i++) { + boolean pauseBetweenUpdates = random().nextBoolean(); + int batchSize = random().nextInt(4) + 1; + indexThread = new StoppableIndexingThread(controlClient, cloudClient, Integer.toString(i), true, 900, batchSize, pauseBetweenUpdates); + threads.add(indexThread); + indexThread.start(); + } + + Thread.sleep(2000); + + allJetty.get(0).start(); + + Thread.sleep(45000); + + waitForThingsToLevelOut(); // we can insert random update delays, so this can take a while, especially when beasting this test + + Thread.sleep(2000); + + waitForRecoveriesToFinish(DEFAULT_COLLECTION, cloudClient.getZkStateReader(), false, true); + + for (StoppableIndexingThread thread : threads) { + thread.safeStop(); + } + + waitForThingsToLevelOut(30, TimeUnit.SECONDS); + + checkShardConsistency(false, false); + + } + + @Override + protected void indexDoc(SolrInputDocument doc) throws IOException, + SolrServerException { + cloudClient.add(doc); + } + + + @Override + public void distribTearDown() throws Exception { + // make sure threads have been stopped... + if (threads != null) { + for (StoppableIndexingThread thread : threads) { + thread.safeStop(); + } + + for (StoppableIndexingThread thread : threads) { + thread.join(); + } + } + + super.distribTearDown(); + } + + // skip the randoms - they can deadlock... + @Override + protected void indexr(Object... fields) throws Exception { + SolrInputDocument doc = new SolrInputDocument(); + addFields(doc, fields); + addFields(doc, "rnd_b", true); + indexDoc(doc); + } +} From 1a19808110ad5b282318cde83506deeb41c68fcb Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 13:36:49 +0200 Subject: [PATCH 17/52] HDFS contrib module: separate HDFS test classes from Core test classes (11.: HdfsUnloadDistributedZkTest) - HdfsUnloadDistributedZkTest extends UnloadDistributedZkTest - introduced AbstractUnloadDistributedZkTestBase --- .../hdfs/HdfsUnloadDistributedZkTest.java | 6 +- .../solr/cloud/UnloadDistributedZkTest.java | 339 +--------------- .../AbstractUnloadDistributedZkTestBase.java | 372 ++++++++++++++++++ 3 files changed, 381 insertions(+), 336 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/AbstractUnloadDistributedZkTestBase.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java index 59440976280..a565d89810d 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java @@ -20,7 +20,7 @@ import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrIgnoredThreadsFilter; -import org.apache.solr.cloud.UnloadDistributedZkTest; +import org.apache.solr.cloud.AbstractUnloadDistributedZkTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -35,7 +35,7 @@ QuickPatchThreadsFilter.class, BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) -public class HdfsUnloadDistributedZkTest extends UnloadDistributedZkTest { +public class HdfsUnloadDistributedZkTest extends AbstractUnloadDistributedZkTestBase { private static MiniDFSCluster dfsCluster; @BeforeClass @@ -56,4 +56,6 @@ public static void teardownClass() throws Exception { protected String getDataDir(String dataDir) { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } + + } diff --git a/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java index 9b44db89555..c6c8680da99 100644 --- a/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java @@ -18,45 +18,17 @@ import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrTestCaseJ4.SuppressSSL; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.embedded.JettySolrRunner; -import org.apache.solr.client.solrj.impl.HttpSolrClient; -import org.apache.solr.client.solrj.request.CollectionAdminRequest; -import org.apache.solr.client.solrj.request.CoreAdminRequest.Unload; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.common.cloud.DocCollection; -import org.apache.solr.common.cloud.Replica; -import org.apache.solr.common.cloud.Slice; -import org.apache.solr.common.cloud.ZkCoreNodeProps; -import org.apache.solr.common.cloud.ZkStateReader; -import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.common.util.ExecutorUtil; -import org.apache.solr.common.util.TimeSource; -import org.apache.solr.core.SolrCore; -import org.apache.solr.common.util.SolrNamedThreadFactory; -import org.apache.solr.core.SolrPaths; -import org.apache.solr.util.TestInjection; -import org.apache.solr.util.TimeOut; -import org.junit.Test; -import java.io.IOException; -import java.nio.file.Path; -import java.util.Collection; -import java.util.Collections; -import java.util.Random; -import java.util.Set; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; +import org.junit.Test; /** * This test simply does a bunch of basic things in solrcloud mode and asserts things * work as expected. + * Implementation moved to AbstractUnloadDistributedZkTestBase as it is used by HDFS contrib module tests. */ @Slow @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776") -public class UnloadDistributedZkTest extends AbstractBasicDistributedZkTestBase { +public class UnloadDistributedZkTest extends AbstractUnloadDistributedZkTestBase { public UnloadDistributedZkTest() { super(); } @@ -66,310 +38,9 @@ protected String getSolrXml() { } @Test + @Override public void test() throws Exception { - jettys.forEach(j -> { - Set allowPath = j.getCoreContainer().getAllowPaths(); - allowPath.clear(); - allowPath.add(SolrPaths.ALL_PATH); // Allow non-standard core instance path - }); - testCoreUnloadAndLeaders(); // long - testUnloadLotsOfCores(); // long - - testUnloadShardAndCollection(); - } - - private void checkCoreNamePresenceAndSliceCount(String collectionName, String coreName, - boolean shouldBePresent, int expectedSliceCount) throws Exception { - final TimeOut timeout = new TimeOut(45, TimeUnit.SECONDS, TimeSource.NANO_TIME); - Boolean isPresent = null; // null meaning "don't know" - while (null == isPresent || shouldBePresent != isPresent) { - final DocCollection docCollection = getCommonCloudSolrClient().getZkStateReader().getClusterState().getCollectionOrNull(collectionName); - final Collection slices = (docCollection != null) ? docCollection.getSlices() : Collections.emptyList(); - if (timeout.hasTimedOut()) { - printLayout(); - fail("checkCoreNamePresenceAndSliceCount failed:" - +" collection="+collectionName+" CoreName="+coreName - +" shouldBePresent="+shouldBePresent+" isPresent="+isPresent - +" expectedSliceCount="+expectedSliceCount+" actualSliceCount="+slices.size()); - } - if (expectedSliceCount == slices.size()) { - isPresent = false; - for (Slice slice : slices) { - for (Replica replica : slice.getReplicas()) { - if (coreName.equals(replica.get("core"))) { - isPresent = true; - } - } - } - } - Thread.sleep(1000); - } - } - - private void testUnloadShardAndCollection() throws Exception{ - final int numShards = 2; - - final String collection = "test_unload_shard_and_collection"; - - final String coreName1 = collection+"_1"; - final String coreName2 = collection+"_2"; - - assertEquals(0, CollectionAdminRequest.createCollection(collection, "conf1", numShards, 1) - .setCreateNodeSet("") - .process(cloudClient).getStatus()); - assertTrue(CollectionAdminRequest.addReplicaToShard(collection, "shard1") - .setCoreName(coreName1) - .setNode(jettys.get(0).getNodeName()) - .process(cloudClient).isSuccess()); - - assertTrue(CollectionAdminRequest.addReplicaToShard(collection, "shard2") - .setCoreName(coreName2) - .setNode(jettys.get(0).getNodeName()) - .process(cloudClient).isSuccess()); - - - // does not mean they are active and up yet :* - waitForRecoveriesToFinish(collection, false); - - final boolean unloadInOrder = random().nextBoolean(); - final String unloadCmdCoreName1 = (unloadInOrder ? coreName1 : coreName2); - final String unloadCmdCoreName2 = (unloadInOrder ? coreName2 : coreName1); - - try (HttpSolrClient adminClient = getHttpSolrClient(buildUrl(jettys.get(0).getLocalPort()))) { - // now unload one of the two - Unload unloadCmd = new Unload(false); - unloadCmd.setCoreName(unloadCmdCoreName1); - adminClient.request(unloadCmd); - - // there should still be two shards (as of SOLR-5209) - checkCoreNamePresenceAndSliceCount(collection, unloadCmdCoreName1, false /* shouldBePresent */, numShards /* expectedSliceCount */); - - // now unload one of the other - unloadCmd = new Unload(false); - unloadCmd.setCoreName(unloadCmdCoreName2); - adminClient.request(unloadCmd); - checkCoreNamePresenceAndSliceCount(collection, unloadCmdCoreName2, false /* shouldBePresent */, numShards /* expectedSliceCount */); - } - - //printLayout(); - // the collection should still be present (as of SOLR-5209 replica removal does not cascade to remove the slice and collection) - assertTrue("No longer found collection "+collection, getCommonCloudSolrClient().getZkStateReader().getClusterState().hasCollection(collection)); - } - - protected SolrCore getFirstCore(String collection, JettySolrRunner jetty) { - SolrCore solrCore = null; - for (SolrCore core : jetty.getCoreContainer().getCores()) { - if (core.getName().startsWith(collection)) { - solrCore = core; - } - } - return solrCore; - } - - /** - * @throws Exception on any problem - */ - private void testCoreUnloadAndLeaders() throws Exception { - JettySolrRunner jetty1 = jettys.get(0); - - assertEquals(0, CollectionAdminRequest - .createCollection("unloadcollection", "conf1", 1,1) - .setCreateNodeSet(jetty1.getNodeName()) - .process(cloudClient).getStatus()); - ZkStateReader zkStateReader = getCommonCloudSolrClient().getZkStateReader(); - - zkStateReader.forceUpdateCollection("unloadcollection"); - - int slices = zkStateReader.getClusterState().getCollection("unloadcollection").getSlices().size(); - assertEquals(1, slices); - SolrCore solrCore = getFirstCore("unloadcollection", jetty1); - String core1DataDir = solrCore.getDataDir(); - - assertTrue(CollectionAdminRequest - .addReplicaToShard("unloadcollection", "shard1") - .setCoreName("unloadcollection_shard1_replica2") - .setNode(jettys.get(1).getNodeName()) - .process(cloudClient).isSuccess()); - zkStateReader.forceUpdateCollection("unloadcollection"); - slices = zkStateReader.getClusterState().getCollection("unloadcollection").getSlices().size(); - assertEquals(1, slices); - - waitForRecoveriesToFinish("unloadcollection", zkStateReader, false); - - ZkCoreNodeProps leaderProps = getLeaderUrlFromZk("unloadcollection", "shard1"); - - Random random = random(); - if (random.nextBoolean()) { - try (HttpSolrClient collectionClient = getHttpSolrClient(leaderProps.getCoreUrl())) { - // lets try and use the solrj client to index and retrieve a couple - // documents - SolrInputDocument doc1 = getDoc(id, 6, i1, -600, tlong, 600, t1, - "humpty dumpy sat on a wall"); - SolrInputDocument doc2 = getDoc(id, 7, i1, -600, tlong, 600, t1, - "humpty dumpy3 sat on a walls"); - SolrInputDocument doc3 = getDoc(id, 8, i1, -600, tlong, 600, t1, - "humpty dumpy2 sat on a walled"); - collectionClient.add(doc1); - collectionClient.add(doc2); - collectionClient.add(doc3); - collectionClient.commit(); - } - } - - assertTrue(CollectionAdminRequest - .addReplicaToShard("unloadcollection", "shard1") - .setCoreName("unloadcollection_shard1_replica3") - .setNode(jettys.get(2).getNodeName()) - .process(cloudClient).isSuccess()); - - waitForRecoveriesToFinish("unloadcollection", zkStateReader, false); - - // so that we start with some versions when we reload... - TestInjection.skipIndexWriterCommitOnClose = true; - - try (HttpSolrClient addClient = getHttpSolrClient(jettys.get(2).getBaseUrl() + "/unloadcollection_shard1_replica3", 30000)) { - - // add a few docs - for (int x = 20; x < 100; x++) { - SolrInputDocument doc1 = getDoc(id, x, i1, -600, tlong, 600, t1, - "humpty dumpy sat on a wall"); - addClient.add(doc1); - } - } - // don't commit so they remain in the tran log - //collectionClient.commit(); - - // unload the leader - try (HttpSolrClient collectionClient = getHttpSolrClient(leaderProps.getBaseUrl(), 15000, 30000)) { - - Unload unloadCmd = new Unload(false); - unloadCmd.setCoreName(leaderProps.getCoreName()); - ModifiableSolrParams p = (ModifiableSolrParams) unloadCmd.getParams(); - - collectionClient.request(unloadCmd); - } -// Thread.currentThread().sleep(500); -// printLayout(); - - int tries = 50; - while (leaderProps.getCoreUrl().equals(zkStateReader.getLeaderUrl("unloadcollection", "shard1", 15000))) { - Thread.sleep(100); - if (tries-- == 0) { - fail("Leader never changed"); - } - } - - // ensure there is a leader - zkStateReader.getLeaderRetry("unloadcollection", "shard1", 15000); - - try (HttpSolrClient addClient = getHttpSolrClient(jettys.get(1).getBaseUrl() + "/unloadcollection_shard1_replica2", 30000, 90000)) { - - // add a few docs while the leader is down - for (int x = 101; x < 200; x++) { - SolrInputDocument doc1 = getDoc(id, x, i1, -600, tlong, 600, t1, - "humpty dumpy sat on a wall"); - addClient.add(doc1); - } - } - - assertTrue(CollectionAdminRequest - .addReplicaToShard("unloadcollection", "shard1") - .setCoreName("unloadcollection_shard1_replica4") - .setNode(jettys.get(3).getNodeName()) - .process(cloudClient).isSuccess()); - - waitForRecoveriesToFinish("unloadcollection", zkStateReader, false); - - // unload the leader again - leaderProps = getLeaderUrlFromZk("unloadcollection", "shard1"); - try (HttpSolrClient collectionClient = getHttpSolrClient(leaderProps.getBaseUrl(), 15000, 30000)) { - - Unload unloadCmd = new Unload(false); - unloadCmd.setCoreName(leaderProps.getCoreName()); - collectionClient.request(unloadCmd); - } - tries = 50; - while (leaderProps.getCoreUrl().equals(zkStateReader.getLeaderUrl("unloadcollection", "shard1", 15000))) { - Thread.sleep(100); - if (tries-- == 0) { - fail("Leader never changed"); - } - } - - zkStateReader.getLeaderRetry("unloadcollection", "shard1", 15000); - - TestInjection.skipIndexWriterCommitOnClose = false; // set this back - assertTrue(CollectionAdminRequest - .addReplicaToShard("unloadcollection", "shard1") - .setCoreName(leaderProps.getCoreName()) - .setDataDir(core1DataDir) - .setNode(leaderProps.getNodeName()) - .process(cloudClient).isSuccess()); - - waitForRecoveriesToFinish("unloadcollection", zkStateReader, false); - - long found1, found3; - - try (HttpSolrClient adminClient = getHttpSolrClient(jettys.get(1).getBaseUrl() + "/unloadcollection_shard1_replica2", 15000, 30000)) { - adminClient.commit(); - SolrQuery q = new SolrQuery("*:*"); - q.set("distrib", false); - found1 = adminClient.query(q).getResults().getNumFound(); - } - - try (HttpSolrClient adminClient = getHttpSolrClient(jettys.get(2).getBaseUrl() + "/unloadcollection_shard1_replica3", 15000, 30000)) { - adminClient.commit(); - SolrQuery q = new SolrQuery("*:*"); - q.set("distrib", false); - found3 = adminClient.query(q).getResults().getNumFound(); - } - - try (HttpSolrClient adminClient = getHttpSolrClient(jettys.get(3).getBaseUrl() + "/unloadcollection_shard1_replica4", 15000, 30000)) { - adminClient.commit(); - SolrQuery q = new SolrQuery("*:*"); - q.set("distrib", false); - long found4 = adminClient.query(q).getResults().getNumFound(); - - // all 3 shards should now have the same number of docs - assertEquals(found1, found3); - assertEquals(found3, found4); - } + super.test(); } - - private void testUnloadLotsOfCores() throws Exception { - JettySolrRunner jetty = jettys.get(0); - try (final HttpSolrClient adminClient = (HttpSolrClient) jetty.newClient(15000, 60000)) { - int numReplicas = atLeast(3); - ThreadPoolExecutor executor = new ExecutorUtil.MDCAwareThreadPoolExecutor(0, Integer.MAX_VALUE, - 5, TimeUnit.SECONDS, new SynchronousQueue<>(), - new SolrNamedThreadFactory("testExecutor")); - try { - // create the cores - createCollectionInOneInstance(adminClient, jetty.getNodeName(), executor, "multiunload", 2, numReplicas); - } finally { - ExecutorUtil.shutdownAndAwaitTermination(executor); - } - executor = new ExecutorUtil.MDCAwareThreadPoolExecutor(0, Integer.MAX_VALUE, 5, - TimeUnit.SECONDS, new SynchronousQueue<>(), - new SolrNamedThreadFactory("testExecutor")); - try { - for (int j = 0; j < numReplicas; j++) { - final int freezeJ = j; - executor.execute(() -> { - Unload unloadCmd = new Unload(true); - unloadCmd.setCoreName("multiunload" + freezeJ); - try { - adminClient.request(unloadCmd); - } catch (SolrServerException | IOException e) { - throw new RuntimeException(e); - } - }); - Thread.sleep(random().nextInt(50)); - } - } finally { - ExecutorUtil.shutdownAndAwaitTermination(executor); - } - } - } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractUnloadDistributedZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractUnloadDistributedZkTestBase.java new file mode 100644 index 00000000000..de068bbf640 --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractUnloadDistributedZkTestBase.java @@ -0,0 +1,372 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud; + +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.embedded.JettySolrRunner; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.request.CoreAdminRequest.Unload; +import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.apache.solr.common.cloud.ZkCoreNodeProps; +import org.apache.solr.common.cloud.ZkStateReader; +import org.apache.solr.common.params.ModifiableSolrParams; +import org.apache.solr.common.util.ExecutorUtil; +import org.apache.solr.common.util.TimeSource; +import org.apache.solr.core.SolrCore; +import org.apache.solr.common.util.SolrNamedThreadFactory; +import org.apache.solr.core.SolrPaths; +import org.apache.solr.util.TestInjection; +import org.apache.solr.util.TimeOut; +import org.junit.Test; + + +import java.io.IOException; +import java.nio.file.Path; +import java.util.Collection; +import java.util.Collections; +import java.util.Random; +import java.util.Set; +import java.util.concurrent.SynchronousQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +/** + * This test simply does a bunch of basic things in solrcloud mode and asserts things + * work as expected. + */ +public abstract class AbstractUnloadDistributedZkTestBase extends AbstractBasicDistributedZkTestBase { + public AbstractUnloadDistributedZkTestBase() { + super(); + } + + protected String getSolrXml() { + return "solr.xml"; + } + + @Test + public void test() throws Exception { + jettys.forEach(j -> { + Set allowPath = j.getCoreContainer().getAllowPaths(); + allowPath.clear(); + allowPath.add(SolrPaths.ALL_PATH); // Allow non-standard core instance path + }); + testCoreUnloadAndLeaders(); // long + testUnloadLotsOfCores(); // long + + testUnloadShardAndCollection(); + } + + private void checkCoreNamePresenceAndSliceCount(String collectionName, String coreName, + boolean shouldBePresent, int expectedSliceCount) throws Exception { + final TimeOut timeout = new TimeOut(45, TimeUnit.SECONDS, TimeSource.NANO_TIME); + Boolean isPresent = null; // null meaning "don't know" + while (null == isPresent || shouldBePresent != isPresent) { + final DocCollection docCollection = getCommonCloudSolrClient().getZkStateReader().getClusterState().getCollectionOrNull(collectionName); + final Collection slices = (docCollection != null) ? docCollection.getSlices() : Collections.emptyList(); + if (timeout.hasTimedOut()) { + printLayout(); + fail("checkCoreNamePresenceAndSliceCount failed:" + +" collection="+collectionName+" CoreName="+coreName + +" shouldBePresent="+shouldBePresent+" isPresent="+isPresent + +" expectedSliceCount="+expectedSliceCount+" actualSliceCount="+slices.size()); + } + if (expectedSliceCount == slices.size()) { + isPresent = false; + for (Slice slice : slices) { + for (Replica replica : slice.getReplicas()) { + if (coreName.equals(replica.get("core"))) { + isPresent = true; + } + } + } + } + Thread.sleep(1000); + } + } + + private void testUnloadShardAndCollection() throws Exception{ + final int numShards = 2; + + final String collection = "test_unload_shard_and_collection"; + + final String coreName1 = collection+"_1"; + final String coreName2 = collection+"_2"; + + assertEquals(0, CollectionAdminRequest.createCollection(collection, "conf1", numShards, 1) + .setCreateNodeSet("") + .process(cloudClient).getStatus()); + assertTrue(CollectionAdminRequest.addReplicaToShard(collection, "shard1") + .setCoreName(coreName1) + .setNode(jettys.get(0).getNodeName()) + .process(cloudClient).isSuccess()); + + assertTrue(CollectionAdminRequest.addReplicaToShard(collection, "shard2") + .setCoreName(coreName2) + .setNode(jettys.get(0).getNodeName()) + .process(cloudClient).isSuccess()); + + + // does not mean they are active and up yet :* + waitForRecoveriesToFinish(collection, false); + + final boolean unloadInOrder = random().nextBoolean(); + final String unloadCmdCoreName1 = (unloadInOrder ? coreName1 : coreName2); + final String unloadCmdCoreName2 = (unloadInOrder ? coreName2 : coreName1); + + try (HttpSolrClient adminClient = getHttpSolrClient(buildUrl(jettys.get(0).getLocalPort()))) { + // now unload one of the two + Unload unloadCmd = new Unload(false); + unloadCmd.setCoreName(unloadCmdCoreName1); + adminClient.request(unloadCmd); + + // there should still be two shards (as of SOLR-5209) + checkCoreNamePresenceAndSliceCount(collection, unloadCmdCoreName1, false /* shouldBePresent */, numShards /* expectedSliceCount */); + + // now unload one of the other + unloadCmd = new Unload(false); + unloadCmd.setCoreName(unloadCmdCoreName2); + adminClient.request(unloadCmd); + checkCoreNamePresenceAndSliceCount(collection, unloadCmdCoreName2, false /* shouldBePresent */, numShards /* expectedSliceCount */); + } + + //printLayout(); + // the collection should still be present (as of SOLR-5209 replica removal does not cascade to remove the slice and collection) + assertTrue("No longer found collection "+collection, getCommonCloudSolrClient().getZkStateReader().getClusterState().hasCollection(collection)); + } + + protected SolrCore getFirstCore(String collection, JettySolrRunner jetty) { + SolrCore solrCore = null; + for (SolrCore core : jetty.getCoreContainer().getCores()) { + if (core.getName().startsWith(collection)) { + solrCore = core; + } + } + return solrCore; + } + + /** + * @throws Exception on any problem + */ + private void testCoreUnloadAndLeaders() throws Exception { + JettySolrRunner jetty1 = jettys.get(0); + + assertEquals(0, CollectionAdminRequest + .createCollection("unloadcollection", "conf1", 1,1) + .setCreateNodeSet(jetty1.getNodeName()) + .process(cloudClient).getStatus()); + ZkStateReader zkStateReader = getCommonCloudSolrClient().getZkStateReader(); + + zkStateReader.forceUpdateCollection("unloadcollection"); + + int slices = zkStateReader.getClusterState().getCollection("unloadcollection").getSlices().size(); + assertEquals(1, slices); + SolrCore solrCore = getFirstCore("unloadcollection", jetty1); + String core1DataDir = solrCore.getDataDir(); + + assertTrue(CollectionAdminRequest + .addReplicaToShard("unloadcollection", "shard1") + .setCoreName("unloadcollection_shard1_replica2") + .setNode(jettys.get(1).getNodeName()) + .process(cloudClient).isSuccess()); + zkStateReader.forceUpdateCollection("unloadcollection"); + slices = zkStateReader.getClusterState().getCollection("unloadcollection").getSlices().size(); + assertEquals(1, slices); + + waitForRecoveriesToFinish("unloadcollection", zkStateReader, false); + + ZkCoreNodeProps leaderProps = getLeaderUrlFromZk("unloadcollection", "shard1"); + + Random random = random(); + if (random.nextBoolean()) { + try (HttpSolrClient collectionClient = getHttpSolrClient(leaderProps.getCoreUrl())) { + // lets try and use the solrj client to index and retrieve a couple + // documents + SolrInputDocument doc1 = getDoc(id, 6, i1, -600, tlong, 600, t1, + "humpty dumpy sat on a wall"); + SolrInputDocument doc2 = getDoc(id, 7, i1, -600, tlong, 600, t1, + "humpty dumpy3 sat on a walls"); + SolrInputDocument doc3 = getDoc(id, 8, i1, -600, tlong, 600, t1, + "humpty dumpy2 sat on a walled"); + collectionClient.add(doc1); + collectionClient.add(doc2); + collectionClient.add(doc3); + collectionClient.commit(); + } + } + + assertTrue(CollectionAdminRequest + .addReplicaToShard("unloadcollection", "shard1") + .setCoreName("unloadcollection_shard1_replica3") + .setNode(jettys.get(2).getNodeName()) + .process(cloudClient).isSuccess()); + + waitForRecoveriesToFinish("unloadcollection", zkStateReader, false); + + // so that we start with some versions when we reload... + TestInjection.skipIndexWriterCommitOnClose = true; + + try (HttpSolrClient addClient = getHttpSolrClient(jettys.get(2).getBaseUrl() + "/unloadcollection_shard1_replica3", 30000)) { + + // add a few docs + for (int x = 20; x < 100; x++) { + SolrInputDocument doc1 = getDoc(id, x, i1, -600, tlong, 600, t1, + "humpty dumpy sat on a wall"); + addClient.add(doc1); + } + } + // don't commit so they remain in the tran log + //collectionClient.commit(); + + // unload the leader + try (HttpSolrClient collectionClient = getHttpSolrClient(leaderProps.getBaseUrl(), 15000, 30000)) { + + Unload unloadCmd = new Unload(false); + unloadCmd.setCoreName(leaderProps.getCoreName()); + ModifiableSolrParams p = (ModifiableSolrParams) unloadCmd.getParams(); + + collectionClient.request(unloadCmd); + } +// Thread.currentThread().sleep(500); +// printLayout(); + + int tries = 50; + while (leaderProps.getCoreUrl().equals(zkStateReader.getLeaderUrl("unloadcollection", "shard1", 15000))) { + Thread.sleep(100); + if (tries-- == 0) { + fail("Leader never changed"); + } + } + + // ensure there is a leader + zkStateReader.getLeaderRetry("unloadcollection", "shard1", 15000); + + try (HttpSolrClient addClient = getHttpSolrClient(jettys.get(1).getBaseUrl() + "/unloadcollection_shard1_replica2", 30000, 90000)) { + + // add a few docs while the leader is down + for (int x = 101; x < 200; x++) { + SolrInputDocument doc1 = getDoc(id, x, i1, -600, tlong, 600, t1, + "humpty dumpy sat on a wall"); + addClient.add(doc1); + } + } + + assertTrue(CollectionAdminRequest + .addReplicaToShard("unloadcollection", "shard1") + .setCoreName("unloadcollection_shard1_replica4") + .setNode(jettys.get(3).getNodeName()) + .process(cloudClient).isSuccess()); + + waitForRecoveriesToFinish("unloadcollection", zkStateReader, false); + + // unload the leader again + leaderProps = getLeaderUrlFromZk("unloadcollection", "shard1"); + try (HttpSolrClient collectionClient = getHttpSolrClient(leaderProps.getBaseUrl(), 15000, 30000)) { + + Unload unloadCmd = new Unload(false); + unloadCmd.setCoreName(leaderProps.getCoreName()); + collectionClient.request(unloadCmd); + } + tries = 50; + while (leaderProps.getCoreUrl().equals(zkStateReader.getLeaderUrl("unloadcollection", "shard1", 15000))) { + Thread.sleep(100); + if (tries-- == 0) { + fail("Leader never changed"); + } + } + + zkStateReader.getLeaderRetry("unloadcollection", "shard1", 15000); + + TestInjection.skipIndexWriterCommitOnClose = false; // set this back + assertTrue(CollectionAdminRequest + .addReplicaToShard("unloadcollection", "shard1") + .setCoreName(leaderProps.getCoreName()) + .setDataDir(core1DataDir) + .setNode(leaderProps.getNodeName()) + .process(cloudClient).isSuccess()); + + waitForRecoveriesToFinish("unloadcollection", zkStateReader, false); + + long found1, found3; + + try (HttpSolrClient adminClient = getHttpSolrClient(jettys.get(1).getBaseUrl() + "/unloadcollection_shard1_replica2", 15000, 30000)) { + adminClient.commit(); + SolrQuery q = new SolrQuery("*:*"); + q.set("distrib", false); + found1 = adminClient.query(q).getResults().getNumFound(); + } + + try (HttpSolrClient adminClient = getHttpSolrClient(jettys.get(2).getBaseUrl() + "/unloadcollection_shard1_replica3", 15000, 30000)) { + adminClient.commit(); + SolrQuery q = new SolrQuery("*:*"); + q.set("distrib", false); + found3 = adminClient.query(q).getResults().getNumFound(); + } + + try (HttpSolrClient adminClient = getHttpSolrClient(jettys.get(3).getBaseUrl() + "/unloadcollection_shard1_replica4", 15000, 30000)) { + adminClient.commit(); + SolrQuery q = new SolrQuery("*:*"); + q.set("distrib", false); + long found4 = adminClient.query(q).getResults().getNumFound(); + + // all 3 shards should now have the same number of docs + assertEquals(found1, found3); + assertEquals(found3, found4); + } + } + + private void testUnloadLotsOfCores() throws Exception { + JettySolrRunner jetty = jettys.get(0); + try (final HttpSolrClient adminClient = (HttpSolrClient) jetty.newClient(15000, 60000)) { + int numReplicas = atLeast(3); + ThreadPoolExecutor executor = new ExecutorUtil.MDCAwareThreadPoolExecutor(0, Integer.MAX_VALUE, + 5, TimeUnit.SECONDS, new SynchronousQueue<>(), + new SolrNamedThreadFactory("testExecutor")); + try { + // create the cores + createCollectionInOneInstance(adminClient, jetty.getNodeName(), executor, "multiunload", 2, numReplicas); + } finally { + ExecutorUtil.shutdownAndAwaitTermination(executor); + } + + executor = new ExecutorUtil.MDCAwareThreadPoolExecutor(0, Integer.MAX_VALUE, 5, + TimeUnit.SECONDS, new SynchronousQueue<>(), + new SolrNamedThreadFactory("testExecutor")); + try { + for (int j = 0; j < numReplicas; j++) { + final int freezeJ = j; + executor.execute(() -> { + Unload unloadCmd = new Unload(true); + unloadCmd.setCoreName("multiunload" + freezeJ); + try { + adminClient.request(unloadCmd); + } catch (SolrServerException | IOException e) { + throw new RuntimeException(e); + } + }); + Thread.sleep(random().nextInt(50)); + } + } finally { + ExecutorUtil.shutdownAndAwaitTermination(executor); + } + } + } +} From dfbb0e724a3bf7eea66f94bb90f69d4b7adbfeb5 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 6 Jul 2021 14:47:16 +0200 Subject: [PATCH 18/52] HDFS contrib module: separate HDFS test classes from Core test classes (12.: HdfsCollectionsAPIDistributedZkTest) - HdfsCollectionsAPIDistributedZkTest extends CollectionsAPIDistributedZkTest - introduced AbstractCollectionsAPIDistributedZkTestBase --- .../HdfsCollectionsAPIDistributedZkTest.java | 3 +- .../CollectionsAPIDistributedZkTest.java | 619 +---------------- ...ctCollectionsAPIDistributedZkTestBase.java | 645 ++++++++++++++++++ 3 files changed, 647 insertions(+), 620 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractCollectionsAPIDistributedZkTestBase.java diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java index 614fd8b7b1c..e7992c248a8 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java @@ -37,7 +37,7 @@ BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) @TimeoutSuite(millis = TimeUnits.HOUR) -public class HdfsCollectionsAPIDistributedZkTest extends CollectionsAPIDistributedZkTest { +public class HdfsCollectionsAPIDistributedZkTest extends AbstractCollectionsAPIDistributedZkTestBase { private static MiniDFSCluster dfsCluster; @BeforeClass @@ -54,7 +54,6 @@ public static void teardownClass() throws Exception { } } - @Override protected String getConfigSet() { return "cloud-hdfs"; } diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIDistributedZkTest.java index 5ec3c357a0b..2df701ed6a5 100644 --- a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIDistributedZkTest.java @@ -16,632 +16,15 @@ */ package org.apache.solr.cloud.api.collections; -import javax.management.MBeanServer; -import javax.management.MBeanServerFactory; -import javax.management.ObjectName; -import java.io.IOException; -import java.lang.invoke.MethodHandles; -import java.lang.management.ManagementFactory; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Optional; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -import com.google.common.collect.ImmutableList; import org.apache.lucene.util.LuceneTestCase.Slow; -import org.apache.lucene.util.TestUtil; -import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.embedded.JettySolrRunner; -import org.apache.solr.client.solrj.impl.BaseHttpSolrClient; -import org.apache.solr.client.solrj.impl.HttpSolrClient; -import org.apache.solr.client.solrj.request.CollectionAdminRequest; -import org.apache.solr.client.solrj.request.CoreAdminRequest; -import org.apache.solr.client.solrj.request.CoreStatus; -import org.apache.solr.client.solrj.request.QueryRequest; -import org.apache.solr.client.solrj.request.UpdateRequest; -import org.apache.solr.client.solrj.response.CollectionAdminResponse; -import org.apache.solr.client.solrj.response.CoreAdminResponse; -import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.cloud.DocCollection; -import org.apache.solr.common.cloud.Replica; -import org.apache.solr.common.cloud.Slice; -import org.apache.solr.common.cloud.ZkCoreNodeProps; -import org.apache.solr.common.cloud.ZkStateReader; -import org.apache.solr.common.params.CollectionParams.CollectionAction; -import org.apache.solr.common.params.CoreAdminParams; -import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.common.util.NamedList; -import org.apache.solr.common.util.TimeSource; -import org.apache.solr.core.CoreContainer; -import org.apache.solr.core.SolrCore; -import org.apache.solr.core.SolrInfoBean.Category; -import org.apache.solr.util.TestInjection; -import org.apache.solr.util.TimeOut; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static org.apache.solr.common.cloud.ZkStateReader.CORE_NAME_PROP; -import static org.apache.solr.common.cloud.ZkStateReader.REPLICATION_FACTOR; /** * Tests the Cloud Collections API. */ @Slow -public class CollectionsAPIDistributedZkTest extends SolrCloudTestCase { - private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); +public class CollectionsAPIDistributedZkTest extends AbstractCollectionsAPIDistributedZkTestBase { protected String getConfigSet() { return "cloud-minimal"; } - - @Before - public void setupCluster() throws Exception { - // we don't want this test to have zk timeouts - System.setProperty("zkClientTimeout", "60000"); - System.setProperty("createCollectionWaitTimeTillActive", "5"); - TestInjection.randomDelayInCoreCreation = "true:5"; - System.setProperty("validateAfterInactivity", "200"); - System.setProperty("solr.allowPaths", "*"); - - configureCluster(4) - .addConfig("conf", configset(getConfigSet())) - .addConfig("conf2", configset(getConfigSet())) - .withSolrXml(TEST_PATH().resolve("solr.xml")) - .configure(); - } - - @After - public void tearDownCluster() throws Exception { - try { - shutdownCluster(); - } finally { - System.clearProperty("createCollectionWaitTimeTillActive"); - System.clearProperty("solr.allowPaths"); - super.tearDown(); - } - } - - @Test - public void testCreationAndDeletion() throws Exception { - String collectionName = "created_and_deleted"; - - CollectionAdminRequest.createCollection(collectionName, "conf", 1, 1).process(cluster.getSolrClient()); - assertTrue(CollectionAdminRequest.listCollections(cluster.getSolrClient()) - .contains(collectionName)); - - CollectionAdminRequest.deleteCollection(collectionName).process(cluster.getSolrClient()); - assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()) - .contains(collectionName)); - - assertFalse(cluster.getZkClient().exists(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, true)); - } - - @Test - public void deleteCollectionRemovesStaleZkCollectionsNode() throws Exception { - String collectionName = "out_of_sync_collection"; - - // manually create a collections zknode - cluster.getZkClient().makePath(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, true); - - CollectionAdminRequest.deleteCollection(collectionName) - .process(cluster.getSolrClient()); - - assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()) - .contains(collectionName)); - - assertFalse(cluster.getZkClient().exists(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, true)); - } - - @Test - public void deletePartiallyCreatedCollection() throws Exception { - final String collectionName = "halfdeletedcollection"; - - assertEquals(0, CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1) - .setCreateNodeSet("") - .process(cluster.getSolrClient()).getStatus()); - String dataDir = createTempDir().toFile().getAbsolutePath(); - // create a core that simulates something left over from a partially-deleted collection - assertTrue(CollectionAdminRequest - .addReplicaToShard(collectionName, "shard1") - .setDataDir(dataDir) - .process(cluster.getSolrClient()).isSuccess()); - - CollectionAdminRequest.deleteCollection(collectionName) - .process(cluster.getSolrClient()); - - assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains(collectionName)); - - CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1) - .process(cluster.getSolrClient()); - - assertTrue(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains(collectionName)); - } - - @Test - public void deleteCollectionOnlyInZk() throws Exception { - final String collectionName = "onlyinzk"; - - // create the collections node, but nothing else - cluster.getZkClient().makePath(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, true); - - // delete via API - should remove collections node - CollectionAdminRequest.deleteCollection(collectionName).process(cluster.getSolrClient()); - assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains(collectionName)); - - // now creating that collection should work - CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1) - .process(cluster.getSolrClient()); - assertTrue(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains(collectionName)); - } - - @Test - public void testBadActionNames() { - // try a bad action - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("action", "BADACTION"); - String collectionName = "badactioncollection"; - params.set("name", collectionName); - params.set("numShards", 2); - final QueryRequest request = new QueryRequest(params); - request.setPath("/admin/collections"); - - expectThrows(Exception.class, () -> { - cluster.getSolrClient().request(request); - }); - } - - @Test - public void testMissingRequiredParameters() { - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("action", CollectionAction.CREATE.toString()); - params.set("numShards", 2); - // missing required collection parameter - final QueryRequest request = new QueryRequest(params); - request.setPath("/admin/collections"); - - expectThrows(Exception.class, () -> { - cluster.getSolrClient().request(request); - }); - } - - @Test - public void testMissingNumShards() { - // No numShards should fail - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("action", CollectionAction.CREATE.toString()); - params.set("name", "acollection"); - params.set(REPLICATION_FACTOR, 10); - params.set("collection.configName", "conf"); - - final QueryRequest request = new QueryRequest(params); - request.setPath("/admin/collections"); - - expectThrows(Exception.class, () -> { - cluster.getSolrClient().request(request); - }); - } - - @Test - public void testZeroNumShards() { - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("action", CollectionAction.CREATE.toString()); - params.set("name", "acollection"); - params.set(REPLICATION_FACTOR, 10); - params.set("numShards", 0); - params.set("collection.configName", "conf"); - - final QueryRequest request = new QueryRequest(params); - request.setPath("/admin/collections"); - expectThrows(Exception.class, () -> { - cluster.getSolrClient().request(request); - }); - } - - @Test - public void testCreateShouldFailOnExistingCore() throws Exception { - assertEquals(0, CollectionAdminRequest.createCollection("halfcollectionblocker", "conf", 1, 1) - .setCreateNodeSet("") - .process(cluster.getSolrClient()).getStatus()); - assertTrue(CollectionAdminRequest.addReplicaToShard("halfcollectionblocker", "shard1") - .setNode(cluster.getJettySolrRunner(0).getNodeName()) - .setCoreName("halfcollection_shard1_replica_n1") - .process(cluster.getSolrClient()).isSuccess()); - - assertEquals(0, CollectionAdminRequest.createCollection("halfcollectionblocker2", "conf",1, 1) - .setCreateNodeSet("") - .process(cluster.getSolrClient()).getStatus()); - assertTrue(CollectionAdminRequest.addReplicaToShard("halfcollectionblocker2", "shard1") - .setNode(cluster.getJettySolrRunner(1).getNodeName()) - .setCoreName("halfcollection_shard1_replica_n1") - .process(cluster.getSolrClient()).isSuccess()); - - String nn1 = cluster.getJettySolrRunner(0).getNodeName(); - String nn2 = cluster.getJettySolrRunner(1).getNodeName(); - - expectThrows(BaseHttpSolrClient.RemoteSolrException.class, () -> { - CollectionAdminResponse resp = CollectionAdminRequest.createCollection("halfcollection", "conf", 2, 1) - .setCreateNodeSet(nn1 + "," + nn2) - .process(cluster.getSolrClient()); - }); - } - - @Test - public void testNoConfigSetExist() throws Exception { - expectThrows(Exception.class, () -> { - CollectionAdminRequest.createCollection("noconfig", "conf123", 1, 1) - .process(cluster.getSolrClient()); - }); - - TimeUnit.MILLISECONDS.sleep(1000); - // in both cases, the collection should have default to the core name - cluster.getSolrClient().getZkStateReader().forceUpdateCollection("noconfig"); - assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains("noconfig")); - } - - @Test - public void testCoresAreDistributedAcrossNodes() throws Exception { - CollectionAdminRequest.createCollection("nodes_used_collection", "conf", 2, 2) - .process(cluster.getSolrClient()); - - Set liveNodes = cluster.getSolrClient().getZkStateReader().getClusterState().getLiveNodes(); - - List createNodeList = new ArrayList<>(liveNodes); - - DocCollection collection = getCollectionState("nodes_used_collection"); - for (Slice slice : collection.getSlices()) { - for (Replica replica : slice.getReplicas()) { - createNodeList.remove(replica.getNodeName()); - } - } - - assertEquals(createNodeList.toString(), 0, createNodeList.size()); - } - - @Test - public void testDeleteNonExistentCollection() throws Exception { - - expectThrows(SolrException.class, () -> { - CollectionAdminRequest.deleteCollection("unknown_collection").process(cluster.getSolrClient()); - }); - - // create another collection should still work - CollectionAdminRequest.createCollection("acollectionafterbaddelete", "conf", 1, 2) - .process(cluster.getSolrClient()); - waitForState("Collection creation after a bad delete failed", "acollectionafterbaddelete", - (n, c) -> DocCollection.isFullyActive(n, c, 1, 2)); - } - - @Test - public void testSpecificConfigsets() throws Exception { - CollectionAdminRequest.createCollection("withconfigset2", "conf2", 1, 1).process(cluster.getSolrClient()); - String configName = cluster.getSolrClient().getClusterStateProvider().getCollection("withconfigset2").getConfigName(); - assertEquals("conf2", configName); - } - - @Test - public void testCreateNodeSet() throws Exception { - JettySolrRunner jetty1 = cluster.getRandomJetty(random()); - JettySolrRunner jetty2 = cluster.getRandomJetty(random()); - - List baseUrls = ImmutableList.of(jetty1.getBaseUrl().toString(), jetty2.getBaseUrl().toString()); - - CollectionAdminRequest.createCollection("nodeset_collection", "conf", 2, 1) - .setCreateNodeSet(baseUrls.get(0) + "," + baseUrls.get(1)) - .process(cluster.getSolrClient()); - - DocCollection collectionState = getCollectionState("nodeset_collection"); - for (Replica replica : collectionState.getReplicas()) { - String replicaUrl = replica.getCoreUrl(); - boolean matchingJetty = false; - for (String jettyUrl : baseUrls) { - if (replicaUrl.startsWith(jettyUrl)) { - matchingJetty = true; - } - } - if (matchingJetty == false) { - fail("Expected replica to be on " + baseUrls + " but was on " + replicaUrl); - } - } - } - - @Test - //28-June-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") - // See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally - // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 09-Aug-2018 SOLR-12028 - public void testCollectionsAPI() throws Exception { - - // create new collections rapid fire - int cnt = random().nextInt(TEST_NIGHTLY ? 3 : 1) + 1; - CollectionAdminRequest.Create[] createRequests = new CollectionAdminRequest.Create[cnt]; - - class Coll { - String name; - int numShards; - int replicationFactor; - } - - List colls = new ArrayList<>(); - - for (int i = 0; i < cnt; i++) { - - int numShards = TestUtil.nextInt(random(), 0, cluster.getJettySolrRunners().size()) + 1; - int replicationFactor = TestUtil.nextInt(random(), 0, 3) + 1; - - createRequests[i] - = CollectionAdminRequest.createCollection("awhollynewcollection_" + i, "conf2", numShards, replicationFactor); - createRequests[i].processAsync(cluster.getSolrClient()); - - Coll coll = new Coll(); - coll.name = "awhollynewcollection_" + i; - coll.numShards = numShards; - coll.replicationFactor = replicationFactor; - colls.add(coll); - } - - for (Coll coll : colls) { - cluster.waitForActiveCollection(coll.name, coll.numShards, coll.numShards * coll.replicationFactor); - } - - waitForStable(cnt, createRequests); - - for (int i = 0; i < cluster.getJettySolrRunners().size(); i++) { - checkInstanceDirs(cluster.getJettySolrRunner(i)); - } - - String collectionName = createRequests[random().nextInt(createRequests.length)].getCollectionName(); - - // TODO: we should not need this...beast test well when trying to fix - Thread.sleep(1000); - - cluster.getSolrClient().getZkStateReader().forciblyRefreshAllClusterStateSlow(); - - new UpdateRequest() - .add("id", "6") - .add("id", "7") - .add("id", "8") - .commit(cluster.getSolrClient(), collectionName); - long numFound = 0; - TimeOut timeOut = new TimeOut(10, TimeUnit.SECONDS, TimeSource.NANO_TIME); - while (!timeOut.hasTimedOut()) { - - numFound = cluster.getSolrClient().query(collectionName, new SolrQuery("*:*")).getResults().getNumFound(); - if (numFound == 3) { - break; - } - - Thread.sleep(500); - } - - if (timeOut.hasTimedOut()) { - fail("Timeout waiting to see 3 found, instead saw " + numFound + " for collection " + collectionName); - } - - checkNoTwoShardsUseTheSameIndexDir(); - } - - private void waitForStable(int cnt, CollectionAdminRequest.Create[] createRequests) throws InterruptedException { - for (int i = 0; i < cnt; i++) { - String collectionName = "awhollynewcollection_" + i; - final int j = i; - waitForState("Expected to see collection " + collectionName, collectionName, - (n, c) -> { - CollectionAdminRequest.Create req = createRequests[j]; - return DocCollection.isFullyActive(n, c, req.getNumShards(), req.getReplicationFactor()); - }); - - ZkStateReader zkStateReader = cluster.getSolrClient().getZkStateReader(); - // make sure we have leaders for each shard - for (int z = 1; z < createRequests[j].getNumShards(); z++) { - zkStateReader.getLeaderRetry(collectionName, "shard" + z, 10000); - } // make sure we again have leaders for each shard - } - } - - @Test - public void testCollectionReload() throws Exception { - final String collectionName = "reloaded_collection"; - CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2).process(cluster.getSolrClient()); - - // get core open times - Map urlToTimeBefore = new HashMap<>(); - collectStartTimes(collectionName, urlToTimeBefore); - assertTrue(urlToTimeBefore.size() > 0); - - CollectionAdminRequest.reloadCollection(collectionName).processAsync(cluster.getSolrClient()); - - // reloads make take a short while - boolean allTimesAreCorrect = waitForReloads(collectionName, urlToTimeBefore); - assertTrue("some core start times did not change on reload", allTimesAreCorrect); - } - - private void checkInstanceDirs(JettySolrRunner jetty) throws IOException { - CoreContainer cores = jetty.getCoreContainer(); - Collection theCores = cores.getCores(); - for (SolrCore core : theCores) { - // look for core props file - Path instancedir = core.getInstancePath(); - assertTrue("Could not find expected core.properties file", Files.exists(instancedir.resolve("core.properties"))); - - Path expected = Paths.get(jetty.getSolrHome()).toAbsolutePath().resolve(core.getName()); - - assertTrue("Expected: " + expected + "\nFrom core stats: " + instancedir, Files.isSameFile(expected, instancedir)); - } - } - - private boolean waitForReloads(String collectionName, Map urlToTimeBefore) throws SolrServerException, IOException { - TimeOut timeout = new TimeOut(45, TimeUnit.SECONDS, TimeSource.NANO_TIME); - - boolean allTimesAreCorrect = false; - while (! timeout.hasTimedOut()) { - Map urlToTimeAfter = new HashMap<>(); - collectStartTimes(collectionName, urlToTimeAfter); - - boolean retry = false; - Set> entries = urlToTimeBefore.entrySet(); - for (Entry entry : entries) { - Long beforeTime = entry.getValue(); - Long afterTime = urlToTimeAfter.get(entry.getKey()); - assertNotNull(afterTime); - if (afterTime <= beforeTime) { - retry = true; - break; - } - - } - if (!retry) { - allTimesAreCorrect = true; - break; - } - } - return allTimesAreCorrect; - } - - private void collectStartTimes(String collectionName, Map urlToTime) - throws SolrServerException, IOException { - - DocCollection collectionState = getCollectionState(collectionName); - if (collectionState != null) { - for (Slice shard : collectionState) { - for (Replica replica : shard) { - ZkCoreNodeProps coreProps = new ZkCoreNodeProps(replica); - CoreStatus coreStatus; - try (HttpSolrClient server = getHttpSolrClient(coreProps.getBaseUrl())) { - coreStatus = CoreAdminRequest.getCoreStatus(coreProps.getCoreName(), false, server); - } - long before = coreStatus.getCoreStartTime().getTime(); - urlToTime.put(coreProps.getCoreUrl(), before); - } - } - } else { - throw new IllegalArgumentException("Could not find collection " + collectionName); - } - } - - private void checkNoTwoShardsUseTheSameIndexDir() { - Map> indexDirToShardNamesMap = new HashMap<>(); - - List servers = new LinkedList<>(); - servers.add(ManagementFactory.getPlatformMBeanServer()); - servers.addAll(MBeanServerFactory.findMBeanServer(null)); - for (final MBeanServer server : servers) { - Set mbeans = new HashSet<>(server.queryNames(null, null)); - for (final ObjectName mbean : mbeans) { - try { - Map props = mbean.getKeyPropertyList(); - String category = props.get("category"); - String name = props.get("name"); - if ((category != null && category.equals(Category.CORE.toString())) && - (name != null && name.equals("indexDir"))) { - String indexDir = server.getAttribute(mbean, "Value").toString(); - String key = props.get("dom2") + "." + props.get("dom3") + "." + props.get("dom4"); - if (!indexDirToShardNamesMap.containsKey(indexDir)) { - indexDirToShardNamesMap.put(indexDir, new HashSet<>()); - } - indexDirToShardNamesMap.get(indexDir).add(key); - } - } catch (Exception e) { - // ignore, just continue - probably a "Value" attribute - // not found - } - } - } - - assertTrue( - "Something is broken in the assert for no shards using the same indexDir - probably something was changed in the attributes published in the MBean of " - + SolrCore.class.getSimpleName() + " : " + indexDirToShardNamesMap, - indexDirToShardNamesMap.size() > 0); - for (Entry> entry : indexDirToShardNamesMap.entrySet()) { - if (entry.getValue().size() > 1) { - fail("We have shards using the same indexDir. E.g. shards " - + entry.getValue().toString() + " all use indexDir " - + entry.getKey()); - } - } - } - - @Test - public void addReplicaTest() throws Exception { - String collectionName = "addReplicaColl"; - - CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2) - .process(cluster.getSolrClient()); - cluster.waitForActiveCollection(collectionName, 2, 4); - - ArrayList nodeList - = new ArrayList<>(cluster.getSolrClient().getZkStateReader().getClusterState().getLiveNodes()); - Collections.shuffle(nodeList, random()); - - CollectionAdminResponse response = CollectionAdminRequest.addReplicaToShard(collectionName, "shard1") - .setNode(nodeList.get(0)) - .process(cluster.getSolrClient()); - Replica newReplica = grabNewReplica(response, getCollectionState(collectionName)); - - assertEquals("Replica should be created on the right node", - cluster.getSolrClient().getZkStateReader().getBaseUrlForNodeName(nodeList.get(0)), newReplica.getBaseUrl()); - - Path instancePath = createTempDir(); - response = CollectionAdminRequest.addReplicaToShard(collectionName, "shard1") - .withProperty(CoreAdminParams.INSTANCE_DIR, instancePath.toString()) - .process(cluster.getSolrClient()); - newReplica = grabNewReplica(response, getCollectionState(collectionName)); - assertNotNull(newReplica); - - try (HttpSolrClient coreclient = getHttpSolrClient(newReplica.getBaseUrl())) { - CoreAdminResponse status = CoreAdminRequest.getStatus(newReplica.getStr("core"), coreclient); - NamedList coreStatus = status.getCoreStatus(newReplica.getStr("core")); - String instanceDirStr = (String) coreStatus.get("instanceDir"); - assertEquals(instanceDirStr, instancePath.toString()); - } - - //Test to make sure we can't create another replica with an existing core_name of that collection - String coreName = newReplica.getStr(CORE_NAME_PROP); - SolrException e = expectThrows(SolrException.class, () -> { - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("action", "addreplica"); - params.set("collection", collectionName); - params.set("shard", "shard1"); - params.set("name", coreName); - QueryRequest request = new QueryRequest(params); - request.setPath("/admin/collections"); - cluster.getSolrClient().request(request); - }); - - assertTrue(e.getMessage().contains("Another replica with the same core name already exists for this collection")); - - // Check that specifying property.name works. DO NOT remove this when the "name" property is deprecated - // for ADDREPLICA, this is "property.name". See SOLR-7132 - response = CollectionAdminRequest.addReplicaToShard(collectionName, "shard1") - .withProperty(CoreAdminParams.NAME, "propertyDotName") - .process(cluster.getSolrClient()); - - newReplica = grabNewReplica(response, getCollectionState(collectionName)); - assertEquals("'core' should be 'propertyDotName' ", "propertyDotName", newReplica.getStr("core")); - } - - private Replica grabNewReplica(CollectionAdminResponse response, DocCollection docCollection) { - String replicaName = response.getCollectionCoresStatus().keySet().iterator().next(); - Optional optional = docCollection.getReplicas().stream() - .filter(replica -> replicaName.equals(replica.getCoreName())) - .findAny(); - if (optional.isPresent()) { - return optional.get(); - } - throw new AssertionError("Can not find " + replicaName + " from " + docCollection); - } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractCollectionsAPIDistributedZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractCollectionsAPIDistributedZkTestBase.java new file mode 100644 index 00000000000..d87b3eb7b0a --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractCollectionsAPIDistributedZkTestBase.java @@ -0,0 +1,645 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cloud.api.collections; + +import javax.management.MBeanServer; +import javax.management.MBeanServerFactory; +import javax.management.ObjectName; +import java.io.IOException; +import java.lang.invoke.MethodHandles; +import java.lang.management.ManagementFactory; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import com.google.common.collect.ImmutableList; +import org.apache.lucene.util.LuceneTestCase.Slow; +import org.apache.lucene.util.TestUtil; +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.embedded.JettySolrRunner; +import org.apache.solr.client.solrj.impl.BaseHttpSolrClient; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.request.CoreAdminRequest; +import org.apache.solr.client.solrj.request.CoreStatus; +import org.apache.solr.client.solrj.request.QueryRequest; +import org.apache.solr.client.solrj.request.UpdateRequest; +import org.apache.solr.client.solrj.response.CollectionAdminResponse; +import org.apache.solr.client.solrj.response.CoreAdminResponse; +import org.apache.solr.cloud.SolrCloudTestCase; +import org.apache.solr.common.SolrException; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.apache.solr.common.cloud.ZkCoreNodeProps; +import org.apache.solr.common.cloud.ZkStateReader; +import org.apache.solr.common.params.CollectionParams.CollectionAction; +import org.apache.solr.common.params.CoreAdminParams; +import org.apache.solr.common.params.ModifiableSolrParams; +import org.apache.solr.common.util.NamedList; +import org.apache.solr.common.util.TimeSource; +import org.apache.solr.core.CoreContainer; +import org.apache.solr.core.SolrCore; +import org.apache.solr.core.SolrInfoBean.Category; +import org.apache.solr.util.TestInjection; +import org.apache.solr.util.TimeOut; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static org.apache.solr.common.cloud.ZkStateReader.CORE_NAME_PROP; +import static org.apache.solr.common.cloud.ZkStateReader.REPLICATION_FACTOR; + +/** + * Tests the Cloud Collections API. + */ +@Slow +public abstract class AbstractCollectionsAPIDistributedZkTestBase extends SolrCloudTestCase { + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + abstract String getConfigSet(); + + @Before + public void setupCluster() throws Exception { + // we don't want this test to have zk timeouts + System.setProperty("zkClientTimeout", "60000"); + System.setProperty("createCollectionWaitTimeTillActive", "5"); + TestInjection.randomDelayInCoreCreation = "true:5"; + System.setProperty("validateAfterInactivity", "200"); + System.setProperty("solr.allowPaths", "*"); + + configureCluster(4) + .addConfig("conf", configset(getConfigSet())) + .addConfig("conf2", configset(getConfigSet())) + .withSolrXml(TEST_PATH().resolve("solr.xml")) + .configure(); + } + + @After + public void tearDownCluster() throws Exception { + try { + shutdownCluster(); + } finally { + System.clearProperty("createCollectionWaitTimeTillActive"); + System.clearProperty("solr.allowPaths"); + super.tearDown(); + } + } + + @Test + public void testCreationAndDeletion() throws Exception { + String collectionName = "created_and_deleted"; + + CollectionAdminRequest.createCollection(collectionName, "conf", 1, 1).process(cluster.getSolrClient()); + assertTrue(CollectionAdminRequest.listCollections(cluster.getSolrClient()) + .contains(collectionName)); + + CollectionAdminRequest.deleteCollection(collectionName).process(cluster.getSolrClient()); + assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()) + .contains(collectionName)); + + assertFalse(cluster.getZkClient().exists(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, true)); + } + + @Test + public void deleteCollectionRemovesStaleZkCollectionsNode() throws Exception { + String collectionName = "out_of_sync_collection"; + + // manually create a collections zknode + cluster.getZkClient().makePath(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, true); + + CollectionAdminRequest.deleteCollection(collectionName) + .process(cluster.getSolrClient()); + + assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()) + .contains(collectionName)); + + assertFalse(cluster.getZkClient().exists(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, true)); + } + + @Test + public void deletePartiallyCreatedCollection() throws Exception { + final String collectionName = "halfdeletedcollection"; + + assertEquals(0, CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1) + .setCreateNodeSet("") + .process(cluster.getSolrClient()).getStatus()); + String dataDir = createTempDir().toFile().getAbsolutePath(); + // create a core that simulates something left over from a partially-deleted collection + assertTrue(CollectionAdminRequest + .addReplicaToShard(collectionName, "shard1") + .setDataDir(dataDir) + .process(cluster.getSolrClient()).isSuccess()); + + CollectionAdminRequest.deleteCollection(collectionName) + .process(cluster.getSolrClient()); + + assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains(collectionName)); + + CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1) + .process(cluster.getSolrClient()); + + assertTrue(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains(collectionName)); + } + + @Test + public void deleteCollectionOnlyInZk() throws Exception { + final String collectionName = "onlyinzk"; + + // create the collections node, but nothing else + cluster.getZkClient().makePath(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, true); + + // delete via API - should remove collections node + CollectionAdminRequest.deleteCollection(collectionName).process(cluster.getSolrClient()); + assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains(collectionName)); + + // now creating that collection should work + CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1) + .process(cluster.getSolrClient()); + assertTrue(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains(collectionName)); + } + + @Test + public void testBadActionNames() { + // try a bad action + ModifiableSolrParams params = new ModifiableSolrParams(); + params.set("action", "BADACTION"); + String collectionName = "badactioncollection"; + params.set("name", collectionName); + params.set("numShards", 2); + final QueryRequest request = new QueryRequest(params); + request.setPath("/admin/collections"); + + expectThrows(Exception.class, () -> { + cluster.getSolrClient().request(request); + }); + } + + @Test + public void testMissingRequiredParameters() { + ModifiableSolrParams params = new ModifiableSolrParams(); + params.set("action", CollectionAction.CREATE.toString()); + params.set("numShards", 2); + // missing required collection parameter + final QueryRequest request = new QueryRequest(params); + request.setPath("/admin/collections"); + + expectThrows(Exception.class, () -> { + cluster.getSolrClient().request(request); + }); + } + + @Test + public void testMissingNumShards() { + // No numShards should fail + ModifiableSolrParams params = new ModifiableSolrParams(); + params.set("action", CollectionAction.CREATE.toString()); + params.set("name", "acollection"); + params.set(REPLICATION_FACTOR, 10); + params.set("collection.configName", "conf"); + + final QueryRequest request = new QueryRequest(params); + request.setPath("/admin/collections"); + + expectThrows(Exception.class, () -> { + cluster.getSolrClient().request(request); + }); + } + + @Test + public void testZeroNumShards() { + ModifiableSolrParams params = new ModifiableSolrParams(); + params.set("action", CollectionAction.CREATE.toString()); + params.set("name", "acollection"); + params.set(REPLICATION_FACTOR, 10); + params.set("numShards", 0); + params.set("collection.configName", "conf"); + + final QueryRequest request = new QueryRequest(params); + request.setPath("/admin/collections"); + expectThrows(Exception.class, () -> { + cluster.getSolrClient().request(request); + }); + } + + @Test + public void testCreateShouldFailOnExistingCore() throws Exception { + assertEquals(0, CollectionAdminRequest.createCollection("halfcollectionblocker", "conf", 1, 1) + .setCreateNodeSet("") + .process(cluster.getSolrClient()).getStatus()); + assertTrue(CollectionAdminRequest.addReplicaToShard("halfcollectionblocker", "shard1") + .setNode(cluster.getJettySolrRunner(0).getNodeName()) + .setCoreName("halfcollection_shard1_replica_n1") + .process(cluster.getSolrClient()).isSuccess()); + + assertEquals(0, CollectionAdminRequest.createCollection("halfcollectionblocker2", "conf",1, 1) + .setCreateNodeSet("") + .process(cluster.getSolrClient()).getStatus()); + assertTrue(CollectionAdminRequest.addReplicaToShard("halfcollectionblocker2", "shard1") + .setNode(cluster.getJettySolrRunner(1).getNodeName()) + .setCoreName("halfcollection_shard1_replica_n1") + .process(cluster.getSolrClient()).isSuccess()); + + String nn1 = cluster.getJettySolrRunner(0).getNodeName(); + String nn2 = cluster.getJettySolrRunner(1).getNodeName(); + + expectThrows(BaseHttpSolrClient.RemoteSolrException.class, () -> { + CollectionAdminResponse resp = CollectionAdminRequest.createCollection("halfcollection", "conf", 2, 1) + .setCreateNodeSet(nn1 + "," + nn2) + .process(cluster.getSolrClient()); + }); + } + + @Test + public void testNoConfigSetExist() throws Exception { + expectThrows(Exception.class, () -> { + CollectionAdminRequest.createCollection("noconfig", "conf123", 1, 1) + .process(cluster.getSolrClient()); + }); + + TimeUnit.MILLISECONDS.sleep(1000); + // in both cases, the collection should have default to the core name + cluster.getSolrClient().getZkStateReader().forceUpdateCollection("noconfig"); + assertFalse(CollectionAdminRequest.listCollections(cluster.getSolrClient()).contains("noconfig")); + } + + @Test + public void testCoresAreDistributedAcrossNodes() throws Exception { + CollectionAdminRequest.createCollection("nodes_used_collection", "conf", 2, 2) + .process(cluster.getSolrClient()); + + Set liveNodes = cluster.getSolrClient().getZkStateReader().getClusterState().getLiveNodes(); + + List createNodeList = new ArrayList<>(liveNodes); + + DocCollection collection = getCollectionState("nodes_used_collection"); + for (Slice slice : collection.getSlices()) { + for (Replica replica : slice.getReplicas()) { + createNodeList.remove(replica.getNodeName()); + } + } + + assertEquals(createNodeList.toString(), 0, createNodeList.size()); + } + + @Test + public void testDeleteNonExistentCollection() throws Exception { + + expectThrows(SolrException.class, () -> { + CollectionAdminRequest.deleteCollection("unknown_collection").process(cluster.getSolrClient()); + }); + + // create another collection should still work + CollectionAdminRequest.createCollection("acollectionafterbaddelete", "conf", 1, 2) + .process(cluster.getSolrClient()); + waitForState("Collection creation after a bad delete failed", "acollectionafterbaddelete", + (n, c) -> DocCollection.isFullyActive(n, c, 1, 2)); + } + + @Test + public void testSpecificConfigsets() throws Exception { + CollectionAdminRequest.createCollection("withconfigset2", "conf2", 1, 1).process(cluster.getSolrClient()); + String configName = cluster.getSolrClient().getClusterStateProvider().getCollection("withconfigset2").getConfigName(); + assertEquals("conf2", configName); + } + + @Test + public void testCreateNodeSet() throws Exception { + JettySolrRunner jetty1 = cluster.getRandomJetty(random()); + JettySolrRunner jetty2 = cluster.getRandomJetty(random()); + + List baseUrls = ImmutableList.of(jetty1.getBaseUrl().toString(), jetty2.getBaseUrl().toString()); + + CollectionAdminRequest.createCollection("nodeset_collection", "conf", 2, 1) + .setCreateNodeSet(baseUrls.get(0) + "," + baseUrls.get(1)) + .process(cluster.getSolrClient()); + + DocCollection collectionState = getCollectionState("nodeset_collection"); + for (Replica replica : collectionState.getReplicas()) { + String replicaUrl = replica.getCoreUrl(); + boolean matchingJetty = false; + for (String jettyUrl : baseUrls) { + if (replicaUrl.startsWith(jettyUrl)) { + matchingJetty = true; + } + } + if (matchingJetty == false) { + fail("Expected replica to be on " + baseUrls + " but was on " + replicaUrl); + } + } + } + + @Test + //28-June-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") + // See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally + // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 09-Aug-2018 SOLR-12028 + public void testCollectionsAPI() throws Exception { + + // create new collections rapid fire + int cnt = random().nextInt(TEST_NIGHTLY ? 3 : 1) + 1; + CollectionAdminRequest.Create[] createRequests = new CollectionAdminRequest.Create[cnt]; + + class Coll { + String name; + int numShards; + int replicationFactor; + } + + List colls = new ArrayList<>(); + + for (int i = 0; i < cnt; i++) { + + int numShards = TestUtil.nextInt(random(), 0, cluster.getJettySolrRunners().size()) + 1; + int replicationFactor = TestUtil.nextInt(random(), 0, 3) + 1; + + createRequests[i] + = CollectionAdminRequest.createCollection("awhollynewcollection_" + i, "conf2", numShards, replicationFactor); + createRequests[i].processAsync(cluster.getSolrClient()); + + Coll coll = new Coll(); + coll.name = "awhollynewcollection_" + i; + coll.numShards = numShards; + coll.replicationFactor = replicationFactor; + colls.add(coll); + } + + for (Coll coll : colls) { + cluster.waitForActiveCollection(coll.name, coll.numShards, coll.numShards * coll.replicationFactor); + } + + waitForStable(cnt, createRequests); + + for (int i = 0; i < cluster.getJettySolrRunners().size(); i++) { + checkInstanceDirs(cluster.getJettySolrRunner(i)); + } + + String collectionName = createRequests[random().nextInt(createRequests.length)].getCollectionName(); + + // TODO: we should not need this...beast test well when trying to fix + Thread.sleep(1000); + + cluster.getSolrClient().getZkStateReader().forciblyRefreshAllClusterStateSlow(); + + new UpdateRequest() + .add("id", "6") + .add("id", "7") + .add("id", "8") + .commit(cluster.getSolrClient(), collectionName); + long numFound = 0; + TimeOut timeOut = new TimeOut(10, TimeUnit.SECONDS, TimeSource.NANO_TIME); + while (!timeOut.hasTimedOut()) { + + numFound = cluster.getSolrClient().query(collectionName, new SolrQuery("*:*")).getResults().getNumFound(); + if (numFound == 3) { + break; + } + + Thread.sleep(500); + } + + if (timeOut.hasTimedOut()) { + fail("Timeout waiting to see 3 found, instead saw " + numFound + " for collection " + collectionName); + } + + checkNoTwoShardsUseTheSameIndexDir(); + } + + private void waitForStable(int cnt, CollectionAdminRequest.Create[] createRequests) throws InterruptedException { + for (int i = 0; i < cnt; i++) { + String collectionName = "awhollynewcollection_" + i; + final int j = i; + waitForState("Expected to see collection " + collectionName, collectionName, + (n, c) -> { + CollectionAdminRequest.Create req = createRequests[j]; + return DocCollection.isFullyActive(n, c, req.getNumShards(), req.getReplicationFactor()); + }); + + ZkStateReader zkStateReader = cluster.getSolrClient().getZkStateReader(); + // make sure we have leaders for each shard + for (int z = 1; z < createRequests[j].getNumShards(); z++) { + zkStateReader.getLeaderRetry(collectionName, "shard" + z, 10000); + } // make sure we again have leaders for each shard + } + } + + @Test + public void testCollectionReload() throws Exception { + final String collectionName = "reloaded_collection"; + CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2).process(cluster.getSolrClient()); + + // get core open times + Map urlToTimeBefore = new HashMap<>(); + collectStartTimes(collectionName, urlToTimeBefore); + assertTrue(urlToTimeBefore.size() > 0); + + CollectionAdminRequest.reloadCollection(collectionName).processAsync(cluster.getSolrClient()); + + // reloads make take a short while + boolean allTimesAreCorrect = waitForReloads(collectionName, urlToTimeBefore); + assertTrue("some core start times did not change on reload", allTimesAreCorrect); + } + + private void checkInstanceDirs(JettySolrRunner jetty) throws IOException { + CoreContainer cores = jetty.getCoreContainer(); + Collection theCores = cores.getCores(); + for (SolrCore core : theCores) { + // look for core props file + Path instancedir = core.getInstancePath(); + assertTrue("Could not find expected core.properties file", Files.exists(instancedir.resolve("core.properties"))); + + Path expected = Paths.get(jetty.getSolrHome()).toAbsolutePath().resolve(core.getName()); + + assertTrue("Expected: " + expected + "\nFrom core stats: " + instancedir, Files.isSameFile(expected, instancedir)); + } + } + + private boolean waitForReloads(String collectionName, Map urlToTimeBefore) throws SolrServerException, IOException { + TimeOut timeout = new TimeOut(45, TimeUnit.SECONDS, TimeSource.NANO_TIME); + + boolean allTimesAreCorrect = false; + while (! timeout.hasTimedOut()) { + Map urlToTimeAfter = new HashMap<>(); + collectStartTimes(collectionName, urlToTimeAfter); + + boolean retry = false; + Set> entries = urlToTimeBefore.entrySet(); + for (Entry entry : entries) { + Long beforeTime = entry.getValue(); + Long afterTime = urlToTimeAfter.get(entry.getKey()); + assertNotNull(afterTime); + if (afterTime <= beforeTime) { + retry = true; + break; + } + + } + if (!retry) { + allTimesAreCorrect = true; + break; + } + } + return allTimesAreCorrect; + } + + private void collectStartTimes(String collectionName, Map urlToTime) + throws SolrServerException, IOException { + + DocCollection collectionState = getCollectionState(collectionName); + if (collectionState != null) { + for (Slice shard : collectionState) { + for (Replica replica : shard) { + ZkCoreNodeProps coreProps = new ZkCoreNodeProps(replica); + CoreStatus coreStatus; + try (HttpSolrClient server = getHttpSolrClient(coreProps.getBaseUrl())) { + coreStatus = CoreAdminRequest.getCoreStatus(coreProps.getCoreName(), false, server); + } + long before = coreStatus.getCoreStartTime().getTime(); + urlToTime.put(coreProps.getCoreUrl(), before); + } + } + } else { + throw new IllegalArgumentException("Could not find collection " + collectionName); + } + } + + private void checkNoTwoShardsUseTheSameIndexDir() { + Map> indexDirToShardNamesMap = new HashMap<>(); + + List servers = new LinkedList<>(); + servers.add(ManagementFactory.getPlatformMBeanServer()); + servers.addAll(MBeanServerFactory.findMBeanServer(null)); + for (final MBeanServer server : servers) { + Set mbeans = new HashSet<>(server.queryNames(null, null)); + for (final ObjectName mbean : mbeans) { + try { + Map props = mbean.getKeyPropertyList(); + String category = props.get("category"); + String name = props.get("name"); + if ((category != null && category.equals(Category.CORE.toString())) && + (name != null && name.equals("indexDir"))) { + String indexDir = server.getAttribute(mbean, "Value").toString(); + String key = props.get("dom2") + "." + props.get("dom3") + "." + props.get("dom4"); + if (!indexDirToShardNamesMap.containsKey(indexDir)) { + indexDirToShardNamesMap.put(indexDir, new HashSet<>()); + } + indexDirToShardNamesMap.get(indexDir).add(key); + } + } catch (Exception e) { + // ignore, just continue - probably a "Value" attribute + // not found + } + } + } + + assertTrue( + "Something is broken in the assert for no shards using the same indexDir - probably something was changed in the attributes published in the MBean of " + + SolrCore.class.getSimpleName() + " : " + indexDirToShardNamesMap, + indexDirToShardNamesMap.size() > 0); + for (Entry> entry : indexDirToShardNamesMap.entrySet()) { + if (entry.getValue().size() > 1) { + fail("We have shards using the same indexDir. E.g. shards " + + entry.getValue().toString() + " all use indexDir " + + entry.getKey()); + } + } + } + + @Test + public void addReplicaTest() throws Exception { + String collectionName = "addReplicaColl"; + + CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2) + .process(cluster.getSolrClient()); + cluster.waitForActiveCollection(collectionName, 2, 4); + + ArrayList nodeList + = new ArrayList<>(cluster.getSolrClient().getZkStateReader().getClusterState().getLiveNodes()); + Collections.shuffle(nodeList, random()); + + CollectionAdminResponse response = CollectionAdminRequest.addReplicaToShard(collectionName, "shard1") + .setNode(nodeList.get(0)) + .process(cluster.getSolrClient()); + Replica newReplica = grabNewReplica(response, getCollectionState(collectionName)); + + assertEquals("Replica should be created on the right node", + cluster.getSolrClient().getZkStateReader().getBaseUrlForNodeName(nodeList.get(0)), newReplica.getBaseUrl()); + + Path instancePath = createTempDir(); + response = CollectionAdminRequest.addReplicaToShard(collectionName, "shard1") + .withProperty(CoreAdminParams.INSTANCE_DIR, instancePath.toString()) + .process(cluster.getSolrClient()); + newReplica = grabNewReplica(response, getCollectionState(collectionName)); + assertNotNull(newReplica); + + try (HttpSolrClient coreclient = getHttpSolrClient(newReplica.getBaseUrl())) { + CoreAdminResponse status = CoreAdminRequest.getStatus(newReplica.getStr("core"), coreclient); + NamedList coreStatus = status.getCoreStatus(newReplica.getStr("core")); + String instanceDirStr = (String) coreStatus.get("instanceDir"); + assertEquals(instanceDirStr, instancePath.toString()); + } + + //Test to make sure we can't create another replica with an existing core_name of that collection + String coreName = newReplica.getStr(CORE_NAME_PROP); + SolrException e = expectThrows(SolrException.class, () -> { + ModifiableSolrParams params = new ModifiableSolrParams(); + params.set("action", "addreplica"); + params.set("collection", collectionName); + params.set("shard", "shard1"); + params.set("name", coreName); + QueryRequest request = new QueryRequest(params); + request.setPath("/admin/collections"); + cluster.getSolrClient().request(request); + }); + + assertTrue(e.getMessage().contains("Another replica with the same core name already exists for this collection")); + + // Check that specifying property.name works. DO NOT remove this when the "name" property is deprecated + // for ADDREPLICA, this is "property.name". See SOLR-7132 + response = CollectionAdminRequest.addReplicaToShard(collectionName, "shard1") + .withProperty(CoreAdminParams.NAME, "propertyDotName") + .process(cluster.getSolrClient()); + + newReplica = grabNewReplica(response, getCollectionState(collectionName)); + assertEquals("'core' should be 'propertyDotName' ", "propertyDotName", newReplica.getStr("core")); + } + + private Replica grabNewReplica(CollectionAdminResponse response, DocCollection docCollection) { + String replicaName = response.getCollectionCoresStatus().keySet().iterator().next(); + Optional optional = docCollection.getReplicas().stream() + .filter(replica -> replicaName.equals(replica.getCoreName())) + .findAny(); + if (optional.isPresent()) { + return optional.get(); + } + throw new AssertionError("Can not find " + replicaName + " from " + docCollection); + } +} From 1d5ee1f10d30c7e92b61bd9f36ea0194bb93b712 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Thu, 8 Jul 2021 00:08:32 +0200 Subject: [PATCH 19/52] HDFS contrib module: moved Fake Group Mapping to test fixtures so it can be accessed by hdfs module tests --- solr/core/src/test-files/core-site.xml | 2 +- .../java/org/apache/solr/cloud/hadoop}/FakeGroupMapping.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename solr/{contrib/hdfs/src/test/org/apache/solr/cloud/hdfs => core/src/testFixtures/java/org/apache/solr/cloud/hadoop}/FakeGroupMapping.java (97%) diff --git a/solr/core/src/test-files/core-site.xml b/solr/core/src/test-files/core-site.xml index df15d529354..994ca6d8772 100644 --- a/solr/core/src/test-files/core-site.xml +++ b/solr/core/src/test-files/core-site.xml @@ -18,6 +18,6 @@ hadoop.security.group.mapping - org.apache.solr.cloud.hdfs.FakeGroupMapping + org.apache.solr.cloud.hadoop.FakeGroupMapping diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/FakeGroupMapping.java b/solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java similarity index 97% rename from solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/FakeGroupMapping.java rename to solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java index fae1b00f7d0..52002fd3e1e 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/FakeGroupMapping.java +++ b/solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.solr.cloud.hdfs; +package org.apache.solr.cloud.hadoop; import java.util.Collections; import java.util.List; From f60f7a13a46f16f7067834f865c4c8a3aeae238a Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Thu, 8 Jul 2021 19:24:00 +0200 Subject: [PATCH 20/52] HDFS contrib module: added missing dependencies to gradle build, added new test files --- solr/contrib/hdfs/build.gradle | 10 +++ .../configsets/cloud-minimal/conf/schema.xml | 29 +++++++++ .../cloud-minimal/conf/solrconfig.xml | 51 +++++++++++++++ .../configsets/cloud-subdirs/conf/schema.xml | 28 +++++++++ .../cloud-subdirs/conf/solrconfig.xml | 48 ++++++++++++++ .../conf/stopwords/stopwords-en.txt | 62 +++++++++++++++++++ .../contrib/hdfs/src/test-files/solr/solr.xml | 55 ++++++++++++++++ 7 files changed, 283 insertions(+) create mode 100644 solr/contrib/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/schema.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/solrconfig.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/schema.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/solrconfig.xml create mode 100644 solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/stopwords/stopwords-en.txt create mode 100644 solr/contrib/hdfs/src/test-files/solr/solr.xml diff --git a/solr/contrib/hdfs/build.gradle b/solr/contrib/hdfs/build.gradle index c9e9c619e01..71c8843f884 100644 --- a/solr/contrib/hdfs/build.gradle +++ b/solr/contrib/hdfs/build.gradle @@ -33,11 +33,21 @@ dependencies { exclude group: "org.checkerframework", module: "checker-qual" }) + // Many HDFS tests are using/subclassing test framework classes testImplementation project(':solr:test-framework') + + // HDFS tests depend on core fixture classes testImplementation(testFixtures(project(":solr:core"))) + // hadoop dependencies for tests testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-hdfs::tests') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-minikdc') { transitive = false } + + // classes like solr.ICUCollationField, used by NNFailoverTest for example. + testImplementation project(':solr:contrib:analysis-extras') + + // required for instantiating a Zookeeper server in tests or embedded + runtimeOnly ('org.xerial.snappy:snappy-java') } diff --git a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/schema.xml b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/schema.xml new file mode 100644 index 00000000000..4124feab0c3 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/schema.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/solrconfig.xml new file mode 100644 index 00000000000..853ba656241 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/solrconfig.xml @@ -0,0 +1,51 @@ + + + + + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + explicit + true + text + + + + + +: + + diff --git a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/schema.xml b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/schema.xml new file mode 100644 index 00000000000..52a63f41944 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/schema.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + id + diff --git a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/solrconfig.xml new file mode 100644 index 00000000000..059e58f447c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/solrconfig.xml @@ -0,0 +1,48 @@ + + + + + + + + + ${solr.data.dir:} + + + + + ${tests.luceneMatchVersion:LATEST} + + + + ${solr.commitwithin.softcommit:true} + + + + + + + explicit + true + text + + + + + diff --git a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/stopwords/stopwords-en.txt b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/stopwords/stopwords-en.txt new file mode 100644 index 00000000000..5f155dd2588 --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/stopwords/stopwords-en.txt @@ -0,0 +1,62 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +# a couple of test stopwords to test that the words are really being +# configured from this file: +# So far, this is here only to be able to test the configset upload +# and download and local->ZK recursive upload and download process +# + +stopworda +stopwordb + +#Standard english stop words taken from Lucene's StopAnalyzer +a +an +and +are +as +at +be +but +by +for +if +in +into +is +it +no +not +of +on +or +s +such +t +that +the +their +then +there +these +they +this +to +was +will +with + diff --git a/solr/contrib/hdfs/src/test-files/solr/solr.xml b/solr/contrib/hdfs/src/test-files/solr/solr.xml new file mode 100644 index 00000000000..735388f638c --- /dev/null +++ b/solr/contrib/hdfs/src/test-files/solr/solr.xml @@ -0,0 +1,55 @@ + + + + + + + + + ${shareSchema:false} + ${configSetBaseDir:configsets} + ${coreRootDirectory:.} + ${solr.allowPaths:} + ${solr.tests.allowUrls:} + + + ${urlScheme:} + ${socketTimeout:15000} + ${connTimeout:15000} + + + + 4 + + + + + 127.0.0.1 + ${hostPort:8983} + ${hostContext:solr} + ${solr.zkclienttimeout:60000} + ${genericCoreNodeNames:true} + ${leaderVoteWait:15000} + ${leaderConflictResolveWait:45000} + ${distribUpdateConnTimeout:5000} + ${distribUpdateSoTimeout:30000} + + + From cee1e28dd938bd70ee881f9391f9f63456a81b43 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Fri, 9 Jul 2021 14:49:06 +0200 Subject: [PATCH 21/52] HDFS contrib module: fix renderJavaDoc errors --- gradle/documentation/render-javadoc.gradle | 13 ++++++++++ .../solr/handler/BackupStatusChecker.java | 6 ++--- .../java/org/apache/solr/handler/package.html | 24 +++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 solr/test-framework/src/java/org/apache/solr/handler/package.html diff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradle index 27cc73d9feb..ebbb2ae212c 100644 --- a/gradle/documentation/render-javadoc.gradle +++ b/gradle/documentation/render-javadoc.gradle @@ -151,6 +151,7 @@ configure(project(":solr:test-framework")) { "org.apache.solr.analysis", "org.apache.solr.cloud", "org.apache.solr.core", + "org.apache.solr.handler", "org.apache.solr.handler.component", "org.apache.solr.update.processor", "org.apache.solr.util" @@ -158,6 +159,18 @@ configure(project(":solr:test-framework")) { } } +configure(project(":solr:contrib:hdfs")) { + project.tasks.withType(RenderJavadocTask) { + javadocMissingIgnore = [ + "org.apache.solr", + "org.apache.solr.core", + "org.apache.solr.core.backup.repository", + "org.apache.solr.update", + "org.apache.solr.util" + ] + } +} + // Fix for Java 11 Javadoc tool that cannot handle split packages between modules correctly. // (by removing all the packages which are part of lucene-core) // See: https://issues.apache.org/jira/browse/LUCENE-8738?focusedCommentId=16818106&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16818106 diff --git a/solr/test-framework/src/java/org/apache/solr/handler/BackupStatusChecker.java b/solr/test-framework/src/java/org/apache/solr/handler/BackupStatusChecker.java index 89d99db648c..1db896811a2 100644 --- a/solr/test-framework/src/java/org/apache/solr/handler/BackupStatusChecker.java +++ b/solr/test-framework/src/java/org/apache/solr/handler/BackupStatusChecker.java @@ -166,7 +166,7 @@ public String waitForDifferentBackupDir(final String directoryName, final TimeOu * if the the most recently reported status to the a particular backup request. *

* - * @returns the "directoryName" of the backup if the response indicates that a is completed successfully, otherwise null + * @return the "directoryName" of the backup if the response indicates that a is completed successfully, otherwise null */ public String checkBackupSuccess() throws Exception { return _checkBackupSuccess(null); @@ -179,7 +179,7 @@ public String checkBackupSuccess() throws Exception { * (The Replication Handler API does not make it possible to know which backup * this exception was related to) * - * @returns the "directoryName" of the backup if the response indicates that the specified backupName is completed successfully, otherwise null + * @return the "directoryName" of the backup if the response indicates that the specified backupName is completed successfully, otherwise null * @see #waitForBackupSuccess(String,TimeOut) */ public String checkBackupSuccess(final String backupName) throws Exception { @@ -260,7 +260,7 @@ public void waitForBackupDeletionSuccess(final String backupName, final TimeOut * Throws a test assertion failure if the status is about this backupName but the starts message * with "Unable to delete" * - * @returns true if the replication status info indicates the backup was deleted, false otherwise + * @return true if the replication status info indicates the backup was deleted, false otherwise * @see #waitForBackupDeletionSuccess(String,TimeOut) */ public boolean checkBackupDeletionSuccess(final String backupName) throws Exception { diff --git a/solr/test-framework/src/java/org/apache/solr/handler/package.html b/solr/test-framework/src/java/org/apache/solr/handler/package.html new file mode 100644 index 00000000000..553e5c1484c --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/handler/package.html @@ -0,0 +1,24 @@ + + + + + +Concrete implementations of org.apache.solr.request.SolrRequestHandler + + + From c0be894c2127c6b24eebd29aa95fc39d72e8c7bd Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Mon, 12 Jul 2021 13:12:09 +0200 Subject: [PATCH 22/52] HDFS contrib module: removed deprecated flags --- .../src/java/org/apache/solr/core/HdfsDirectoryFactory.java | 4 ---- .../solr/core/backup/repository/HdfsBackupRepository.java | 6 ------ .../src/java/org/apache/solr/store/hdfs/HdfsDirectory.java | 6 ------ .../src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java | 2 -- .../org/apache/solr/store/hdfs/HdfsLocalityReporter.java | 4 ---- .../java/org/apache/solr/store/hdfs/HdfsLockFactory.java | 4 ---- .../src/java/org/apache/solr/update/HdfsTransactionLog.java | 2 -- .../hdfs/src/java/org/apache/solr/update/HdfsUpdateLog.java | 2 -- 8 files changed, 30 deletions(-) diff --git a/solr/contrib/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java b/solr/contrib/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java index 6b7c105b094..c5e9c6fc9f3 100644 --- a/solr/contrib/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java +++ b/solr/contrib/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java @@ -71,10 +71,6 @@ import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION; -/** - * @deprecated since 8.6 - */ -@Deprecated public class HdfsDirectoryFactory extends CachingDirectoryFactory implements SolrCoreAware, SolrMetricProducer { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); diff --git a/solr/contrib/hdfs/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java b/solr/contrib/hdfs/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java index 632bca91e94..a1f9aebb48d 100644 --- a/solr/contrib/hdfs/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java +++ b/solr/contrib/hdfs/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java @@ -46,10 +46,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - * @deprecated since 8.6 - */ -@Deprecated public class HdfsBackupRepository implements BackupRepository { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @@ -67,8 +63,6 @@ public class HdfsBackupRepository implements BackupRepository { public void init(NamedList args) { this.config = args; - log.warn("HDFS support in Solr has been deprecated as of 8.6. See SOLR-14021 for details."); - // Configure the size of the buffer used for copying index files to/from HDFS, if specified. if (args.get(HDFS_COPY_BUFFER_SIZE_PARAM) != null) { this.copyBufferSize = (Integer)args.get(HDFS_COPY_BUFFER_SIZE_PARAM); diff --git a/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java index af8a5400277..6efe2cde562 100644 --- a/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java +++ b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java @@ -44,11 +44,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - * @deprecated since 8.6 - */ - -@Deprecated public class HdfsDirectory extends BaseDirectory { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); public static final int DEFAULT_BUFFER_SIZE = 4096; @@ -102,7 +97,6 @@ public HdfsDirectory(Path hdfsDirPath, LockFactory lockFactory, Configuration co org.apache.solr.common.util.IOUtils.closeQuietly(fileSystem); throw new RuntimeException("Problem creating directory: " + hdfsDirPath, e); } - log.warn("HDFS support in Solr has been deprecated as of 8.6. See SOLR-14021 for details."); } @Override diff --git a/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java index e8c9db30630..4099d958e6c 100644 --- a/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java +++ b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsFileWriter.java @@ -30,9 +30,7 @@ /** * @lucene.experimental - * @deprecated since 8.6 */ -@Deprecated public class HdfsFileWriter extends OutputStreamIndexOutput { public static final String HDFS_SYNC_BLOCK = "solr.hdfs.sync.block"; diff --git a/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java index fe19d120a55..c95396d60bc 100644 --- a/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java +++ b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLocalityReporter.java @@ -35,10 +35,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - * @deprecated since 8.6 - */ -@Deprecated public class HdfsLocalityReporter implements SolrInfoBean { public static final String LOCALITY_BYTES_TOTAL = "locality.bytes.total"; public static final String LOCALITY_BYTES_LOCAL = "locality.bytes.local"; diff --git a/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java index 0b4e2e33c9c..c62b5f4a4aa 100644 --- a/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java +++ b/solr/contrib/hdfs/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java @@ -34,10 +34,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - * @deprecated since 8.6 - */ -@Deprecated public class HdfsLockFactory extends LockFactory { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); diff --git a/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsTransactionLog.java b/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsTransactionLog.java index 8982b6fe323..977c451f938 100644 --- a/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsTransactionLog.java +++ b/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsTransactionLog.java @@ -57,9 +57,7 @@ * This would also allow to not log document data for requests with commit=true * in them (since we know that if the request succeeds, all docs will be committed) * - * @deprecated since 8.6 */ -@Deprecated public class HdfsTransactionLog extends TransactionLog { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private static boolean debug = log.isDebugEnabled(); diff --git a/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsUpdateLog.java b/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsUpdateLog.java index 5dbd53d504f..0a83b425bdd 100644 --- a/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsUpdateLog.java +++ b/solr/contrib/hdfs/src/java/org/apache/solr/update/HdfsUpdateLog.java @@ -44,9 +44,7 @@ /** * @lucene.experimental - * @deprecated since 8.6 */ -@Deprecated public class HdfsUpdateLog extends UpdateLog { private final Object fsLock = new Object(); From e12f5b1f2ebb1f8ef8dad9bf86ee0009cd6fa7fe Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Thu, 5 Aug 2021 22:20:42 +0200 Subject: [PATCH 23/52] HDFS contrib module: added AwaitsFix annotation to HdfsRecoveryZKTest --- .../src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java index 4b27b4857d2..9940949fef6 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java @@ -18,6 +18,7 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.apache.hadoop.hdfs.MiniDFSCluster; +import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase.Nightly; import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.lucene.util.QuickPatchThreadsFilter; @@ -29,6 +30,7 @@ @Slow @Nightly +@LuceneTestCase.AwaitsFix(bugUrl = "SOLR-15405") @ThreadLeakFilters(defaultFilters = true, filters = { SolrIgnoredThreadsFilter.class, QuickPatchThreadsFilter.class, From 99302c86890ce5d41bf98947de0e2ebb2382ef04 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Mon, 23 Aug 2021 12:33:47 +0200 Subject: [PATCH 24/52] HDFS Contrib module: Cleaned unused imports, added missing package-info and adjusted gradle validations to skip Hadoop code validations --- gradle/validation/forbidden-apis.gradle | 10 +++++ .../validate-source-patterns.gradle | 8 +++- .../test/org/apache/hadoop/package-info.java | 39 +++++++++++++++++++ .../hdfs/HdfsChaosMonkeySafeLeaderTest.java | 1 - .../hdfs/HdfsRestartWhileUpdatingTest.java | 1 - 5 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 solr/contrib/hdfs/src/test/org/apache/hadoop/package-info.java diff --git a/gradle/validation/forbidden-apis.gradle b/gradle/validation/forbidden-apis.gradle index 842856c6cd6..ca5ebfd70b9 100644 --- a/gradle/validation/forbidden-apis.gradle +++ b/gradle/validation/forbidden-apis.gradle @@ -107,6 +107,10 @@ allprojects { prj -> suppressAnnotations += [ "**.SuppressForbidden" ] + + // for all test fixture projects, exclude classes which were copied from Hadoop + exclude("**/org/apache/hadoop/**") + } // Configure defaults for sourceSets.tools (if present). @@ -153,6 +157,12 @@ allprojects { prj -> forbiddenApisMain.exclude("**/jmh_generated/**") } + // Disable checks on code copied from Hadoop + if (prj.path == ":solr:contrib:hdfs") { + forbiddenApisTest.exclude("**/org/apache/hadoop/**") + } + + // We rely on resolved configurations to compute the relevant set of rule // files for forbiddenApis. Since we don't want to resolve these configurations until // the task is executed, we can't really use them as task inputs properly. This is a diff --git a/gradle/validation/validate-source-patterns.gradle b/gradle/validation/validate-source-patterns.gradle index 284fd99751a..b2141a7ffad 100644 --- a/gradle/validation/validate-source-patterns.gradle +++ b/gradle/validation/validate-source-patterns.gradle @@ -93,7 +93,13 @@ subprojects { configure(project(':solr:core')) { project.tasks.withType(ValidateSourcePatternsTask) { sourceFiles.exclude 'src/**/CheckLoggingConfiguration.java' - sourceFiles.exclude 'src/test/org/apache/hadoop/**' + sourceFiles.exclude 'src/**/org/apache/hadoop/**' + } +} + +configure(project(':solr:contrib:hdfs')) { + project.tasks.withType(ValidateSourcePatternsTask) { + sourceFiles.exclude 'src/**/org/apache/hadoop/**' } } diff --git a/solr/contrib/hdfs/src/test/org/apache/hadoop/package-info.java b/solr/contrib/hdfs/src/test/org/apache/hadoop/package-info.java new file mode 100644 index 00000000000..f10ed779f79 --- /dev/null +++ b/solr/contrib/hdfs/src/test/org/apache/hadoop/package-info.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The classes under this package were copied from Apache Hadoop and modified + * to avoid certain issues during tests. The copied classes override the + * Apache Hadoop dependency versions during tests. + * + * HttpServer2 class was copied to avoid Jetty 9.4 dependency issues. Since + * Solr uses Jetty 9.4, Hadoop integration tests needs to use Jetty 9.4 as + * well. The HttpServer2 class should be removed when Hadoop is upgraded to + * 3.3.0 due to HADOOP-16152 upgrading Hadoop to Jetty 9.4. + * + * The classes BlockPoolSlice (HDFS-14251), DiskChecker, FileUtil, HardLink, + * NameNodeResourceChecker, and RawLocalFileSystem were copied to avoid + * issues with running Hadoop integration tests under the Java security + * manager. Many of these classes use org.apache.hadoop.util.Shell + * which shells out to try to do common filesystem checks. + * + * Overtime these classes should be removed as upstream fixes to Apache + * Hadoop are made. When the Apache Hadoop dependency is upgraded in + * Solr, the classes should be compared against that version. + */ +package org.apache.hadoop; + diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java index b52aec36e3d..60080c64695 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java @@ -29,7 +29,6 @@ import com.carrotsearch.randomizedtesting.annotations.Nightly; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; -import org.junit.Test; @Slow diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java index 98441c70399..cd013fa84f0 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java @@ -27,7 +27,6 @@ import com.carrotsearch.randomizedtesting.annotations.Nightly; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; -import org.junit.Test; @Slow @Nightly From b21c9be2d8663e3f71a6b61a0406dc68ae70da54 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Mon, 13 Sep 2021 23:42:01 +0200 Subject: [PATCH 25/52] HDFS contrib module: moved test fixtures to the test framework. Unfortunately it seems that some modules which are used by the gradle check are not compatible with test fixtures. This commit moves them to the test framework. --- gradle/documentation/render-javadoc.gradle | 6 +++- gradle/validation/forbidden-apis.gradle | 29 ++++--------------- .../validate-source-patterns.gradle | 6 ++++ solr/contrib/hdfs/build.gradle | 3 -- solr/core/build.gradle | 3 -- solr/test-framework/build.gradle | 11 +++++++ .../java/org/apache/hadoop/fs/FileUtil.java | 0 .../java/org/apache/hadoop/fs/HardLink.java | 0 .../apache/hadoop/fs/RawLocalFileSystem.java | 0 .../org/apache/hadoop/http/HttpServer2.java | 0 .../java/org/apache/hadoop/package-info.java | 0 .../org/apache/hadoop/util/DiskChecker.java | 0 .../AbstractRestartWhileUpdatingTestBase.java | 2 +- .../solr/cloud/hadoop/FakeGroupMapping.java | 0 .../solr/cloud/hadoop/HadoopTestUtil.java | 0 .../solr/cloud/hadoop/package-info.java | 21 ++++++++++++++ .../solr/handler/TestRestoreCoreUtil.java | 0 .../solr/schema/MockExchangeRateProvider.java | 0 .../apache/solr/search/facet/DebugAgg.java | 0 .../search/function/NvlValueSourceParser.java | 0 .../similarities/CustomSimilarityFactory.java | 0 .../MockConfigurableSimilarity.java | 0 .../apache/solr/util/MockCoreContainer.java | 0 versions.lock | 8 ++--- 24 files changed, 53 insertions(+), 36 deletions(-) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/hadoop/fs/FileUtil.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/hadoop/fs/HardLink.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/hadoop/fs/RawLocalFileSystem.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/hadoop/http/HttpServer2.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/hadoop/package-info.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/hadoop/util/DiskChecker.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java (100%) create mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/hadoop/package-info.java rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/handler/TestRestoreCoreUtil.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/schema/MockExchangeRateProvider.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/search/facet/DebugAgg.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/search/function/NvlValueSourceParser.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/search/similarities/CustomSimilarityFactory.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/search/similarities/MockConfigurableSimilarity.java (100%) rename solr/{core/src/testFixtures => test-framework/src}/java/org/apache/solr/util/MockCoreContainer.java (100%) diff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradle index ebbb2ae212c..c5ec0634d6b 100644 --- a/gradle/documentation/render-javadoc.gradle +++ b/gradle/documentation/render-javadoc.gradle @@ -154,7 +154,11 @@ configure(project(":solr:test-framework")) { "org.apache.solr.handler", "org.apache.solr.handler.component", "org.apache.solr.update.processor", - "org.apache.solr.util" + "org.apache.solr.util", + "org.apache.solr.search.similarities", + "org.apache.solr.search.function", + "org.apache.solr.search.facet", + "org.apache.solr.schema" ] } } diff --git a/gradle/validation/forbidden-apis.gradle b/gradle/validation/forbidden-apis.gradle index ca5ebfd70b9..c664b2e58ce 100644 --- a/gradle/validation/forbidden-apis.gradle +++ b/gradle/validation/forbidden-apis.gradle @@ -89,30 +89,6 @@ allprojects { prj -> ] } - - // Configure defaults for sourceSets.testFixtures (if present). - tasks.matching { it.name == "forbiddenApisTestFixtures" }.all { - bundledSignatures += [ - 'jdk-unsafe', - 'jdk-deprecated', - 'jdk-non-portable', - 'jdk-reflection', - ] - - // test fixtures use the same signature file as the tests - signaturesFiles = files( - file("${resources}/defaults.tests.txt") - ) - - suppressAnnotations += [ - "**.SuppressForbidden" - ] - - // for all test fixture projects, exclude classes which were copied from Hadoop - exclude("**/org/apache/hadoop/**") - - } - // Configure defaults for sourceSets.tools (if present). tasks.matching { it.name == "forbiddenApisTools" }.all { bundledSignatures += [ @@ -161,6 +137,11 @@ allprojects { prj -> if (prj.path == ":solr:contrib:hdfs") { forbiddenApisTest.exclude("**/org/apache/hadoop/**") } + if (prj.path == ":solr:test-framework") { + forbiddenApisMain.exclude("**/org/apache/hadoop/**") + } + + // We rely on resolved configurations to compute the relevant set of rule diff --git a/gradle/validation/validate-source-patterns.gradle b/gradle/validation/validate-source-patterns.gradle index b2141a7ffad..72eaa01cd02 100644 --- a/gradle/validation/validate-source-patterns.gradle +++ b/gradle/validation/validate-source-patterns.gradle @@ -97,6 +97,12 @@ configure(project(':solr:core')) { } } +configure(project(':solr:test-framework')) { + project.tasks.withType(ValidateSourcePatternsTask) { + sourceFiles.exclude 'src/**/org/apache/hadoop/**' + } +} + configure(project(':solr:contrib:hdfs')) { project.tasks.withType(ValidateSourcePatternsTask) { sourceFiles.exclude 'src/**/org/apache/hadoop/**' diff --git a/solr/contrib/hdfs/build.gradle b/solr/contrib/hdfs/build.gradle index 71c8843f884..dc9e235d666 100644 --- a/solr/contrib/hdfs/build.gradle +++ b/solr/contrib/hdfs/build.gradle @@ -36,9 +36,6 @@ dependencies { // Many HDFS tests are using/subclassing test framework classes testImplementation project(':solr:test-framework') - // HDFS tests depend on core fixture classes - testImplementation(testFixtures(project(":solr:core"))) - // hadoop dependencies for tests testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } diff --git a/solr/core/build.gradle b/solr/core/build.gradle index 2ac1bcf71d3..6f52c697a89 100644 --- a/solr/core/build.gradle +++ b/solr/core/build.gradle @@ -17,7 +17,6 @@ apply plugin: 'java-library' -apply plugin: 'java-test-fixtures' description = 'Apache Solr Core' @@ -157,7 +156,5 @@ dependencies { exclude group: "org.slf4j", module: "slf4j-api" }) - testFixturesApi("org.apache.lucene:lucene-test-framework") - testFixturesImplementation("org.apache.hadoop:hadoop-common") } diff --git a/solr/test-framework/build.gradle b/solr/test-framework/build.gradle index ff8c91dd090..50ecd35e702 100644 --- a/solr/test-framework/build.gradle +++ b/solr/test-framework/build.gradle @@ -31,5 +31,16 @@ dependencies { implementation 'io.dropwizard.metrics:metrics-jetty9' implementation 'com.lmax:disruptor' + + // used by the hadoop-specific test framework classes + implementation ('org.apache.hadoop:hadoop-common') { transitive = false } + implementation ('org.apache.hadoop:hadoop-auth') { transitive = false } + implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false } + implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false } + implementation ('org.apache.commons:commons-compress') { transitive = false } + implementation ('com.sun.jersey:jersey-servlet') { transitive = false } + implementation ('commons-logging:commons-logging') { transitive = false } + + } diff --git a/solr/core/src/testFixtures/java/org/apache/hadoop/fs/FileUtil.java b/solr/test-framework/src/java/org/apache/hadoop/fs/FileUtil.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/hadoop/fs/FileUtil.java rename to solr/test-framework/src/java/org/apache/hadoop/fs/FileUtil.java diff --git a/solr/core/src/testFixtures/java/org/apache/hadoop/fs/HardLink.java b/solr/test-framework/src/java/org/apache/hadoop/fs/HardLink.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/hadoop/fs/HardLink.java rename to solr/test-framework/src/java/org/apache/hadoop/fs/HardLink.java diff --git a/solr/core/src/testFixtures/java/org/apache/hadoop/fs/RawLocalFileSystem.java b/solr/test-framework/src/java/org/apache/hadoop/fs/RawLocalFileSystem.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/hadoop/fs/RawLocalFileSystem.java rename to solr/test-framework/src/java/org/apache/hadoop/fs/RawLocalFileSystem.java diff --git a/solr/core/src/testFixtures/java/org/apache/hadoop/http/HttpServer2.java b/solr/test-framework/src/java/org/apache/hadoop/http/HttpServer2.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/hadoop/http/HttpServer2.java rename to solr/test-framework/src/java/org/apache/hadoop/http/HttpServer2.java diff --git a/solr/core/src/testFixtures/java/org/apache/hadoop/package-info.java b/solr/test-framework/src/java/org/apache/hadoop/package-info.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/hadoop/package-info.java rename to solr/test-framework/src/java/org/apache/hadoop/package-info.java diff --git a/solr/core/src/testFixtures/java/org/apache/hadoop/util/DiskChecker.java b/solr/test-framework/src/java/org/apache/hadoop/util/DiskChecker.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/hadoop/util/DiskChecker.java rename to solr/test-framework/src/java/org/apache/hadoop/util/DiskChecker.java diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRestartWhileUpdatingTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRestartWhileUpdatingTestBase.java index 41ad48f6000..a1e508cf209 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRestartWhileUpdatingTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractRestartWhileUpdatingTestBase.java @@ -86,7 +86,7 @@ public void test() throws Exception { threads = new ArrayList<>(numThreads); - Thread expireThread = new Thread() { + Thread expireThread = new Thread("expireThread") { public void run() { while (!stopExpire) { try { diff --git a/solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java b/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java rename to solr/test-framework/src/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java diff --git a/solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java b/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java rename to solr/test-framework/src/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/package-info.java b/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/package-info.java new file mode 100644 index 00000000000..f5358306add --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/package-info.java @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Test framework classes for Hadoop-related functionality. + */ +package org.apache.solr.cloud.hadoop; \ No newline at end of file diff --git a/solr/core/src/testFixtures/java/org/apache/solr/handler/TestRestoreCoreUtil.java b/solr/test-framework/src/java/org/apache/solr/handler/TestRestoreCoreUtil.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/handler/TestRestoreCoreUtil.java rename to solr/test-framework/src/java/org/apache/solr/handler/TestRestoreCoreUtil.java diff --git a/solr/core/src/testFixtures/java/org/apache/solr/schema/MockExchangeRateProvider.java b/solr/test-framework/src/java/org/apache/solr/schema/MockExchangeRateProvider.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/schema/MockExchangeRateProvider.java rename to solr/test-framework/src/java/org/apache/solr/schema/MockExchangeRateProvider.java diff --git a/solr/core/src/testFixtures/java/org/apache/solr/search/facet/DebugAgg.java b/solr/test-framework/src/java/org/apache/solr/search/facet/DebugAgg.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/search/facet/DebugAgg.java rename to solr/test-framework/src/java/org/apache/solr/search/facet/DebugAgg.java diff --git a/solr/core/src/testFixtures/java/org/apache/solr/search/function/NvlValueSourceParser.java b/solr/test-framework/src/java/org/apache/solr/search/function/NvlValueSourceParser.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/search/function/NvlValueSourceParser.java rename to solr/test-framework/src/java/org/apache/solr/search/function/NvlValueSourceParser.java diff --git a/solr/core/src/testFixtures/java/org/apache/solr/search/similarities/CustomSimilarityFactory.java b/solr/test-framework/src/java/org/apache/solr/search/similarities/CustomSimilarityFactory.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/search/similarities/CustomSimilarityFactory.java rename to solr/test-framework/src/java/org/apache/solr/search/similarities/CustomSimilarityFactory.java diff --git a/solr/core/src/testFixtures/java/org/apache/solr/search/similarities/MockConfigurableSimilarity.java b/solr/test-framework/src/java/org/apache/solr/search/similarities/MockConfigurableSimilarity.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/search/similarities/MockConfigurableSimilarity.java rename to solr/test-framework/src/java/org/apache/solr/search/similarities/MockConfigurableSimilarity.java diff --git a/solr/core/src/testFixtures/java/org/apache/solr/util/MockCoreContainer.java b/solr/test-framework/src/java/org/apache/solr/util/MockCoreContainer.java similarity index 100% rename from solr/core/src/testFixtures/java/org/apache/solr/util/MockCoreContainer.java rename to solr/test-framework/src/java/org/apache/solr/util/MockCoreContainer.java diff --git a/versions.lock b/versions.lock index 6960cb01ce4..0ba9ade1f5e 100644 --- a/versions.lock +++ b/versions.lock @@ -31,7 +31,7 @@ com.google.cloud:google-cloud-storage:1.113.14 (2 constraints: 10143aa3) com.google.code.findbugs:annotations:3.0.1 (1 constraints: 0605fb35) com.google.code.findbugs:jsr305:3.0.2 (9 constraints: 057f5545) com.google.code.gson:gson:2.8.6 (4 constraints: 94389e56) -com.google.errorprone:error_prone_annotations:2.8.1 (4 constraints: 9d2f3758) +com.google.errorprone:error_prone_annotations:2.8.1 (5 constraints: 9b3f60a4) com.google.guava:failureaccess:1.0.1 (1 constraints: e60fd595) com.google.guava:guava:25.1-jre (1 constraints: 4a06b047) com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (1 constraints: 8f1d45cb) @@ -55,6 +55,7 @@ com.lmax:disruptor:3.4.2 (1 constraints: 0b050836) com.pff:java-libpst:0.8.1 (1 constraints: 0b050436) com.rometools:rome:1.12.2 (1 constraints: 3805313b) com.rometools:rome-utils:1.12.2 (1 constraints: 3805313b) +com.sun.jersey:jersey-servlet:1.19 (1 constraints: df04fa30) com.tdunning:t-digest:3.1 (1 constraints: a804212c) commons-cli:commons-cli:1.4 (1 constraints: a9041e2c) commons-codec:commons-codec:1.13 (3 constraints: 88269b79) @@ -115,6 +116,7 @@ org.apache.curator:curator-recipes:2.13.0 (1 constraints: 3805383b) org.apache.hadoop:hadoop-annotations:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-auth:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-common:3.2.0 (1 constraints: 07050036) +org.apache.hadoop:hadoop-hdfs:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-hdfs-client:3.2.0 (1 constraints: 07050036) org.apache.htrace:htrace-core4:4.1.0-incubating (1 constraints: 58090086) org.apache.httpcomponents:httpclient:4.5.13 (7 constraints: af69bc2b) @@ -227,8 +229,8 @@ org.locationtech.spatial4j:spatial4j:0.7 (1 constraints: 58105398) org.openjdk.jmh:jmh-core:1.32 (1 constraints: da04f730) org.ow2.asm:asm:7.2 (3 constraints: a325a35c) org.ow2.asm:asm-commons:7.2 (1 constraints: 6b0f7267) -org.reactivestreams:reactive-streams:1.0.3 (3 constraints: 3c2b02fd) org.quicktheories:quicktheories:0.26 (1 constraints: dc04f530) +org.reactivestreams:reactive-streams:1.0.3 (3 constraints: 3c2b02fd) org.slf4j:jcl-over-slf4j:1.7.24 (1 constraints: 4005473b) org.slf4j:slf4j-api:1.7.24 (19 constraints: 97f04fc1) org.tallison:jmatio:1.5 (1 constraints: aa041f2c) @@ -292,7 +294,6 @@ com.nimbusds:oauth2-oidc-sdk:9.2.3 (1 constraints: c40ec362) com.squareup.okhttp3:mockwebserver:4.9.1 (1 constraints: c40ebd62) com.squareup.okhttp3:okhttp:4.9.1 (1 constraints: 3d0f4f6d) com.squareup.okio:okio:2.8.0 (1 constraints: 540c39fd) -com.sun.jersey:jersey-servlet:1.19 (1 constraints: df04fa30) com.vaadin.external.google:android-json:0.0.20131108.vaadin1 (1 constraints: 34092a9e) io.github.microutils:kotlin-logging:2.0.6 (1 constraints: be0e9d62) io.github.microutils:kotlin-logging-jvm:2.0.6 (1 constraints: 810f877c) @@ -308,7 +309,6 @@ net.bytebuddy:byte-buddy:1.10.20 (2 constraints: 7c10a9d0) net.minidev:accessors-smart:1.2 (1 constraints: e60926a4) net.minidev:json-smart:2.3 (1 constraints: ae0de552) no.nav.security:mock-oauth2-server:0.3.3 (1 constraints: 0805f735) -org.apache.hadoop:hadoop-hdfs:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-minikdc:3.2.0 (1 constraints: 07050036) org.apache.kerby:kerb-admin:1.0.1 (1 constraints: 0405f135) org.apache.kerby:kerb-client:1.0.1 (1 constraints: 0405f135) From cfe474fd9dd39ec6417fd07a611000663fee8d77 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Mon, 20 Sep 2021 23:00:16 +0200 Subject: [PATCH 26/52] HDFS Contrib module: fixed build to not include hadoop transitive dependencies --- solr/contrib/hdfs/build.gradle | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/solr/contrib/hdfs/build.gradle b/solr/contrib/hdfs/build.gradle index dc9e235d666..6840c4a2a48 100644 --- a/solr/contrib/hdfs/build.gradle +++ b/solr/contrib/hdfs/build.gradle @@ -20,15 +20,19 @@ apply plugin: 'java-library' description = 'HDFS Package' dependencies { + implementation project(':solr:core') - implementation ('org.apache.hadoop:hadoop-common') - implementation ('org.apache.hadoop:hadoop-hdfs-client', { - exclude group: "com.squareup.okhttp", module: "okhttp" - exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations" - exclude group: "com.fasterxml.jackson.core", module: "jackson-databind" - }) + //implementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } + implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false } + implementation ('org.apache.hadoop:hadoop-auth') { transitive = false } + implementation ('org.apache.hadoop:hadoop-common') { transitive = false } + implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false } + implementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } + + + api('com.github.ben-manes.caffeine:caffeine', { exclude group: "org.checkerframework", module: "checker-qual" }) @@ -42,6 +46,8 @@ dependencies { testImplementation ('org.apache.hadoop:hadoop-hdfs::tests') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-minikdc') { transitive = false } + testImplementation 'org.apache.logging.log4j:log4j-1.2-api' + // classes like solr.ICUCollationField, used by NNFailoverTest for example. testImplementation project(':solr:contrib:analysis-extras') From 383b456f62bd5c350b4d6081cd7449cb46d0ee6a Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Tue, 21 Sep 2021 22:27:07 +0200 Subject: [PATCH 27/52] HDFS Contrib Module: documentation updates - fixed a documentation link to point to hdfs contrib directory - added a short README.md on how to build and use - updated the solr on hdfs ref guide to remove deprecated flag --- solr/contrib/README.md | 31 +++++++++++++++++++ .../src/index-location-format.adoc | 2 +- solr/solr-ref-guide/src/solr-on-hdfs.adoc | 5 +-- versions.lock | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 solr/contrib/README.md diff --git a/solr/contrib/README.md b/solr/contrib/README.md new file mode 100644 index 00000000000..3e5ec63804e --- /dev/null +++ b/solr/contrib/README.md @@ -0,0 +1,31 @@ +Apache Solr HDFS Contrib module +=============================== + +Introduction +------------ +This contrib module implements the support for Hadoop Distributed File System in Apache Solr. + + +Building +-------- +The HDFS contrib module uses the same Gradle build as the core Solr components. + +To build the module, you can use + +./gradlew :solr:contrib:hdfs:assemble + +The resulting module will be placed to the libs directory, for example: +solr/contrib/hdfs/build/libs/solr-hdfs-9.0.0-SNAPSHOT.jar + + +To execute the module tests: + +./gradlew :solr:contrib:hdfs:test + + + +Usage +----- +To use the module, it needs to be placed to the Solr web application classpath (for example by symlinking it to the WEB-INF/lib directory.) + +Please refer to the 'Running Solr on HDFS' section of the reference guide: https://solr.apache.org/guide/running-solr-on-hdfs.html \ No newline at end of file diff --git a/solr/solr-ref-guide/src/index-location-format.adoc b/solr/solr-ref-guide/src/index-location-format.adoc index 7e0d6cd0936..47d92013123 100644 --- a/solr/solr-ref-guide/src/index-location-format.adoc +++ b/solr/solr-ref-guide/src/index-location-format.adoc @@ -60,6 +60,6 @@ Use this DirectoryFactory to store your index in RAM. [NOTE] ==== -If you are using Hadoop and would like to store your indexes in HDFS, you should use the {solr-javadocs}/core/org/apache/solr/core/HdfsDirectoryFactory.html[`solr.HdfsDirectoryFactory`] instead of either of the above implementations. +If you are using Hadoop and would like to store your indexes in HDFS, you should use the {solr-javadocs}/contrib/hdfs/org/apache/solr/core/HdfsDirectoryFactory.html[`solr.HdfsDirectoryFactory`] instead of either of the above implementations. For more details, see the section <>. ==== diff --git a/solr/solr-ref-guide/src/solr-on-hdfs.adoc b/solr/solr-ref-guide/src/solr-on-hdfs.adoc index 131d62ba1c9..8e274a3c252 100644 --- a/solr/solr-ref-guide/src/solr-on-hdfs.adoc +++ b/solr/solr-ref-guide/src/solr-on-hdfs.adoc @@ -16,11 +16,12 @@ // specific language governing permissions and limitations // under the License. -WARNING: Storing indexes in HDFS is deprecated and may be be removed in 9.0. -This functionality may be moved to a 3rd-party plugin in the future. Solr has support for writing and reading its index and transaction log files to the HDFS distributed filesystem. +Starting from 9.0, this functionality has been moved from Solr Core to the HDFS contrib module. + + This does not use Hadoop MapReduce to process Solr data, rather it only uses the HDFS filesystem for index and transaction log file storage. To use HDFS rather than a local filesystem, you must be using Hadoop 2.x and you will need to instruct Solr to use the `HdfsDirectoryFactory`. diff --git a/versions.lock b/versions.lock index 0ba9ade1f5e..20956d7b17d 100644 --- a/versions.lock +++ b/versions.lock @@ -31,7 +31,7 @@ com.google.cloud:google-cloud-storage:1.113.14 (2 constraints: 10143aa3) com.google.code.findbugs:annotations:3.0.1 (1 constraints: 0605fb35) com.google.code.findbugs:jsr305:3.0.2 (9 constraints: 057f5545) com.google.code.gson:gson:2.8.6 (4 constraints: 94389e56) -com.google.errorprone:error_prone_annotations:2.8.1 (5 constraints: 9b3f60a4) +com.google.errorprone:error_prone_annotations:2.8.1 (5 constraints: 9a3fe7a3) com.google.guava:failureaccess:1.0.1 (1 constraints: e60fd595) com.google.guava:guava:25.1-jre (1 constraints: 4a06b047) com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (1 constraints: 8f1d45cb) From 2e2005b8cea668296185c74d0c7ce0069af64376 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Sun, 23 Jan 2022 11:20:21 -0500 Subject: [PATCH 28/52] HDFS Contrib Module: fixes after merging main to feature branch. - added missing dependencies - updated test resource files in Solr contrib to match those of test framework (will be consolidated later to remove duplications) --- solr/contrib/hdfs/build.gradle | 21 ++- .../solr/collection1/conf/schema-bm25.xml | 17 --- .../solr/collection1/conf/schema-hash.xml | 28 ---- .../solr/collection1/conf/schema-minhash.xml | 28 ---- .../solr/collection1/conf/schema-rest.xml | 15 -- .../solr/collection1/conf/schema-spatial.xml | 23 +-- .../collection1/conf/schema-spellchecker.xml | 9 -- .../solr/collection1/conf/schema-sql.xml | 28 ---- .../solr/collection1/conf/schema-trie.xml | 24 --- .../solr/collection1/conf/schema.xml | 49 +++--- .../solr/collection1/conf/schema11.xml | 106 ++++--------- .../solr/collection1/conf/schema12.xml | 22 +-- .../solr/collection1/conf/schema15.xml | 18 +-- .../solr/collection1/conf/schema_latest.xml | 140 ++++-------------- .../solr/collection1/conf/schemasurround.xml | 17 --- .../conf/solrconfig-analytics-query.xml | 8 - .../conf/solrconfig-collapseqparser.xml | 8 - .../conf/solrconfig-components-name.xml | 9 +- ...config-distrib-update-processor-chains.xml | 14 +- .../conf/solrconfig-doctransformers.xml | 6 - .../collection1/conf/solrconfig-elevate.xml | 12 +- .../solrconfig-externalversionconstraint.xml | 7 +- .../solr/collection1/conf/solrconfig-hash.xml | 6 - .../conf/solrconfig-implicitproperties.xml | 1 - .../conf/solrconfig-managed-schema.xml | 2 +- .../collection1/conf/solrconfig-minhash.xml | 32 ++-- .../conf/solrconfig-plugcollector.xml | 7 - .../solr/collection1/conf/solrconfig-sql.xml | 6 - .../collection1/conf/solrconfig-test-misc.xml | 8 +- .../solrconfig-tieredmergepolicyfactory.xml | 2 +- .../solr/collection1/conf/solrconfig-tlog.xml | 19 ++- .../solr/collection1/conf/solrconfig.xml | 39 ++--- .../configsets/cloud-hdfs/conf/solrconfig.xml | 3 - .../solr/index/hdfs/CheckHdfsIndexTest.java | 1 + solr/test-framework/build.gradle | 2 + 35 files changed, 188 insertions(+), 549 deletions(-) diff --git a/solr/contrib/hdfs/build.gradle b/solr/contrib/hdfs/build.gradle index 6840c4a2a48..aa18043fcea 100644 --- a/solr/contrib/hdfs/build.gradle +++ b/solr/contrib/hdfs/build.gradle @@ -23,16 +23,17 @@ dependencies { implementation project(':solr:core') - - //implementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } + // Hadoop dependencies implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false } implementation ('org.apache.hadoop:hadoop-auth') { transitive = false } implementation ('org.apache.hadoop:hadoop-common') { transitive = false } implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false } implementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } + // Guava implements the VisibleForTesting annotations + implementation ('com.google.guava:guava') { transitive = false } - + // Caffeine cache to implement HDFS block caching api('com.github.ben-manes.caffeine:caffeine', { exclude group: "org.checkerframework", module: "checker-qual" }) @@ -40,6 +41,9 @@ dependencies { // Many HDFS tests are using/subclassing test framework classes testImplementation project(':solr:test-framework') + // HdfsCheckindexTool tests reference LuceneTestCase + testImplementation ('org.apache.lucene:lucene-test-framework') + // hadoop dependencies for tests testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } @@ -53,4 +57,15 @@ dependencies { // required for instantiating a Zookeeper server in tests or embedded runtimeOnly ('org.xerial.snappy:snappy-java') + + // commons packages needed by test classes + testImplementation('commons-io:commons-io') { transitive = false } + + // Zookeeper dependency - some tests like HdfsCloudBackupRestore need this + implementation ('org.apache.zookeeper:zookeeper') + + + + + } diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml index 549efd6b187..a9c2a6a1ecb 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml @@ -35,28 +35,11 @@ 0.76 - - - - - - - - - - - - 1.2 - 0.76 - - - - id diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml index c2d6b39b787..e5dbd74fe51 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml @@ -376,17 +376,6 @@ - - - - - - - - - - - @@ -439,21 +428,6 @@ - - - - - - - - - - - - - - - @@ -569,8 +543,6 @@ - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml index a13ba35f482..9465e83dfe4 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml @@ -376,17 +376,6 @@ - - - - - - - - - - - @@ -452,21 +441,6 @@ - - - - - - - - - - - - - - - @@ -585,8 +559,6 @@ - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml index 46b735ce782..66249e1cb50 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml @@ -478,15 +478,6 @@ - - - - - - - - - @@ -638,12 +629,6 @@ --> - - - - - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml index 3f09e3acdd3..ffb473b7dc3 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml @@ -22,7 +22,7 @@ - + @@ -33,6 +33,8 @@ + + @@ -45,14 +47,6 @@ - - - - - @@ -82,8 +76,6 @@ - - @@ -103,6 +95,15 @@ + + + + + + + id diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml index 896f139a390..d5286ab72f9 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml @@ -16,15 +16,6 @@ limitations under the License. --> - - - - - - - - - - - - @@ -456,21 +445,6 @@ - - - - - - - - - - - - - - - @@ -586,8 +560,6 @@ - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml index 8669d646a92..f42afb34710 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml @@ -16,18 +16,6 @@ limitations under the License. --> - - - @@ -461,7 +457,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -537,22 +561,13 @@ - - + - - - - - - - - @@ -669,7 +684,7 @@ - + @@ -760,7 +775,7 @@ - + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema11.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema11.xml index d79179399ae..7ec301503ad 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema11.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema11.xml @@ -16,19 +16,6 @@ limitations under the License. --> - - - @@ -87,7 +74,7 @@ @@ -111,28 +98,16 @@ - - - - + + - + @@ -257,24 +232,13 @@ - + - - - - - - - - - - @@ -291,7 +255,7 @@ valued. --> - + @@ -308,7 +272,7 @@ valued. --> boosting for the field, and saves some memory). Only full-text fields or fields that need an index-time boost need norms. termVectors: [false] set to true to store the term vector for a given field. - When using MoreLikeThis, fields used for similarity should be stored for + When using MoreLikeThis, fields used for similarity should be stored for best performance. --> @@ -318,12 +282,6 @@ valued. --> - - - - - - @@ -339,7 +297,7 @@ valued. --> - - + - + - + @@ -416,7 +374,7 @@ valued. --> - + @@ -454,10 +412,10 @@ valued. --> - + - + @@ -486,18 +444,18 @@ valued. --> - + - + - + @@ -534,8 +492,8 @@ valued. --> - - id diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema12.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema12.xml index 33468f94aeb..5e67304be3e 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema12.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema12.xml @@ -553,17 +553,7 @@ - - - - - - - - - - + @@ -661,12 +651,7 @@ --> - - - - - - + @@ -686,8 +671,6 @@ --> - - @@ -807,6 +790,5 @@ - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema15.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema15.xml index b585df5ad11..c5b90a007f1 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema15.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema15.xml @@ -437,14 +437,8 @@ - + - - - - - - @@ -540,11 +534,9 @@ --> - - - - - + + + @@ -567,8 +559,6 @@ - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml index 693847b6ea9..746b530ed7f 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml @@ -16,57 +16,28 @@ limitations under the License. --> - - @@ -194,7 +165,7 @@ --> @@ -242,7 +213,7 @@ - + @@ -269,9 +240,6 @@ - - - @@ -288,9 +256,9 @@ - @@ -306,7 +274,7 @@ - id @@ -337,16 +305,16 @@ - + - @@ -417,10 +385,10 @@ - + - org.apache.lucene.analysis.payloads.FloatEncoder, @@ -726,7 +683,7 @@ - @@ -738,7 +695,7 @@ - @@ -755,28 +712,7 @@ any data added to them will be ignored outright. --> - - - - - - - - + - - - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml index 93b11ed78e4..95045bedfe9 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml @@ -450,15 +450,6 @@ - - - - - - - - - @@ -543,12 +534,6 @@ --> - - - - - - @@ -557,8 +542,6 @@ - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml index c0c964fbfb5..ba195778369 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml @@ -30,8 +30,6 @@ - - @@ -219,11 +217,6 @@ - - solr - solrconfig.xml schema.xml - - prefix-${solr.test.sys.prop2}-suffix @@ -273,4 +266,3 @@ - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml index 9f2bf3d3cc7..d896666f185 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml @@ -30,8 +30,6 @@ - - @@ -222,11 +220,6 @@ - - solr - solrconfig.xml schema.xml - - prefix-${solr.test.sys.prop2}-suffix @@ -281,4 +274,3 @@ - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml index 4c54a6e7ec4..870596afe3b 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml @@ -19,8 +19,6 @@ - - - - ${tests.luceneMatchVersion:LATEST} - + ${solr.hdfs.blockcache.enabled:true} @@ -30,7 +28,7 @@ ${solr.hdfs.confdir:} ${solr.hdfs.blockcache.global:false} - + ${solr.data.dir:} @@ -50,8 +48,8 @@ true - - + + @@ -60,7 +58,7 @@ ${solr.ulog.dir:} - + @@ -75,7 +73,7 @@ - + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml index f3a0bd55ce2..8511e8918f8 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml @@ -43,10 +43,4 @@ - - - solr - - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml index 4157dc50f01..4f40711a839 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml @@ -19,7 +19,6 @@ ${tests.luceneMatchVersion:LATEST} - @@ -121,11 +120,6 @@ - - solr - solrconfig.xml schema.xml - - prefix-${solr.test.sys.prop2}-suffix diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml index 15a188a0aec..0e785ce0adc 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml @@ -18,10 +18,9 @@ --> - ${tests.luceneMatchVersion:LATEST} - + ${solr.hdfs.blockcache.enabled:true} @@ -30,7 +29,7 @@ ${solr.hdfs.confdir:} - + ${solr.data.dir:} @@ -151,7 +150,7 @@ - + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml index 6600f7c248c..9c2e9f35820 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml @@ -52,10 +52,4 @@ - - - solr - - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml index 3feef5752bc..b9a72c5634a 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml @@ -31,7 +31,6 @@ - @@ -46,7 +44,7 @@ 3000000 4000000 ${solr.hdfs.home:} - ${solr.hdfs.blockcache.enabled:true} + ${solr.hdfs.blockcache.enabled:true} ${solr.hdfs.blockcache.global:true} ${solr.hdfs.blockcache.write.enabled:false} ${solr.hdfs.blockcache.blocksperbank:10} @@ -73,11 +71,11 @@ 3600000 --> - + ${solr.ulog.dir:} - - + + ${solr.commitwithin.softcommit:true} @@ -169,7 +167,7 @@ 2000 - + @@ -240,7 +238,7 @@ wordbreak - solr.WordBreakSolrSpellChecker + solr.WordBreakSolrSpellChecker lowerfilt true true @@ -354,7 +352,7 @@ spellcheck - + @@ -441,11 +439,6 @@ foo_s:bar - - - solr - solrconfig.xml schema.xml - uniq uniq2 uniq3 - + - + @@ -478,7 +471,7 @@ x_x - + @@ -493,10 +486,10 @@ x_x - + - @@ -513,4 +506,3 @@ - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml index 54da41e86ef..a9544b2ad88 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml @@ -30,8 +30,6 @@ - - @@ -431,10 +429,6 @@ max-age=30, public - - solr - solrconfig.xml schema.xml - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml index ac8ea622f0c..35e56aa4574 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml @@ -63,10 +63,4 @@ server-enabled.txt - - - solr - - - diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml index afd59541d55..00d49db3285 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml @@ -28,18 +28,12 @@ - - - solr - solrconfig.xml schema.xml - - - + prefix-${solr.test.sys.prop2}-suffix diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml index 4a5810040f8..3494db00d9c 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml @@ -25,7 +25,7 @@ ${useCompoundFile:false} - 19 + 19 7 9 0.1 diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml index c760d9d19c2..6d5ed8474d6 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml @@ -18,10 +18,9 @@ --> - ${tests.luceneMatchVersion:LATEST} - + ${solr.hdfs.blockcache.enabled:true} @@ -34,7 +33,7 @@ - + ${solr.data.dir:} @@ -48,7 +47,7 @@ - + @@ -60,14 +59,14 @@ ${solr.ulog.numRecordsToKeep:100} ${solr.ulog.tlogDfsReplication:2} - - - + + + ${solr.autoCommit.maxTime:-1} - false + false - + ${solr.autoSoftCommit.maxTime:-1} @@ -86,7 +85,7 @@ x_x - + diff --git a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml index c6b80c75ee1..02d79645eba 100644 --- a/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml +++ b/solr/contrib/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml @@ -30,8 +30,6 @@ - - @@ -46,7 +44,7 @@ 3000000 4000000 ${solr.hdfs.home:} - ${solr.hdfs.blockcache.enabled:true} + ${solr.hdfs.blockcache.enabled:true} ${solr.hdfs.blockcache.global:true} ${solr.hdfs.blockcache.write.enabled:false} ${solr.hdfs.blockcache.blocksperbank:10} @@ -73,11 +71,11 @@ 3600000 --> - + ${solr.ulog.dir:} - - + + ${solr.commitwithin.softcommit:true} @@ -97,7 +95,8 @@ + autowarmCount="2" + async="${solr.filterCache.async:false}"/> 2000 - + @@ -239,7 +238,7 @@ wordbreak - solr.WordBreakSolrSpellChecker + solr.WordBreakSolrSpellChecker lowerfilt true true @@ -303,8 +302,8 @@ --> - - + + uniq uniq2 uniq3 - + - + @@ -488,7 +482,7 @@ x_x - + @@ -503,10 +497,10 @@ x_x - + - @@ -529,4 +523,3 @@ - diff --git a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml index 648e92ea538..3e54f30a902 100644 --- a/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml +++ b/solr/contrib/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml @@ -38,8 +38,6 @@ - - explicit @@ -49,4 +47,3 @@ - diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java b/solr/contrib/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java index 37448c0d2fb..ff1cd3e15a4 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java @@ -24,6 +24,7 @@ import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.lucene.index.BaseTestCheckIndex; import org.apache.lucene.store.Directory; +import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.solr.SolrIgnoredThreadsFilter; import org.apache.solr.SolrTestCaseJ4; diff --git a/solr/test-framework/build.gradle b/solr/test-framework/build.gradle index e02818da9c1..d3b66ce2a54 100644 --- a/solr/test-framework/build.gradle +++ b/solr/test-framework/build.gradle @@ -46,6 +46,8 @@ dependencies { implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false } implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false } implementation ('org.apache.commons:commons-compress') { transitive = false } + implementation ('org.apache.commons:commons-collections4') { transitive = false } + implementation ('org.apache.commons:commons-lang3') { transitive = false } implementation ('com.sun.jersey:jersey-servlet') { transitive = false } implementation ('commons-logging:commons-logging') { transitive = false } From 3fea3f6e324be287d98c538182a204c9d386d763 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Sun, 23 Jan 2022 16:09:21 -0500 Subject: [PATCH 29/52] HDFS Contrib module: set a system parameter to ensure that all HDFS tests use the HdfsUpdateLog. --- .../hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java index 8b512a846fe..2ebe67252a8 100644 --- a/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java +++ b/solr/contrib/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java @@ -115,6 +115,7 @@ public static MiniDFSCluster setupClass(String dir, boolean safeModeTesting, boo System.setProperty("test.build.data", dir + File.separator + "hdfs" + File.separator + "build"); System.setProperty("test.cache.data", dir + File.separator + "hdfs" + File.separator + "cache"); System.setProperty("solr.lock.type", DirectoryFactory.LOCK_TYPE_HDFS); + System.setProperty(SolrTestCaseJ4.UPDATELOG_SYSPROP, "solr.HdfsUpdateLog"); // test-files/solr/solr.xml sets this to be 15000. This isn't long enough for HDFS in some cases. System.setProperty("socketTimeout", "90000"); @@ -270,6 +271,8 @@ public static void teardownClass(MiniDFSCluster dfsCluster) throws Exception { System.clearProperty("solr.lock.type"); + System.clearProperty(SolrTestCaseJ4.UPDATELOG_SYSPROP); + // Clear "solr.hdfs." system properties Enumeration propertyNames = System.getProperties().propertyNames(); while(propertyNames.hasMoreElements()) { From 6d3a55bf40aafacc933cbecdc76a13059329ebfd Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Sun, 23 Jan 2022 16:31:13 -0500 Subject: [PATCH 30/52] HDFS Contrib module: some dependencies cleaned up, versions.lock updated after dependencies refresh --- solr/contrib/hdfs/build.gradle | 12 +++++++++++- versions.lock | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/solr/contrib/hdfs/build.gradle b/solr/contrib/hdfs/build.gradle index aa18043fcea..66012a87460 100644 --- a/solr/contrib/hdfs/build.gradle +++ b/solr/contrib/hdfs/build.gradle @@ -17,10 +17,20 @@ apply plugin: 'java-library' -description = 'HDFS Package' +description = 'HDFS Contrib Module' dependencies { + configurations.all { + exclude group: 'log4j', module: 'log4j' + exclude group: 'commons-logging', module: 'commons-logging' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.apache.yetus', module: 'audience-annotations' + exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations' + // be conservative on what's added here. Affects *all* configs, including internal ones. + } + + implementation project(':solr:core') // Hadoop dependencies diff --git a/versions.lock b/versions.lock index 62980d77567..e18664ea87d 100644 --- a/versions.lock +++ b/versions.lock @@ -31,7 +31,7 @@ com.google.cloud:google-cloud-storage:1.113.14 (2 constraints: 10143aa3) com.google.code.findbugs:annotations:3.0.1 (1 constraints: 0605fb35) com.google.code.findbugs:jsr305:3.0.2 (9 constraints: 057f5545) com.google.code.gson:gson:2.8.6 (4 constraints: 94389e56) -com.google.errorprone:error_prone_annotations:2.10.0 (5 constraints: 243d8c14) +com.google.errorprone:error_prone_annotations:2.10.0 (6 constraints: 214d3ae7) com.google.guava:failureaccess:1.0.1 (1 constraints: e60fd595) com.google.guava:guava:25.1-jre (2 constraints: 0515c2b9) com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (1 constraints: 8f1d45cb) @@ -55,6 +55,7 @@ com.lmax:disruptor:3.4.2 (1 constraints: 0b050836) com.pff:java-libpst:0.8.1 (1 constraints: 0b050436) com.rometools:rome:1.12.2 (1 constraints: 3805313b) com.rometools:rome-utils:1.12.2 (1 constraints: 3805313b) +com.sun.jersey:jersey-servlet:1.19 (1 constraints: df04fa30) com.tdunning:t-digest:3.1 (1 constraints: a804212c) commons-cli:commons-cli:1.4 (1 constraints: a9041e2c) commons-codec:commons-codec:1.13 (4 constraints: b633162d) @@ -113,6 +114,7 @@ org.apache.curator:curator-recipes:2.13.0 (1 constraints: 3805383b) org.apache.hadoop:hadoop-annotations:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-auth:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-common:3.2.0 (1 constraints: 07050036) +org.apache.hadoop:hadoop-hdfs:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-hdfs-client:3.2.0 (1 constraints: 07050036) org.apache.htrace:htrace-core4:4.1.0-incubating (1 constraints: 58090086) org.apache.httpcomponents:httpclient:4.5.13 (8 constraints: 237a2994) @@ -292,7 +294,6 @@ com.nimbusds:oauth2-oidc-sdk:9.2.3 (1 constraints: c40ec362) com.squareup.okhttp3:mockwebserver:4.9.1 (1 constraints: c40ebd62) com.squareup.okhttp3:okhttp:4.9.1 (1 constraints: 3d0f4f6d) com.squareup.okio:okio:2.8.0 (1 constraints: 540c39fd) -com.sun.jersey:jersey-servlet:1.19 (1 constraints: df04fa30) com.vaadin.external.google:android-json:0.0.20131108.vaadin1 (1 constraints: 34092a9e) io.github.microutils:kotlin-logging:2.0.6 (1 constraints: be0e9d62) io.github.microutils:kotlin-logging-jvm:2.0.6 (1 constraints: 810f877c) @@ -309,7 +310,6 @@ net.bytebuddy:byte-buddy:1.10.20 (2 constraints: 7c10a9d0) net.minidev:accessors-smart:1.2 (1 constraints: e60926a4) net.minidev:json-smart:2.3 (1 constraints: ae0de552) no.nav.security:mock-oauth2-server:0.3.3 (1 constraints: 0805f735) -org.apache.hadoop:hadoop-hdfs:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-minikdc:3.2.0 (1 constraints: 07050036) org.apache.kerby:kerb-admin:1.0.1 (1 constraints: 840d892f) org.apache.kerby:kerb-client:1.0.1 (1 constraints: 840d892f) From e0a4b5bcd355554e2a59fc240123338e05a97716 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Mon, 24 Jan 2022 11:29:18 -0500 Subject: [PATCH 31/52] HDFS Contrib Module: PR fixes - Moved the contrib module README to the correct place - Removed gitignore which only contained a non-project file --- solr/contrib/README.md | 31 ------------------------------- solr/contrib/hdfs/.gitignore | 2 -- solr/contrib/hdfs/README.md | 31 ++++++++++++++++++++++++++++++- 3 files changed, 30 insertions(+), 34 deletions(-) delete mode 100644 solr/contrib/README.md delete mode 100644 solr/contrib/hdfs/.gitignore diff --git a/solr/contrib/README.md b/solr/contrib/README.md deleted file mode 100644 index 3e5ec63804e..00000000000 --- a/solr/contrib/README.md +++ /dev/null @@ -1,31 +0,0 @@ -Apache Solr HDFS Contrib module -=============================== - -Introduction ------------- -This contrib module implements the support for Hadoop Distributed File System in Apache Solr. - - -Building --------- -The HDFS contrib module uses the same Gradle build as the core Solr components. - -To build the module, you can use - -./gradlew :solr:contrib:hdfs:assemble - -The resulting module will be placed to the libs directory, for example: -solr/contrib/hdfs/build/libs/solr-hdfs-9.0.0-SNAPSHOT.jar - - -To execute the module tests: - -./gradlew :solr:contrib:hdfs:test - - - -Usage ------ -To use the module, it needs to be placed to the Solr web application classpath (for example by symlinking it to the WEB-INF/lib directory.) - -Please refer to the 'Running Solr on HDFS' section of the reference guide: https://solr.apache.org/guide/running-solr-on-hdfs.html \ No newline at end of file diff --git a/solr/contrib/hdfs/.gitignore b/solr/contrib/hdfs/.gitignore deleted file mode 100644 index 1060af53126..00000000000 --- a/solr/contrib/hdfs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# IDEA project file -hdfs.iml diff --git a/solr/contrib/hdfs/README.md b/solr/contrib/hdfs/README.md index 50c4b460adf..3e5ec63804e 100644 --- a/solr/contrib/hdfs/README.md +++ b/solr/contrib/hdfs/README.md @@ -1,2 +1,31 @@ -The HDFS contrib plugin for Solr provides support for the Hadoop Distributed File System storage. +Apache Solr HDFS Contrib module +=============================== +Introduction +------------ +This contrib module implements the support for Hadoop Distributed File System in Apache Solr. + + +Building +-------- +The HDFS contrib module uses the same Gradle build as the core Solr components. + +To build the module, you can use + +./gradlew :solr:contrib:hdfs:assemble + +The resulting module will be placed to the libs directory, for example: +solr/contrib/hdfs/build/libs/solr-hdfs-9.0.0-SNAPSHOT.jar + + +To execute the module tests: + +./gradlew :solr:contrib:hdfs:test + + + +Usage +----- +To use the module, it needs to be placed to the Solr web application classpath (for example by symlinking it to the WEB-INF/lib directory.) + +Please refer to the 'Running Solr on HDFS' section of the reference guide: https://solr.apache.org/guide/running-solr-on-hdfs.html \ No newline at end of file From 3053261cebbcd541ec9cc7c62cd97d596d9eb86e Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Wed, 26 Jan 2022 16:01:13 -0500 Subject: [PATCH 32/52] Fix a few contrib -> modules issues --- gradle/documentation/render-javadoc.gradle | 2 +- gradle/validation/forbidden-apis.gradle | 4 ++-- .../validate-source-patterns.gradle | 2 +- solr/modules/hdfs/README.md | 22 +++++++++---------- solr/modules/hdfs/build.gradle | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradle index deec1a6a6e4..7f33a240013 100644 --- a/gradle/documentation/render-javadoc.gradle +++ b/gradle/documentation/render-javadoc.gradle @@ -163,7 +163,7 @@ configure(project(":solr:test-framework")) { } } -configure(project(":solr:contrib:hdfs")) { +configure(project(":solr:modules:hdfs")) { project.tasks.withType(RenderJavadocTask) { javadocMissingIgnore = [ "org.apache.solr", diff --git a/gradle/validation/forbidden-apis.gradle b/gradle/validation/forbidden-apis.gradle index 9276003fc1a..8eb45764810 100644 --- a/gradle/validation/forbidden-apis.gradle +++ b/gradle/validation/forbidden-apis.gradle @@ -131,7 +131,7 @@ allprojects { prj -> } // Disable checks on code copied from Hadoop - if (prj.path == ":solr:contrib:hdfs") { + if (prj.path == ":solr:modules:hdfs") { forbiddenApisTest.exclude("**/org/apache/hadoop/**") } if (prj.path == ":solr:test-framework") { @@ -152,4 +152,4 @@ allprojects { prj -> task.inputs.dir(file(resources)) } }) -} \ No newline at end of file +} diff --git a/gradle/validation/validate-source-patterns.gradle b/gradle/validation/validate-source-patterns.gradle index c1d8d774ecd..426a968bae1 100644 --- a/gradle/validation/validate-source-patterns.gradle +++ b/gradle/validation/validate-source-patterns.gradle @@ -118,7 +118,7 @@ configure(project(':solr:test-framework')) { } } -configure(project(':solr:contrib:hdfs')) { +configure(project(':solr:modules:hdfs')) { project.tasks.withType(ValidateSourcePatternsTask) { sourceFiles.exclude 'src/**/org/apache/hadoop/**' } diff --git a/solr/modules/hdfs/README.md b/solr/modules/hdfs/README.md index 3e5ec63804e..ed271e5a02c 100644 --- a/solr/modules/hdfs/README.md +++ b/solr/modules/hdfs/README.md @@ -1,31 +1,31 @@ -Apache Solr HDFS Contrib module +Apache Solr HDFS Module =============================== Introduction ------------ -This contrib module implements the support for Hadoop Distributed File System in Apache Solr. - +This module implements the support for Hadoop Distributed File System in Apache Solr. Building -------- -The HDFS contrib module uses the same Gradle build as the core Solr components. +The HDFS module uses the same Gradle build as the core Solr components. To build the module, you can use -./gradlew :solr:contrib:hdfs:assemble +``` +./gradlew :solr:modules:hdfs:assemble +``` The resulting module will be placed to the libs directory, for example: -solr/contrib/hdfs/build/libs/solr-hdfs-9.0.0-SNAPSHOT.jar - +`solr/modules/hdfs/build/libs/solr-hdfs-9.0.0-SNAPSHOT.jar` To execute the module tests: -./gradlew :solr:contrib:hdfs:test - - +``` +./gradlew :solr:modules:hdfs:test +``` Usage ----- To use the module, it needs to be placed to the Solr web application classpath (for example by symlinking it to the WEB-INF/lib directory.) -Please refer to the 'Running Solr on HDFS' section of the reference guide: https://solr.apache.org/guide/running-solr-on-hdfs.html \ No newline at end of file +Please refer to the 'Running Solr on HDFS' section of the reference guide: https://solr.apache.org/guide/running-solr-on-hdfs.html diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle index 66012a87460..fd130954a01 100644 --- a/solr/modules/hdfs/build.gradle +++ b/solr/modules/hdfs/build.gradle @@ -63,7 +63,7 @@ dependencies { testImplementation 'org.apache.logging.log4j:log4j-1.2-api' // classes like solr.ICUCollationField, used by NNFailoverTest for example. - testImplementation project(':solr:contrib:analysis-extras') + testImplementation project(':solr:modules:analysis-extras') // required for instantiating a Zookeeper server in tests or embedded runtimeOnly ('org.xerial.snappy:snappy-java') From 2a5bf95bc1190d7cc9c3b6c06bddb469a350d857 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Wed, 26 Jan 2022 16:05:11 -0500 Subject: [PATCH 33/52] Fix AbstractBasicDistributedZkTestBase to match BasicDistributedZkTest on main - missed during main merge --- .../AbstractBasicDistributedZkTestBase.java | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java index 85f362fcd01..4b71235197f 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java @@ -111,12 +111,12 @@ public abstract class AbstractBasicDistributedZkTestBase extends AbstractFullDis private String oneInstanceCollection = "oneInstanceCollection"; private String oneInstanceCollection2 = "oneInstanceCollection2"; - + private AtomicInteger nodeCounter = new AtomicInteger(); - + CompletionService completionService; Set> pending; - + private static Hook newSearcherHook = new Hook() { volatile CountDownLatch latch; AtomicReference collection = new AtomicReference<>(); @@ -133,7 +133,7 @@ public void newSearcher(String collectionName) { } } } - + public void waitForSearcher(String collection, int cnt, int timeoutms, boolean failOnTimeout) throws InterruptedException { latch = new CountDownLatch(cnt); this.collection.set(collection); @@ -142,19 +142,19 @@ public void waitForSearcher(String collection, int cnt, int timeoutms, boolean f fail("timed out waiting for new searcher event " + latch.getCount()); } } - + }; public AbstractBasicDistributedZkTestBase() { // we need DVs on point fields to compute stats & facets if (Boolean.getBoolean(NUMERIC_POINTS_SYSPROP)) System.setProperty(NUMERIC_DOCVALUES_SYSPROP,"true"); - + sliceCount = 2; completionService = new ExecutorCompletionService<>(executor); pending = new HashSet<>(); - + } - + @BeforeClass public static void beforeBDZKTClass() { TestInjection.newSearcherHook(newSearcherHook); @@ -193,9 +193,9 @@ protected void test() throws Exception { for (int j = 1; j < sliceCount; j++) { zkStateReader.getLeaderRetry(DEFAULT_COLLECTION, "shard" + j, 10000); } // make sure we again have leaders for each shard - + waitForRecoveriesToFinish(false); - + handle.clear(); handle.put("timestamp", SKIPVAL); @@ -210,9 +210,9 @@ protected void test() throws Exception { indexDoc(client, params("commit", "true"), // SOLR-4923 sdoc(id,1, i1,100, tlong,100, "foo_i", foo_i_counter)); // after every update+commit, check all the shards consistency - queryAndCompareShards(params("q", "id:1", "distrib", "false", + queryAndCompareShards(params("q", "id:1", "distrib", "false", "sanity_check", "non_distrib_id_1_lookup")); - queryAndCompareShards(params("q", "id:1", + queryAndCompareShards(params("q", "id:1", "sanity_check", "distrib_id_1_lookup")); } @@ -247,7 +247,7 @@ protected void test() throws Exception { indexr(id, 17, "SubjectTerms_mfacet", vals); for (int i=100; i<150; i++) { - indexr(id, i); + indexr(id, i); } commit(); @@ -257,9 +257,9 @@ protected void test() throws Exception { testSortableTextSorting(); testSortableTextGrouping(); - queryAndCompareShards(params("q", "*:*", + queryAndCompareShards(params("q", "*:*", "sort", "id desc", - "distrib", "false", + "distrib", "false", "sanity_check", "is_empty")); // random value sort @@ -272,7 +272,7 @@ protected void test() throws Exception { query(false, new String[] {"q","*:*", "sort",i1+" desc"}); query(false, new String[] {"q","*:*", "sort",i1+" asc"}); query(false, new String[] {"q","*:*", "sort",i1+" desc", "fl","*,score"}); - query(false, new String[] {"q","*:*", "sort","n_tl1 asc", "fl","*,score"}); + query(false, new String[] {"q","*:*", "sort","n_tl1 asc", "fl","*,score"}); query(false, new String[] {"q","*:*", "sort","n_tl1 desc"}); handle.put("maxScore", SKIPVAL); query(false, new String[] {"q","{!func}"+i1});// does not expect maxScore. So if it comes ,ignore it. JavaBinCodec.writeSolrDocumentList() @@ -300,7 +300,7 @@ protected void test() throws Exception { query(false, new String[] {"q","now their fox sat had put","fl","foofoofoo", "hl","true","hl.fl",t1}); - query(false, new String[] {"q","matchesnothing","fl","*,score"}); + query(false, new String[] {"q","matchesnothing","fl","*,score"}); query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1}); query(false, new Object[] {"q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","count"}); @@ -346,7 +346,7 @@ protected void test() throws Exception { // Try to get better coverage for refinement queries by turning off over requesting. // This makes it much more likely that we may not get the top facet values and hence // we turn of that checking. - handle.put("facet_fields", SKIPVAL); + handle.put("facet_fields", SKIPVAL); query(false, new Object[] {"q","*:*", "rows",0, "facet","true", "facet.field",t1,"facet.limit",5, "facet.shard.limit",5}); // check a complex key name query(false, new Object[] {"q","*:*", "rows",0, "facet","true", "facet.field","{!key='a b/c \\' \\} foo'}"+t1,"facet.limit",5, "facet.shard.limit",5}); @@ -388,7 +388,7 @@ protected void test() throws Exception { add(cloudClient, params , getDoc("id", 300), getDoc("id", 301)); newSearcherHook.waitForSearcher(DEFAULT_COLLECTION, 2, 20000, false); - + ClusterState clusterState = getCommonCloudSolrClient().getZkStateReader().getClusterState(); DocCollection dColl = clusterState.getCollection(DEFAULT_COLLECTION); @@ -399,11 +399,11 @@ protected void test() throws Exception { deleteByIdReq.deleteById("300"); deleteByIdReq.setCommitWithin(10); deleteByIdReq.process(cloudClient); - + newSearcherHook.waitForSearcher(DEFAULT_COLLECTION, 2, 20000, false); assertSliceCounts("deleteById commitWithin did not work", before + 1, dColl); - + // try deleteByQuery commitWithin UpdateRequest deleteByQueryReq = new UpdateRequest(); deleteByQueryReq.deleteByQuery("id:301"); @@ -411,9 +411,9 @@ protected void test() throws Exception { deleteByQueryReq.process(cloudClient); newSearcherHook.waitForSearcher(DEFAULT_COLLECTION, 2, 20000, false); - + assertSliceCounts("deleteByQuery commitWithin did not work", before, dColl); - + // TODO: This test currently fails because debug info is obtained only // on shards with matches. @@ -528,13 +528,13 @@ private void testTokenizedGrouping() throws Exception { private void assertSliceCounts(String msg, long expected, DocCollection dColl) throws Exception { long found = checkSlicesSameCounts(dColl); - + if (found != expected) { // we get one do over in a bad race Thread.sleep(1000); found = checkSlicesSameCounts(dColl); } - + assertEquals(msg, expected, checkSlicesSameCounts(dColl)); } @@ -557,7 +557,7 @@ private void waitForDocCount(long expectedNumFound, long waitMillis, String fail return false; }); } catch (TimeoutException | InterruptedException e) { - + } // We could fail here if we broke out of the above because we exceeded the time allowed. assertEquals(failureMessage, expectedNumFound, total.get()); @@ -613,8 +613,8 @@ private void testShardParamVariations() throws Exception { } assertEquals("inconsitent numDocs for shard "+shard+" via "+client, shardCounts.get(shard).longValue(), numDocs); - - List replicaJetties + + List replicaJetties = new ArrayList<>(shardToJetty.get(shard)); Collections.shuffle(replicaJetties, random()); @@ -649,7 +649,7 @@ private void testShardParamVariations() throws Exception { } } - // sums of multiple shards should add up regardless of how we + // sums of multiple shards should add up regardless of how we // query those shards or which client we use long randomShardCountsExpected = 0; ArrayList randomShards = new ArrayList<>(shardCounts.size()); @@ -677,7 +677,7 @@ private void testShardParamVariations() throws Exception { query.set("shards", randShards); for (SolrClient client : this.clients) { assertEquals("numDocs for "+randShards+" via "+client, - randomShardCountsExpected, + randomShardCountsExpected, client.query(query).getResults().getNumFound()); } @@ -688,7 +688,7 @@ private void testShardParamVariations() throws Exception { totalShardNumDocs += c; } for (SolrClient client : clients) { - assertEquals("sum of shard numDocs on client: " + client, + assertEquals("sum of shard numDocs on client: " + client, totalShardNumDocs, client.query(query).getResults().getNumFound()); } @@ -715,7 +715,7 @@ private void testStopAndStartCoresInOneInstance() throws Exception { } } } - + cloudJettys.get(0).jetty.stop(); printLayout(); @@ -727,7 +727,7 @@ private void testStopAndStartCoresInOneInstance() throws Exception { printLayout(); throw e; } - + printLayout(); } @@ -910,7 +910,7 @@ private void testNumberOfCommitsWithCommitAfterAdd() NamedList result = clients.get(0).request( new StreamingUpdateRequest("/update", - getFile("books_numeric_ids.csv"), "application/csv") + getFile("books_numeric_ids.csv").toPath(), "application/csv") .setCommitWithin(900000) .setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true)); @@ -1142,7 +1142,7 @@ private void createCollection(String collection, List collectionClients, String baseUrl, int num) { createSolrCore(collection, collectionClients, baseUrl, num, null); } - + private void createSolrCore(final String collection, List collectionClients, final String baseUrl, final int num, final String shardId) { From 90daa467a1cab462b48faa782f2542ea37b8b675 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Wed, 26 Jan 2022 16:16:46 -0500 Subject: [PATCH 34/52] Fix versions.lock hash change --- versions.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.lock b/versions.lock index 2e7578aa0dd..5d2f84c349a 100644 --- a/versions.lock +++ b/versions.lock @@ -31,7 +31,7 @@ com.google.cloud:google-cloud-storage:1.113.14 (2 constraints: 10143aa3) com.google.code.findbugs:annotations:3.0.1 (1 constraints: 0605fb35) com.google.code.findbugs:jsr305:3.0.2 (9 constraints: 057f5545) com.google.code.gson:gson:2.8.6 (4 constraints: 94389e56) -com.google.errorprone:error_prone_annotations:2.10.0 (6 constraints: 214d3ae7) +com.google.errorprone:error_prone_annotations:2.10.0 (6 constraints: 4c4d2718) com.google.guava:failureaccess:1.0.1 (1 constraints: e60fd595) com.google.guava:guava:25.1-jre (2 constraints: 0515c2b9) com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (1 constraints: 8f1d45cb) From 207f10c59ba749b572eb51139b33e52c5b1e43b2 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Wed, 26 Jan 2022 16:55:59 -0500 Subject: [PATCH 35/52] Fix compilation errors due to annotations missing The error was: Cannot find annotation method 'value()' in type 'CompatibleWith': class file for com.google.errorprone.annotations.CompatibleWith not found --- solr/licenses/checker-qual-3.10.0.jar.sha1 | 1 - solr/licenses/checker-qual-3.19.0.jar.sha1 | 1 + solr/modules/hdfs/build.gradle | 11 +---------- versions.lock | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) delete mode 100644 solr/licenses/checker-qual-3.10.0.jar.sha1 create mode 100644 solr/licenses/checker-qual-3.19.0.jar.sha1 diff --git a/solr/licenses/checker-qual-3.10.0.jar.sha1 b/solr/licenses/checker-qual-3.10.0.jar.sha1 deleted file mode 100644 index 30969364cbe..00000000000 --- a/solr/licenses/checker-qual-3.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -710fd6abff4b26b40dc0917050dc4c67efcf60b6 diff --git a/solr/licenses/checker-qual-3.19.0.jar.sha1 b/solr/licenses/checker-qual-3.19.0.jar.sha1 new file mode 100644 index 00000000000..fb782cef1ce --- /dev/null +++ b/solr/licenses/checker-qual-3.19.0.jar.sha1 @@ -0,0 +1 @@ +838b42bb6f7f73315167b359d24649845cef1c48 diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle index fd130954a01..652c2f1bef1 100644 --- a/solr/modules/hdfs/build.gradle +++ b/solr/modules/hdfs/build.gradle @@ -20,7 +20,6 @@ apply plugin: 'java-library' description = 'HDFS Contrib Module' dependencies { - configurations.all { exclude group: 'log4j', module: 'log4j' exclude group: 'commons-logging', module: 'commons-logging' @@ -30,7 +29,6 @@ dependencies { // be conservative on what's added here. Affects *all* configs, including internal ones. } - implementation project(':solr:core') // Hadoop dependencies @@ -44,9 +42,7 @@ dependencies { implementation ('com.google.guava:guava') { transitive = false } // Caffeine cache to implement HDFS block caching - api('com.github.ben-manes.caffeine:caffeine', { - exclude group: "org.checkerframework", module: "checker-qual" - }) + implementation ('com.github.ben-manes.caffeine:caffeine') // Many HDFS tests are using/subclassing test framework classes testImplementation project(':solr:test-framework') @@ -73,9 +69,4 @@ dependencies { // Zookeeper dependency - some tests like HdfsCloudBackupRestore need this implementation ('org.apache.zookeeper:zookeeper') - - - - - } diff --git a/versions.lock b/versions.lock index 5d2f84c349a..e16864da365 100644 --- a/versions.lock +++ b/versions.lock @@ -188,7 +188,7 @@ org.carrot2:morfologik-polish:2.1.5 (1 constraints: cf12501e) org.carrot2:morfologik-stemming:2.1.5 (2 constraints: d01f1300) org.ccil.cowan.tagsoup:tagsoup:1.2.1 (1 constraints: 0605f735) org.checkerframework:checker-compat-qual:2.5.5 (1 constraints: f00fed95) -org.checkerframework:checker-qual:3.10.0 (4 constraints: 082ba36f) +org.checkerframework:checker-qual:3.19.0 (5 constraints: 3a3b3860) org.codehaus.janino:commons-compiler:3.0.11 (2 constraints: 81192719) org.codehaus.janino:janino:3.0.11 (1 constraints: 8d0d3f3a) org.codehaus.mojo:animal-sniffer-annotations:1.14 (1 constraints: ea09d5aa) From 6f764a0ec2942fdb49a09ca54fce56eb7013c7f6 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Wed, 26 Jan 2022 17:12:55 -0500 Subject: [PATCH 36/52] Fix another config -> modules issue --- solr/solr-ref-guide/src/index-location-format.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/solr-ref-guide/src/index-location-format.adoc b/solr/solr-ref-guide/src/index-location-format.adoc index 47d92013123..311e015cf5a 100644 --- a/solr/solr-ref-guide/src/index-location-format.adoc +++ b/solr/solr-ref-guide/src/index-location-format.adoc @@ -60,6 +60,6 @@ Use this DirectoryFactory to store your index in RAM. [NOTE] ==== -If you are using Hadoop and would like to store your indexes in HDFS, you should use the {solr-javadocs}/contrib/hdfs/org/apache/solr/core/HdfsDirectoryFactory.html[`solr.HdfsDirectoryFactory`] instead of either of the above implementations. +If you are using Hadoop and would like to store your indexes in HDFS, you should use the {solr-javadocs}/modules/hdfs/org/apache/solr/core/HdfsDirectoryFactory.html[`solr.HdfsDirectoryFactory`] instead of either of the above implementations. For more details, see the section <>. ==== From 2ec7d59195238473a7e6e6e7c5fee0112cf20f40 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Wed, 26 Jan 2022 09:13:46 -0500 Subject: [PATCH 37/52] HDFS Contrib module: test resource files are now copied from core upon build to avoid having to maintain 2 set of the same files in git. --- solr/modules/hdfs/build.gradle | 17 + solr/modules/hdfs/src/test-files/README | 21 - .../hdfs/src/test-files/books_numeric_ids.csv | 11 - .../modules/hdfs/src/test-files/core-site.xml | 23 - solr/modules/hdfs/src/test-files/log4j2.xml | 43 - .../conf/analyzingInfixSuggest.txt | 5 - .../solr/collection1/conf/bad-currency.xml | 31 - .../collection1/conf/bad-error-solrconfig.xml | 30 - .../collection1/conf/bad-mpf-solrconfig.xml | 37 - .../conf/bad-schema-analyzer-by-name.xml | 32 - .../bad-schema-analyzer-class-and-name-cf.xml | 33 - .../bad-schema-analyzer-class-and-name-tf.xml | 33 - ...bad-schema-analyzer-class-and-name-tok.xml | 32 - .../bad-schema-analyzer-class-and-nested.xml | 35 - .../bad-schema-bogus-analysis-parameters.xml | 28 - .../bad-schema-bogus-field-parameters.xml | 25 - ...bad-schema-codec-global-vs-ft-mismatch.xml | 31 - ...ad-schema-currency-dynamic-multivalued.xml | 30 - .../bad-schema-currency-ft-amount-suffix.xml | 34 - ...d-schema-currency-ft-bogus-code-in-xml.xml | 33 - ...-schema-currency-ft-bogus-default-code.xml | 33 - .../bad-schema-currency-ft-code-suffix.xml | 33 - .../bad-schema-currency-ft-multivalued.xml | 29 - .../bad-schema-currency-ft-oer-norates.xml | 32 - .../conf/bad-schema-currency-multivalued.xml | 30 - ...-currencyfieldtype-bogus-amount-suffix.xml | 34 - ...ma-currencyfieldtype-bogus-code-suffix.xml | 35 - ...-currencyfieldtype-dynamic-multivalued.xml | 36 - ...currencyfieldtype-ft-bogus-code-in-xml.xml | 41 - ...urrencyfieldtype-ft-bogus-default-code.xml | 41 - ...chema-currencyfieldtype-ft-multivalued.xml | 36 - ...chema-currencyfieldtype-ft-oer-norates.xml | 40 - ...urrencyfieldtype-missing-amount-suffix.xml | 34 - ...-currencyfieldtype-missing-code-suffix.xml | 35 - ...d-schema-currencyfieldtype-multivalued.xml | 36 - ...hema-currencyfieldtype-wrong-amount-ft.xml | 36 - ...schema-currencyfieldtype-wrong-code-ft.xml | 35 - ...schema-daterangefield-instance-options.xml | 34 - ...bad-schema-daterangefield-type-options.xml | 35 - .../conf/bad-schema-default-operator.xml | 26 - .../conf/bad-schema-defaultsearchfield.xml | 26 - .../conf/bad-schema-dup-dynamicField.xml | 35 - .../collection1/conf/bad-schema-dup-field.xml | 38 - .../conf/bad-schema-dup-fieldType.xml | 37 - .../bad-schema-dynamicfield-default-val.xml | 29 - .../conf/bad-schema-dynamicfield-required.xml | 29 - .../solr/collection1/conf/bad-schema-eff.xml | 44 - .../collection1/conf/bad-schema-enums.xml | 34 - ...terisk-copyfield-dest-should-fail-test.xml | 27 - ...risk-copyfield-source-should-fail-test.xml | 27 - ...terisk-copyfield-dest-should-fail-test.xml | 25 - ...risk-copyfield-source-should-fail-test.xml | 25 - ...urce-matching-nothing-should-fail-test.xml | 31 - .../conf/bad-schema-nontext-analyzer.xml | 33 - .../conf/bad-schema-not-indexed-but-norms.xml | 35 - .../conf/bad-schema-not-indexed-but-pos.xml | 35 - .../conf/bad-schema-not-indexed-but-tf.xml | 34 - ...ad-schema-not-indexed-but-uninvertible.xml | 35 - .../conf/bad-schema-omit-tf-but-not-pos.xml | 35 - .../bad-schema-sim-default-does-not-exist.xml | 41 - ...schema-sim-default-has-no-explicit-sim.xml | 41 - .../bad-schema-sim-global-vs-ft-mismatch.xml | 34 - .../conf/bad-schema-sweetspot-both-tf.xml | 43 - .../bad-schema-sweetspot-partial-baseline.xml | 39 - ...ad-schema-sweetspot-partial-hyperbolic.xml | 41 - .../bad-schema-sweetspot-partial-norms.xml | 40 - ...chema-uniquekey-diff-type-dynamic-root.xml | 36 - .../bad-schema-uniquekey-diff-type-root.xml | 35 - ...bad-schema-uniquekey-is-copyfield-dest.xml | 31 - .../conf/bad-schema-uniquekey-multivalued.xml | 28 - .../bad-schema-uniquekey-uses-default.xml | 28 - .../conf/bad-schema-uniquekey-uses-points.xml | 28 - .../conf/bad-schema-unsupported-docValues.xml | 26 - ...config-managed-schema-named-schema.xml.xml | 30 - .../conf/bad-solrconfig-multiple-cfs.xml | 32 - .../bad-solrconfig-multiple-dirfactory.xml | 34 - .../bad-solrconfig-multiple-indexconfigs.xml | 35 - .../conf/bad-solrconfig-no-autocommit-tag.xml | 52 - .../conf/bad-solrconfig-nrtmode.xml | 37 - ...rconfig-schema-mutable-but-not-managed.xml | 32 - ...solrconfig-unexpected-schema-attribute.xml | 32 - .../solr/collection1/conf/bad_solrconfig.xml | 28 - .../collection1/conf/blendedInfixSuggest.txt | 3 - .../collection1/conf/compoundDictionary.txt | 19 - .../solr/collection1/conf/currency.xml | 37 - .../solr/collection1/conf/da_UTF8.xml | 1208 ----------------- .../conf/da_compoundDictionary.txt | 19 - .../solr/collection1/conf/elevate.xml | 76 -- .../solr/collection1/conf/enumsConfig.xml | 52 - .../solr/collection1/conf/foo/bar.txt | 1 - .../solr/collection1/conf/freeTextSuggest.txt | 2 - .../solr/collection1/conf/frenchArticles.txt | 24 - .../solr/collection1/conf/fuzzysuggest.txt | 4 - .../solr/collection1/conf/hunspell-test.aff | 13 - .../solr/collection1/conf/hunspell-test.dic | 6 - .../solr/collection1/conf/hyphenation.dtd | 68 - .../solr/collection1/conf/jasuggest.txt | 5 - .../solr/collection1/conf/keep-1.txt | 17 - .../solr/collection1/conf/keep-2.txt | 17 - .../conf/mapping-ISOLatin1Accent.txt | 246 ---- .../collection1/conf/multiword-synonyms.txt | 15 - .../solr/collection1/conf/old_synonyms.txt | 22 - .../collection1/conf/open-exchange-rates.json | 18 - .../solr/collection1/conf/phrasesuggest.txt | 8 - .../solr/collection1/conf/protected-1.txt | 17 - .../solr/collection1/conf/protected-2.txt | 17 - .../solr/collection1/conf/protwords.txt | 23 - .../conf/regex-boost-processor-test.txt | 10 - .../conf/schema-HighlighterMaxOffsetTest.xml | 85 -- .../conf/schema-SimpleTextCodec.xml | 32 - ...ema-add-schema-fields-update-processor.xml | 72 - .../conf/schema-analyzer-by-name.xml | 78 -- .../solr/collection1/conf/schema-behavior.xml | 145 -- .../collection1/conf/schema-binaryfield.xml | 41 - .../solr/collection1/conf/schema-bm25.xml | 46 - .../conf/schema-booleansimilarity.xml | 35 - .../collection1/conf/schema-charfilters.xml | 47 - ...class-name-shortening-on-serialization.xml | 44 - .../conf/schema-classification.xml | 43 - .../collection1/conf/schema-collate-dv.xml | 59 - .../solr/collection1/conf/schema-collate.xml | 58 - .../conf/schema-copyfield-test.xml | 456 ------- .../collection1/conf/schema-custom-field.xml | 44 - .../collection1/conf/schema-customfield.xml | 55 - .../collection1/conf/schema-deprecations.xml | 36 - .../solr/collection1/conf/schema-dfi.xml | 50 - .../solr/collection1/conf/schema-dfr.xml | 64 - .../conf/schema-distrib-interval-faceting.xml | 78 -- .../conf/schema-distributed-missing-sort.xml | 86 -- .../collection1/conf/schema-docValues.xml | 81 -- .../conf/schema-docValuesFaceting.xml | 96 -- .../collection1/conf/schema-docValuesJoin.xml | 105 -- .../conf/schema-docValuesMissing.xml | 116 -- .../conf/schema-docValuesMulti.xml | 49 - .../solr/collection1/conf/schema-eff.xml | 40 - .../solr/collection1/conf/schema-enums.xml | 49 - .../conf/schema-field-sort-values.xml | 36 - .../solr/collection1/conf/schema-folding.xml | 262 ---- .../solr/collection1/conf/schema-hash.xml | 586 -------- .../solr/collection1/conf/schema-ib.xml | 51 - .../schema-id-and-version-fields-only.xml | 25 - .../conf/schema-inplace-required-field.xml | 35 - .../conf/schema-inplace-updates.xml | 69 - .../collection1/conf/schema-lmdirichlet.xml | 44 - .../conf/schema-lmjelinekmercer.xml | 44 - .../conf/schema-luceneMatchVersion.xml | 52 - .../solr/collection1/conf/schema-minhash.xml | 602 -------- .../conf/schema-minimal-atomic-stress.xml | 38 - .../schema-minimal-with-another-uniqkey.xml | 23 - .../solr/collection1/conf/schema-minimal.xml | 21 - .../conf/schema-multiword-synonyms.xml | 52 - .../solr/collection1/conf/schema-nest.xml | 63 - .../conf/schema-non-stored-docvalues.xml | 74 - .../conf/schema-not-required-unique-key.xml | 38 - .../conf/schema-null-charfilters-analyzer.xml | 27 - .../solr/collection1/conf/schema-numeric.xml | 85 -- ...-one-field-no-dynamic-field-unique-key.xml | 25 - .../schema-one-field-no-dynamic-field.xml | 24 - .../conf/schema-phrases-identification.xml | 97 -- .../collection1/conf/schema-phrasesuggest.xml | 56 - .../solr/collection1/conf/schema-point.xml | 187 --- .../conf/schema-postingshighlight.xml | 46 - .../collection1/conf/schema-preanalyzed.xml | 44 - .../conf/schema-protected-term.xml | 86 -- .../collection1/conf/schema-pseudo-fields.xml | 74 - .../collection1/conf/schema-rank-fields.xml | 27 - .../collection1/conf/schema-replication1.xml | 38 - .../collection1/conf/schema-replication2.xml | 40 - .../conf/schema-required-fields.xml | 401 ------ .../conf/schema-rest-lucene-match-version.xml | 36 - .../solr/collection1/conf/schema-rest.xml | 732 ---------- .../solr/collection1/conf/schema-reversed.xml | 80 -- .../solr/collection1/conf/schema-root.xml | 34 - .../conf/schema-sim-default-override.xml | 66 - .../solr/collection1/conf/schema-sim.xml | 69 - .../conf/schema-simpleqpplugin.xml | 60 - .../collection1/conf/schema-snippet-field.xml | 3 - .../collection1/conf/schema-snippet-type.xml | 3 - .../conf/schema-snippet-types.incl | 19 - .../collection1/conf/schema-sorting-text.xml | 149 -- .../conf/schema-sortingresponse.xml | 133 -- .../solr/collection1/conf/schema-sorts.xml | 314 ----- .../solr/collection1/conf/schema-spatial.xml | 110 -- .../collection1/conf/schema-spellchecker.xml | 62 - .../solr/collection1/conf/schema-sql.xml | 622 --------- .../collection1/conf/schema-sweetspot.xml | 69 - .../conf/schema-synonym-tokenizer.xml | 40 - .../solr/collection1/conf/schema-tagger.xml | 187 --- .../solr/collection1/conf/schema-tfidf.xml | 44 - .../solr/collection1/conf/schema-tiny.xml | 37 - .../conf/schema-tokenizer-test.xml | 125 -- .../solr/collection1/conf/schema-trie.xml | 300 ---- .../conf/schema-unifiedhighlight.xml | 45 - .../collection1/conf/schema-version-dv.xml | 33 - .../conf/schema-version-indexed.xml | 33 - .../solr/collection1/conf/schema-xinclude.xml | 26 - .../solr/collection1/conf/schema.xml | 912 ------------- .../solr/collection1/conf/schema11.xml | 500 ------- .../solr/collection1/conf/schema12.xml | 794 ----------- .../solr/collection1/conf/schema15.xml | 635 --------- .../solr/collection1/conf/schema_codec.xml | 54 - .../solr/collection1/conf/schema_latest.xml | 735 ---------- .../conf/schema_postingsformat.xml | 41 - .../solr/collection1/conf/schemasurround.xml | 592 -------- .../collection1/conf/solrconfig-SOLR-749.xml | 35 - ...-schema-fields-update-processor-chains.xml | 223 --- .../conf/solrconfig-altdirectory.xml | 27 - .../conf/solrconfig-analytics-query.xml | 268 ---- .../collection1/conf/solrconfig-basic.xml | 29 - .../conf/solrconfig-cache-enable-disable.xml | 87 -- .../conf/solrconfig-classification.xml | 68 - .../conf/solrconfig-collapseqparser.xml | 276 ---- .../conf/solrconfig-components-name.xml | 67 - .../solrconfig-concurrentmergescheduler.xml | 37 - .../solrconfig-configurerecoverystrategy.xml | 28 - .../solrconfig-customrecoverystrategy.xml | 32 - .../conf/solrconfig-dedup-overwrites.xml | 81 -- .../conf/solrconfig-deeppaging.xml | 76 -- .../collection1/conf/solrconfig-defaults.xml | 43 - .../conf/solrconfig-delaying-component.xml | 59 - .../conf/solrconfig-delpolicy1.xml | 51 - .../conf/solrconfig-delpolicy2.xml | 48 - ...config-distrib-update-processor-chains.xml | 82 -- ...solrconfig-doc-expire-update-processor.xml | 96 -- .../conf/solrconfig-doctransformers.xml | 46 - .../collection1/conf/solrconfig-elevate.xml | 135 -- .../solrconfig-externalversionconstraint.xml | 173 --- .../collection1/conf/solrconfig-follower.xml | 59 - .../collection1/conf/solrconfig-follower1.xml | 52 - .../conf/solrconfig-functionquery.xml | 48 - .../solr/collection1/conf/solrconfig-hash.xml | 55 - .../collection1/conf/solrconfig-headers.xml | 32 - .../collection1/conf/solrconfig-highlight.xml | 61 - .../conf/solrconfig-implicitproperties.xml | 68 - ...rconfig-indexconfig-mergepolicyfactory.xml | 31 - .../conf/solrconfig-indexmetrics.xml | 61 - .../conf/solrconfig-infixsuggesters.xml | 101 -- .../conf/solrconfig-infostream-logging.xml | 29 - .../conf/solrconfig-leader-throttled.xml | 66 - .../collection1/conf/solrconfig-leader.xml | 70 - .../conf/solrconfig-leader1-keepOneBackup.xml | 49 - .../collection1/conf/solrconfig-leader1.xml | 68 - .../collection1/conf/solrconfig-leader2.xml | 66 - .../collection1/conf/solrconfig-leader3.xml | 67 - .../conf/solrconfig-logmergepolicyfactory.xml | 37 - .../conf/solrconfig-managed-schema-test.xml | 27 - .../conf/solrconfig-managed-schema.xml | 83 -- .../conf/solrconfig-memory-circuitbreaker.xml | 94 -- .../conf/solrconfig-mergepolicy-defaults.xml | 33 - .../conf/solrconfig-mergepolicy-legacy.xml | 31 - .../solrconfig-mergepolicyfactory-nocfs.xml | 34 - .../collection1/conf/solrconfig-minhash.xml | 508 ------- .../collection1/conf/solrconfig-minimal.xml | 65 - .../collection1/conf/solrconfig-nocache.xml | 48 - .../conf/solrconfig-nomergepolicyfactory.xml | 32 - .../collection1/conf/solrconfig-noopregen.xml | 36 - .../collection1/conf/solrconfig-paramset.xml | 89 -- ...config-parsing-update-processor-chains.xml | 234 ---- .../solrconfig-phrases-identification.xml | 53 - .../conf/solrconfig-phrasesuggest.xml | 468 ------- .../conf/solrconfig-plugcollector.xml | 487 ------- .../conf/solrconfig-postingshighlight.xml | 36 - .../conf/solrconfig-query-parser-init.xml | 37 - .../conf/solrconfig-querysender-noquery.xml | 75 - .../conf/solrconfig-querysender.xml | 71 - .../collection1/conf/solrconfig-repeater.xml | 61 - .../conf/solrconfig-replication-legacy.xml | 62 - .../conf/solrconfig-reqHandler.incl | 5 - .../solrconfig-response-log-component.xml | 61 - .../conf/solrconfig-schemaless.xml | 98 -- .../conf/solrconfig-searcher-listeners1.xml | 51 - .../conf/solrconfig-snippet-processor.xml | 6 - .../conf/solrconfig-solcoreproperties.xml | 36 - .../solrconfig-sortingmergepolicyfactory.xml | 56 - .../conf/solrconfig-sortingresponse.xml | 44 - .../collection1/conf/solrconfig-spatial.xml | 42 - .../conf/solrconfig-spellcheckcomponent.xml | 197 --- .../conf/solrconfig-spellchecker.xml | 143 -- .../solr/collection1/conf/solrconfig-sql.xml | 66 - ...uggestercomponent-context-filter-query.xml | 122 -- .../conf/solrconfig-suggestercomponent.xml | 146 -- .../collection1/conf/solrconfig-tagger.xml | 59 - .../collection1/conf/solrconfig-test-misc.xml | 47 - .../conf/solrconfig-testxmlparser.xml | 33 - .../solrconfig-tieredmergepolicyfactory.xml | 41 - .../solr/collection1/conf/solrconfig-tlog.xml | 152 --- .../conf/solrconfig-tolerant-search.xml | 53 - .../solrconfig-tolerant-update-minimal.xml | 40 - .../conf/solrconfig-transformers.xml | 89 -- .../solrconfig-update-processor-chains.xml | 652 --------- ...config-warmer-randommergepolicyfactory.xml | 46 - .../conf/solrconfig-withgethandler.xml | 52 - .../collection1/conf/solrconfig-xinclude.xml | 36 - .../solrconfig.snippet.randomindexconfig.xml | 51 - .../solr/collection1/conf/solrconfig.xml | 525 ------- .../conf/solrconfig_SimpleTextCodec.xml | 26 - .../collection1/conf/solrconfig_codec.xml | 28 - .../collection1/conf/solrconfig_codec2.xml | 26 - .../solr/collection1/conf/solrconfig_perf.xml | 70 - .../solr/collection1/conf/stemdict.txt | 22 - .../solr/collection1/conf/stop-1.txt | 17 - .../solr/collection1/conf/stop-2.txt | 17 - .../solr/collection1/conf/stop-snowball.txt | 10 - .../solr/collection1/conf/stoptypes-1.txt | 17 - .../solr/collection1/conf/stoptypes-2.txt | 17 - .../solr/collection1/conf/stopwithbom.txt | 1 - .../solr/collection1/conf/stopwords.txt | 58 - .../conf/stopwordsWrongEncoding.txt | 18 - .../solr/collection1/conf/synonyms.txt | 54 - .../solr/collection1/conf/wdftypes.txt | 32 - .../configsets/cloud-hdfs/conf/schema.xml | 28 - .../configsets/cloud-hdfs/conf/solrconfig.xml | 49 - .../configsets/cloud-minimal/conf/schema.xml | 29 - .../cloud-minimal/conf/solrconfig.xml | 51 - .../configsets/cloud-subdirs/conf/schema.xml | 28 - .../cloud-subdirs/conf/solrconfig.xml | 48 - .../conf/stopwords/stopwords-en.txt | 62 - .../modules/hdfs/src/test-files/solr/solr.xml | 55 - 318 files changed, 17 insertions(+), 27321 deletions(-) delete mode 100644 solr/modules/hdfs/src/test-files/README delete mode 100644 solr/modules/hdfs/src/test-files/books_numeric_ids.csv delete mode 100644 solr/modules/hdfs/src/test-files/core-site.xml delete mode 100644 solr/modules/hdfs/src/test-files/log4j2.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-currency.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-error-solrconfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-mpf-solrconfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-by-name.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-cf.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tf.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tok.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-nested.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-analysis-parameters.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-field-parameters.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-codec-global-vs-ft-mismatch.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-dynamic-multivalued.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-amount-suffix.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-code-in-xml.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-default-code.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-code-suffix.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-multivalued.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-oer-norates.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-multivalued.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-amount-suffix.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-code-suffix.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-dynamic-multivalued.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-code-in-xml.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-default-code.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-multivalued.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-oer-norates.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-amount-suffix.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-code-suffix.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-multivalued.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-amount-ft.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-code-ft.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-instance-options.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-type-options.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-default-operator.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-dynamicField.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-field.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-fieldType.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-default-val.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-required.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-eff.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-enums.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-dest-should-fail-test.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-source-should-fail-test.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-dest-should-fail-test.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-source-should-fail-test.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-non-glob-copyfield-source-matching-nothing-should-fail-test.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-nontext-analyzer.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-norms.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-pos.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-tf.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-uninvertible.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-omit-tf-but-not-pos.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-does-not-exist.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-has-no-explicit-sim.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-global-vs-ft-mismatch.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-both-tf.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-baseline.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-hyperbolic.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-norms.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-dynamic-root.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-root.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-is-copyfield-dest.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-multivalued.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-default.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-points.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-unsupported-docValues.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-managed-schema-named-schema.xml.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-cfs.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-dirfactory.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-indexconfigs.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-no-autocommit-tag.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-nrtmode.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-schema-mutable-but-not-managed.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-unexpected-schema-attribute.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/bad_solrconfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/blendedInfixSuggest.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/compoundDictionary.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/currency.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/da_UTF8.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/da_compoundDictionary.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/elevate.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/enumsConfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/foo/bar.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/freeTextSuggest.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/frenchArticles.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/fuzzysuggest.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/hunspell-test.aff delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/hunspell-test.dic delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/hyphenation.dtd delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/jasuggest.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/keep-1.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/keep-2.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/multiword-synonyms.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/old_synonyms.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/open-exchange-rates.json delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/phrasesuggest.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/protected-1.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/protected-2.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/protwords.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/regex-boost-processor-test.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-SimpleTextCodec.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-add-schema-fields-update-processor.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-analyzer-by-name.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-behavior.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-binaryfield.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-booleansimilarity.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-charfilters.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-class-name-shortening-on-serialization.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-classification.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-collate-dv.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-collate.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-copyfield-test.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-custom-field.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-customfield.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-deprecations.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-dfi.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-dfr.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-distributed-missing-sort.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValues.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesJoin.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMissing.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMulti.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-eff.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-enums.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-field-sort-values.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-folding.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-ib.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-id-and-version-fields-only.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-inplace-required-field.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-inplace-updates.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-lmdirichlet.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-lmjelinekmercer.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-luceneMatchVersion.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal-atomic-stress.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal-with-another-uniqkey.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-multiword-synonyms.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-nest.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-non-stored-docvalues.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-not-required-unique-key.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-null-charfilters-analyzer.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-numeric.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field-unique-key.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-phrases-identification.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-point.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-postingshighlight.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-preanalyzed.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-protected-term.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-pseudo-fields.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rank-fields.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-replication1.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-replication2.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-required-fields.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rest-lucene-match-version.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-reversed.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-root.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sim-default-override.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sim.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-simpleqpplugin.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-field.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-type.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-types.incl delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sorting-text.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sortingresponse.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sorts.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sql.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sweetspot.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-synonym-tokenizer.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tagger.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tfidf.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tiny.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tokenizer-test.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-unifiedhighlight.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-version-dv.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-version-indexed.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-xinclude.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema11.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema12.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema15.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_codec.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_postingsformat.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-add-schema-fields-update-processor-chains.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-basic.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-classification.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-concurrentmergescheduler.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-configurerecoverystrategy.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-customrecoverystrategy.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-dedup-overwrites.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-deeppaging.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-defaults.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-distrib-update-processor-chains.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-doc-expire-update-processor.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower1.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-headers.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-highlight.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexconfig-mergepolicyfactory.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexmetrics.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-infixsuggesters.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader-throttled.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1-keepOneBackup.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader2.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader3.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-logmergepolicyfactory.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema-test.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-memory-circuitbreaker.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-defaults.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicyfactory-nocfs.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-minhash.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-minimal.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-nocache.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-noopregen.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-paramset.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-parsing-update-processor-chains.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrases-identification.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-query-parser-init.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-repeater.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-replication-legacy.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-reqHandler.incl delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-schemaless.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-searcher-listeners1.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-snippet-processor.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingmergepolicyfactory.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingresponse.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spatial.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent-context-filter-query.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tagger.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-testxmlparser.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-search.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-update-minimal.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-transformers.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-warmer-randommergepolicyfactory.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-withgethandler.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_SimpleTextCodec.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec2.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_perf.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stemdict.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-1.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-2.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-snowball.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stoptypes-1.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stoptypes-2.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwithbom.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwords.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwordsWrongEncoding.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/synonyms.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/collection1/conf/wdftypes.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/schema.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/schema.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/solrconfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/schema.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/solrconfig.xml delete mode 100644 solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/stopwords/stopwords-en.txt delete mode 100644 solr/modules/hdfs/src/test-files/solr/solr.xml diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle index 652c2f1bef1..e73ddb010e1 100644 --- a/solr/modules/hdfs/build.gradle +++ b/solr/modules/hdfs/build.gradle @@ -69,4 +69,21 @@ dependencies { // Zookeeper dependency - some tests like HdfsCloudBackupRestore need this implementation ('org.apache.zookeeper:zookeeper') + +} + + +// Copy all the test resource files from core to the build/resources/test directory +// of the HDFS module so we can avoid duplication of the test resource files like +// schemas and SolrConfigs. This can be improved later by making the test classes +// load the resources from core directories directly. +task copySolrCoreTestResources(type: Copy) { + from('../../core/src/test-files') { + exclude '**/*.java' + } + into sourceSets.test.output.resourcesDir +} + +tasks.processTestResources.configure { + dependsOn copySolrCoreTestResources } diff --git a/solr/modules/hdfs/src/test-files/README b/solr/modules/hdfs/src/test-files/README deleted file mode 100644 index 10f878acccb..00000000000 --- a/solr/modules/hdfs/src/test-files/README +++ /dev/null @@ -1,21 +0,0 @@ - - -This directory is where any non-transient, non-java files needed -for the execution of tests should live. - -It is used as the CWD when running JUnit tests. diff --git a/solr/modules/hdfs/src/test-files/books_numeric_ids.csv b/solr/modules/hdfs/src/test-files/books_numeric_ids.csv deleted file mode 100644 index 817e8b769cf..00000000000 --- a/solr/modules/hdfs/src/test-files/books_numeric_ids.csv +++ /dev/null @@ -1,11 +0,0 @@ -id,cat,name,price,inStock,author_t,series_t,sequence_i,genre_s -0553573403,book,A Game of Thrones,7.99,true,George R.R. Martin,"A Song of Ice and Fire",1,fantasy -0553579908,book,A Clash of Kings,7.99,true,George R.R. Martin,"A Song of Ice and Fire",2,fantasy -0553573429,book,A Storm of Swords,7.99,true,George R.R. Martin,"A Song of Ice and Fire",3,fantasy -0553293354,book,Foundation,7.99,true,Isaac Asimov,Foundation Novels,1,scifi -0812521390,book,The Black Company,6.99,false,Glen Cook,The Chronicles of The Black Company,1,fantasy -0812550706,book,Ender's Game,6.99,true,Orson Scott Card,Ender,1,scifi -0441385532,book,Jhereg,7.95,false,Steven Brust,Vlad Taltos,1,fantasy -0380014300,book,Nine Princes In Amber,6.99,true,Roger Zelazny,the Chronicles of Amber,1,fantasy -0805080481,book,The Book of Three,5.99,true,Lloyd Alexander,The Chronicles of Prydain,1,fantasy -0805080499,book,The Black Cauldron,5.99,true,Lloyd Alexander,The Chronicles of Prydain,2,fantasy diff --git a/solr/modules/hdfs/src/test-files/core-site.xml b/solr/modules/hdfs/src/test-files/core-site.xml deleted file mode 100644 index 994ca6d8772..00000000000 --- a/solr/modules/hdfs/src/test-files/core-site.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - hadoop.security.group.mapping - org.apache.solr.cloud.hadoop.FakeGroupMapping - - diff --git a/solr/modules/hdfs/src/test-files/log4j2.xml b/solr/modules/hdfs/src/test-files/log4j2.xml deleted file mode 100644 index de7954e3929..00000000000 --- a/solr/modules/hdfs/src/test-files/log4j2.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - %maxLen{%-4r %-5p (%t) [%X{node_name} %X{collection} %X{shard} %X{replica} %X{core} %X{trace_id}] %c{1.} %m%notEmpty{ - =>%ex{short}}}{10240}%n - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt deleted file mode 100644 index 6d276c33a16..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt +++ /dev/null @@ -1,5 +0,0 @@ -# simple AnalyzingInfix suggest phrase dictionary for testing -Japanese Autocomplete and Japanese Highlighter broken -Add Japanese Kanji number normalization to Kuromoji -Add decompose compound Japanese Katakana token capability to Kuromoji -This is just another entry! \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-currency.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-currency.xml deleted file mode 100644 index d7aeeeb2331..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-currency.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-error-solrconfig.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-error-solrconfig.xml deleted file mode 100644 index c8bb8cf66e3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-error-solrconfig.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-mpf-solrconfig.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-mpf-solrconfig.xml deleted file mode 100644 index 19d786056ad..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-mpf-solrconfig.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - 8 - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-by-name.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-by-name.xml deleted file mode 100644 index ec3e2ce3198..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-by-name.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-cf.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-cf.xml deleted file mode 100644 index 4c0252a02f2..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-cf.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tf.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tf.xml deleted file mode 100644 index d60aa06b14d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tf.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tok.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tok.xml deleted file mode 100644 index 3f89f7202b6..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-name-tok.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-nested.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-nested.xml deleted file mode 100644 index 8321405c120..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-analyzer-class-and-nested.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-analysis-parameters.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-analysis-parameters.xml deleted file mode 100644 index 82ce742967c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-analysis-parameters.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-field-parameters.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-field-parameters.xml deleted file mode 100644 index e9272865b53..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-bogus-field-parameters.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-codec-global-vs-ft-mismatch.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-codec-global-vs-ft-mismatch.xml deleted file mode 100644 index 5c8e4e330f0..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-codec-global-vs-ft-mismatch.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-dynamic-multivalued.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-dynamic-multivalued.xml deleted file mode 100644 index 9956c391fc3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-dynamic-multivalued.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-amount-suffix.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-amount-suffix.xml deleted file mode 100644 index bafdb37d722..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-amount-suffix.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-code-in-xml.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-code-in-xml.xml deleted file mode 100644 index 879daa2aae9..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-code-in-xml.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-default-code.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-default-code.xml deleted file mode 100644 index 4c47f6b50ed..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-bogus-default-code.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-code-suffix.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-code-suffix.xml deleted file mode 100644 index 06973f46fa8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-code-suffix.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-multivalued.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-multivalued.xml deleted file mode 100644 index ccd014b6714..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-multivalued.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-oer-norates.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-oer-norates.xml deleted file mode 100644 index a1d664cd027..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-ft-oer-norates.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-multivalued.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-multivalued.xml deleted file mode 100644 index 984445669ff..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currency-multivalued.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-amount-suffix.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-amount-suffix.xml deleted file mode 100644 index 37b6d200f16..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-amount-suffix.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-code-suffix.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-code-suffix.xml deleted file mode 100644 index 717245533fd..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-bogus-code-suffix.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-dynamic-multivalued.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-dynamic-multivalued.xml deleted file mode 100644 index 2fba82a6aec..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-dynamic-multivalued.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-code-in-xml.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-code-in-xml.xml deleted file mode 100644 index 3b5c69535ac..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-code-in-xml.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-default-code.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-default-code.xml deleted file mode 100644 index 27483729127..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-bogus-default-code.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-multivalued.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-multivalued.xml deleted file mode 100644 index 6afcea452e6..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-multivalued.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-oer-norates.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-oer-norates.xml deleted file mode 100644 index 8d8533d75ed..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-ft-oer-norates.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-amount-suffix.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-amount-suffix.xml deleted file mode 100644 index 77a531d5b32..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-amount-suffix.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-code-suffix.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-code-suffix.xml deleted file mode 100644 index 89c70801055..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-missing-code-suffix.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-multivalued.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-multivalued.xml deleted file mode 100644 index 9e95458331d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-multivalued.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-amount-ft.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-amount-ft.xml deleted file mode 100644 index 51881901279..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-amount-ft.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-code-ft.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-code-ft.xml deleted file mode 100644 index c3eadc1e019..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-currencyfieldtype-wrong-code-ft.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-instance-options.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-instance-options.xml deleted file mode 100644 index 3b040c20e1f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-instance-options.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-type-options.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-type-options.xml deleted file mode 100644 index 9489cf13aa5..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-daterangefield-type-options.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-default-operator.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-default-operator.xml deleted file mode 100644 index 3de607c42b3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-default-operator.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - id - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml deleted file mode 100644 index 9567e30dd48..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - id - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-dynamicField.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-dynamicField.xml deleted file mode 100644 index 48990d628b3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-dynamicField.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-field.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-field.xml deleted file mode 100644 index aee203e6a6e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-field.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-fieldType.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-fieldType.xml deleted file mode 100644 index ac48c515ae2..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dup-fieldType.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-default-val.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-default-val.xml deleted file mode 100644 index a4a7444f333..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-default-val.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-required.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-required.xml deleted file mode 100644 index 359fa1b2079..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-dynamicfield-required.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-eff.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-eff.xml deleted file mode 100644 index da662819f77..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-eff.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - id - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-enums.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-enums.xml deleted file mode 100644 index 675f45efab5..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-enums.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - id - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-dest-should-fail-test.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-dest-should-fail-test.xml deleted file mode 100644 index 8b680721d00..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-dest-should-fail-test.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-source-should-fail-test.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-source-should-fail-test.xml deleted file mode 100644 index 9f9ed989f65..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-misplaced-asterisk-copyfield-source-should-fail-test.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-dest-should-fail-test.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-dest-should-fail-test.xml deleted file mode 100644 index 582f2d58356..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-dest-should-fail-test.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-source-should-fail-test.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-source-should-fail-test.xml deleted file mode 100644 index ee892445d60..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-multiple-asterisk-copyfield-source-should-fail-test.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-non-glob-copyfield-source-matching-nothing-should-fail-test.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-non-glob-copyfield-source-matching-nothing-should-fail-test.xml deleted file mode 100644 index d01ed87b141..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-non-glob-copyfield-source-matching-nothing-should-fail-test.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-nontext-analyzer.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-nontext-analyzer.xml deleted file mode 100644 index a8b6642d6bc..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-nontext-analyzer.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-norms.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-norms.xml deleted file mode 100644 index 4b39ba4e21e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-norms.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-pos.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-pos.xml deleted file mode 100644 index 476a0b0a2c4..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-pos.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-tf.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-tf.xml deleted file mode 100644 index 3c56a57bb0d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-tf.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-uninvertible.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-uninvertible.xml deleted file mode 100644 index 8f814dfe19e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-not-indexed-but-uninvertible.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-omit-tf-but-not-pos.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-omit-tf-but-not-pos.xml deleted file mode 100644 index 827879e25df..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-omit-tf-but-not-pos.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-does-not-exist.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-does-not-exist.xml deleted file mode 100644 index eeb0242541f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-does-not-exist.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - ft-does-not-exist - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-has-no-explicit-sim.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-has-no-explicit-sim.xml deleted file mode 100644 index fef7f1f296b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-default-has-no-explicit-sim.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - ft-has-no-sim - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-global-vs-ft-mismatch.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-global-vs-ft-mismatch.xml deleted file mode 100644 index c8406ea33bd..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sim-global-vs-ft-mismatch.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-both-tf.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-both-tf.xml deleted file mode 100644 index 64a41baa7a5..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-both-tf.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - 6.0 - 1.5 - 3.3 - 7.7 - 5.0 - 5.0 - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-baseline.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-baseline.xml deleted file mode 100644 index 6605a51b5f8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-baseline.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - 6.0 - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-hyperbolic.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-hyperbolic.xml deleted file mode 100644 index e1ced325247..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-hyperbolic.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - 3.3 - - 5.0 - 5.0 - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-norms.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-norms.xml deleted file mode 100644 index eae48aa43ca..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-sweetspot-partial-norms.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - 3 - - 0.5 - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-dynamic-root.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-dynamic-root.xml deleted file mode 100644 index 4f06bd1270c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-dynamic-root.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - id - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-root.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-root.xml deleted file mode 100644 index 377762d0443..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-diff-type-root.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - id - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-is-copyfield-dest.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-is-copyfield-dest.xml deleted file mode 100644 index 19db42d5554..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-is-copyfield-dest.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-multivalued.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-multivalued.xml deleted file mode 100644 index a1c384f8e0f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-multivalued.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-default.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-default.xml deleted file mode 100644 index 2c7583abf81..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-default.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-points.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-points.xml deleted file mode 100644 index ac4fd9c4a2d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-uniquekey-uses-points.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-unsupported-docValues.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-unsupported-docValues.xml deleted file mode 100644 index 9741a387e24..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-schema-unsupported-docValues.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-managed-schema-named-schema.xml.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-managed-schema-named-schema.xml.xml deleted file mode 100644 index b9778f4d01e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-managed-schema-named-schema.xml.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - false - schema.xml - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-cfs.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-cfs.xml deleted file mode 100644 index eef7d740673..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-cfs.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - true - false - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-dirfactory.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-dirfactory.xml deleted file mode 100644 index 89b9451ca5d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-dirfactory.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-indexconfigs.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-indexconfigs.xml deleted file mode 100644 index b93843f1b25..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-multiple-indexconfigs.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - true - - - - ${useCompoundFile:false} - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-no-autocommit-tag.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-no-autocommit-tag.xml deleted file mode 100644 index 1040db64671..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-no-autocommit-tag.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - 5k - - - - - - - - explicit - true - text - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-nrtmode.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-nrtmode.xml deleted file mode 100644 index 02f53e3a9d7..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-nrtmode.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - false - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-schema-mutable-but-not-managed.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-schema-mutable-but-not-managed.xml deleted file mode 100644 index 50cd09fe495..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-schema-mutable-but-not-managed.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - false - schema.xml - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-unexpected-schema-attribute.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-unexpected-schema-attribute.xml deleted file mode 100644 index ec2e9affb3c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad-solrconfig-unexpected-schema-attribute.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - false - managed-schema - bogusValue - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad_solrconfig.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad_solrconfig.xml deleted file mode 100644 index e24df5846fd..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/bad_solrconfig.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${unset.sys.property} - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/blendedInfixSuggest.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/blendedInfixSuggest.txt deleted file mode 100644 index c3b3d340bb7..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/blendedInfixSuggest.txt +++ /dev/null @@ -1,3 +0,0 @@ -top of the lake 18 lake -star wars: episode v - the empire strikes back 12 star -the returned 10 ret diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/compoundDictionary.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/compoundDictionary.txt deleted file mode 100644 index f4977b5df72..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/compoundDictionary.txt +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# A set of words for testing the DictionaryCompound factory -soft -ball -team diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/currency.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/currency.xml deleted file mode 100644 index 6a12b32b2a8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/currency.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/da_UTF8.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/da_UTF8.xml deleted file mode 100644 index 2c8d203be68..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/da_UTF8.xml +++ /dev/null @@ -1,1208 +0,0 @@ - - - - - - - - - - -aA -bB -cC -dD -eE -fF -gG -hH -iI -jJ -kK -lL -mM -nN -oO -pP -qQ -rR -sS -tT -uU -vV -wW -xX -yY -zZ -æÆ -øØ -åÅ - - - -.ae3 -.an3k -.an1s -.be5la -.be1t -.bi4tr -.der3i -.diagno5 -.her3 -.hoved3 -.ne4t5 -.om1 -.ove4 -.po1 -.til3 -.yd5r -ab5le -3abst -a3c -ade5la -5adg -a1e -5afg -5a4f1l -af3r -af4ri -5afs -a4gef -a4gi -ag5in -ag5si -3agti -a4gy -a3h -ais5t -a3j -a5ka -a3ke -a5kr -aku5 -a3la -a1le -a1li -al3k -4alkv -a1lo -al5si -a3lu -a1ly -am4pa -3analy -an4k5r -a3nu -3anv -a5o -a5pe -a3pi -a5po -a1ra -ar5af -1arb -a1re -5arg -a1ri -a3ro -a3sa -a3sc -a1si -a3sk -a3so -3a3sp -a3ste -a3sti -a1ta1 -a1te -a1ti -a4t5in -a1to -ato5v -a5tr -a1tu -a5va -a1ve -a5z -1ba -ba4ti -4bd -1be -be1k -be3ro -be5ru -be1s4 -be1tr -1bi -bi5sk -b1j -4b1n -1bo -bo4gr -bo3ra -bo5re -1br4 -4bs -bs5k -b3so -b1st -b5t -3bu -bu4s5tr -b5w -1by -by5s -4c1c -1ce -ce5ro -3ch -4ch. -ci4o -ck3 -5cy -3da -4d3af -d5anta -da4s -d1b -d1d4 -1de -de5d -4de4lem -der5eri -de4rig -de5sk -d1f -d1g -d3h -1di -di1e -di5l -d3j -d1k -d1l -d1m -4d1n -3do -4dop -d5ov -d1p -4drett -5d4reve -3drif -3driv -d5ros -d5ru -ds5an -ds5in -d1ski -d4sm -d4su -dsu5l -ds5vi -d3ta -d1te -dt5o -d5tr -dt5u -1du -dub5 -d1v -3dy -e5ad -e3af -e5ag -e3ak -e1al -ea4la -e3an -e5ap -e3at -e3bl -ebs3 -e1ci -ed5ar -edde4 -eddel5 -e4do -ed5ra -ed3re -ed3rin -ed4str -e3e -3eff -e3fr -3eft -e3gu -e1h -e3in -ei5s -e3je -e4j5el -e1ka -e3ke -e3kl -4e1ko -e5kr -ek5sa -3eksem -3eksp -e3ku -e1kv -e5ky -e3lad -el3ak -el3ar -e1las -e3le -e4lek -3elem -e1li -5elim -e3lo -el5sa -e5lu -e3ly -e4mad -em4p5le -em1s -en5ak -e4nan -4enn -e4no -en3so -e5nu -e5ol -e3op -e1or -e3ov -epi3 -e1pr -e3ra -er3af -e4rag -e4rak -e1re -e4ref -er5ege -5erhv -e1ri -e4rib -er1k -ero5d -er5ov -er3s -er5tr -e3rum -er5un -e5ry -e1ta -e1te -etek4s -e1ti -e3tj -e1to -e3tr -e3tu -e1ty -e3um -e3un -3eur -e1va -e3ve -e4v3erf -e1vi -e5x -1fa -fa4ce -fags3 -f1b -f1d -1fe -fej4 -fejl1 -f1f -f1g -f1h -1fi -f1k -3fl -1fo -for1en -fo4ri -f1p -f1s4 -4ft -f3ta -f1te -f1ti -f5to -f5tvi -1fu -f1v -3fy -1ga -g3art -g1b -g1d -1ge -4g5enden -ger3in -ge3s -g3f -g1g -g1h -1gi -gi4b -gi3st -5gj -g3k -g1l -g1m -3go -4g5om -g5ov -g3p -1gr -gs1a -gsde4len -g4se -gsha4 -g5sla -gs3or -gs1p -g5s4tide -g4str -gs1v -g3ta -g1te -g1ti -g5to -g3tr -gt4s -g3ud -gun5 -g3v -1gy -g5yd -4ha. -heds3 -he5s -4het -hi4e -hi4n5 -hi3s -ho5ko -ho5ve -4h3t -hun4 -hund3 -hvo4 -i1a -i3b -i4ble -i1c -i3dr -ids5k -i1el -i1en -i3er -i3et. -if3r -i3gu -i3h -i5i -i5j -i1ka -i1ke -ik1l -i5ko -ik3re -ik5ri -iks5t -ik4tu -i3ku -ik3v -i3lag -il3eg -il5ej -il5el -i3li -i4l5id -il3k -i1lo -il5u -i3mu -ind3t -5inf -ings1 -in3s -in4sv -inter1 -i3nu -i3od -i3og -i5ok -i3ol -ion4 -ions1 -i5o5r -i3ot -i5pi -i3pli -i5pr -i3re -i3ri -ir5t -i3sc -i3si -i4sm -is3p -i1ster -i3sti -i5sua -i1ta -i1te -i1ti -i3to -i3tr -it5re. -i1tu -i3ty -i1u -i1va -i1ve -i1vi -j3ag -jde4rer -jds1 -jek4to -4j5en. -j5k -j3le -j3li -jlmeld5 -jlmel4di -j3r -jre5 -ju3s -5kap -k5au -5kav -k5b -kel5s -ke3sk -ke5st -ke4t5a -k3h -ki3e -ki3st -k1k -k5lak -k1le -3klu -k4ny -5kod -1kon -ko3ra -3kort -ko3v -1kra -5kry -ks3an -k1si -ks3k -ks1p -k3ste -k5stu -ks5v -k1t -k4tar -k4terh -kti4e -kt5re -kt5s -3kur -1kus -3kut -k4vo -k4vu -5lab -lad3r -5lagd -la4g3r -5lam -1lat -l1b -ldiagnos5 -l3dr -ld3st -1le. -5led -4lele -le4mo -3len -1ler -1les -4leu -l1f -lfin4 -lfind5 -l1go1 -l3h -li4ga -4l5ins -4l3int -li5o -l3j -l1ke -l1ko -l3ky -l1l -l5mu -lo4du -l3op -4l5or -3lov -4l3p -l4ps -l3r -4ls -lses1 -ls5in -l5sj -l1ta -l4taf -l1te -l4t5erf -l3ti -lt3o -l3tr -l3tu -lu5l -l3ve -l3vi -1ma -m1b -m3d -1me -4m5ej -m3f -m1g -m3h -1mi -mi3k -m5ing -mi4o -mi5sty -m3k -m1l -m1m -mmen5 -m1n -3mo -mo4da -4mop -4m5ov -m1pe -m3pi -m3pl -m1po -m3pr -m1r -mse5s -ms5in -m5sk -ms3p -m3ste -ms5v -m3ta -m3te -m3ti -m3tr -m1ud -1mul -mu1li -3my -3na -4nak -1nal -n1b -n1c -4nd -n3dr -nd5si -nd5sk -nd5sp -1ne -ne5a -ne4da -nemen4 -nement5e -neo4 -n3erk -n5erl -ne5sl -ne5st -n1f -n4go -4n1h -1ni -4nim -ni5o -ni3st -n1ke -n1ko -n3kr -n3ku -n5kv -4n1l -n1m -n1n -1no -n3ord -n5p -n3r -4ns -n3si -n1sku -ns3po -n1sta -n5sti -n1ta -nta4le -n1te -n1ti -ntiali4 -n3to -n1tr -nt4s5t -nt4su -n3tu -n3ty -4n1v -3ny -n3z -o3a -o4as -ob3li -o1c -o4din -od5ri -od5s -od5un -o1e -of5r -o4gek -o4gel -o4g5o -og5re -og5sk -o5h -o5in -oi6s5e -o1j -o3ka -o1ke -o3ku -o3la -o3le -o1li -o1lo -o3lu -o5ly -1omr -on3k -ook5 -o3or -o5ov -o3pi -op3l -op3r -op3s -3opta -4or. -or1an -3ordn -ord5s -o3re. -o3reg -o3rek -o3rer -o3re3s -o3ret -o3ri -3orient -or5im -o4r5in -or3k -or5o -or3sl -or3st -o3si -o3so -o3t -o1te -o5un -ov4s -3pa -pa5gh -p5anl -p3d -4pec -3pen -1per -pe1ra -pe5s -pe3u -p3f -4p5h -1pla -p4lan -4ple. -4pler -4ples -p3m -p3n -5pok -4po3re -3pot -4p5p4 -p4ro -1proc -p3sk -p5so -ps4p -p3st -p1t -1pu -pu5b -p5ule -p5v -5py3 -qu4 -4raf -ra5is -4rarb -r1b -r4d5ar -r3dr -rd4s3 -4reks -1rel -re5la -r5enss -5rese -re5spo -4ress -re3st -re5s4u -5rett -r1f -r1gu -r1h -ri1e -ri5la -4rimo -r4ing -ringse4 -ringso4r -4rinp -4rint -r3ka -r1ke -r1ki -rk3so -r3ku -r1l -rmo4 -r5mu -r1n -ro1b -ro3p -r3or -r3p -r1r -rre5s -rro4n5 -r1sa -r1si -r5skr -r4sk5v -rs4n -r3sp -r5stu -r5su -r3sv -r5tal -r1te -r4teli -r1ti -r3to -r4t5or -rt5rat -rt3re -r5tri -r5tro -rt3s -r5ty -r3ud -run4da -5rut -r3va -r1ve -r3vi -ry4s -s3af -1sam -sa4ma -s3ap -s1ar -1sat -4s1b -s1d -sdy4 -1se -s4ed -5s4er -se4se -s1f -4s1g4 -4s3h -si4bl -1sig -s5int -5sis -5sit -5siu -s5ju -4sk. -1skab -1ske -s3kl -sk5s4 -5sky -s1le -s1li -slo3 -5slu -s5ly -s1m -s4my -4snin -s4nit -so5k -5sol -5som. -3somm -s5oms -5somt -3son -4s1op -sp4 -3spec -4sper -3s4pi -s1pl -3sprog. -s5r4 -s1s4 -4st. -5s4tam -1stan -st5as -3stat -1stav -1ste. -1sted -3stel -5stemo -1sten -5step -3ster. -3stes -5stet -5stj -3sto -st5om -1str -s1ud -3sul -s3un -3sur -s3ve -3s4y -1sy1s -5ta. -1tag -tands3 -4tanv -4tb -tede4l -teds5 -3teg -5tekn -teo1 -5term -te5ro -4t1f -6t3g -t1h -tialis5t -3tid -ti4en -ti3st -4t3k -4t1l -tli4s5 -t1m -t1n -to5ra -to1re -to1ri -tor4m -4t3p -t4ra -4tres -tro5v -1try -4ts -t3si -ts4pa -ts5pr -t3st -ts5ul -4t1t -t5uds -5tur -t5ve -1typ -u1a -5udl -ud5r -ud3s -3udv -u1e -ue4t5 -uge4ri -ugs3 -u5gu -u3i -u5kl -uk4ta -uk4tr -u1la -u1le -u5ly -u5pe -up5l -u5q -u3ra -u3re -u4r3eg -u1rer -u3ro -us5a -u3si -u5ska -u5so -us5v -u1te -u1ti -u1to -ut5r -ut5s4 -5u5v -va5d -3varm -1ved -ve4l5e -ve4reg -ve3s -5vet -v5h -vi4l3in -1vis -v5j -v5k -vl4 -v3le -v5li -vls1 -1vo -4v5om -v5p -v5re -v3st -v5su -v5t -3vu -y3a -y5dr -y3e -y3ke -y5ki -yk3li -y3ko -yk4s5 -y3kv -y5li -y5lo -y5mu -yns5 -y5o -y1pe -y3pi -y3re -yr3ek -y3ri -y3si -y3ti -y5t3r -y5ve -zi5o - -.sÃ¥3 -.ær5i -.øv3r -a3tø -a5væ -brød3 -5bæ -5drøv -dstÃ¥4 -3dæ -3dø -e3læ -e3lø -e3rø -er5øn -e5tæ -e5tø -e1væ -e3æ -e5Ã¥ -3fæ -3fø -fø4r5en -giø4 -g4sø -g5sÃ¥ -3gæ -3gø1 -3gÃ¥ -i5tæ -i3ø -3kø -3kÃ¥ -lingeniø4 -l3væ -5løs -m5tÃ¥ -1mæ -3mø -3mÃ¥ -n3kæ -n5tæ -3næ -4n5æb -5nø -o5læ -or3ø -o5Ã¥ -5præ -5pæd -pÃ¥3 -r5kæ -r5tæ -r5tø -r3væ -r5æl -4røn -5rør -3rÃ¥d -r5Ã¥r -s4kÃ¥ -3slÃ¥ -s4næ -5stø -1stÃ¥ -1sæ -4s5æn -1sø -s5øk -sÃ¥4r5 -ti4ø -3træk. -t4sø -t5sÃ¥ -t3væ -u3læ -3værd -1værk -5vÃ¥ -y5væ -æb3l -æ3c -æ3e -æg5a -æ4gek -æ4g5r -ægs5 -æ5i -æ5kv -ælle4 -æn1dr -æ5o -æ1re -ær4g5r -æ3ri -ær4ma -ær4mo -ær5s -æ5si -æ3so -æ3ste -æ3ve -øde5 -ø3e -ø1je -ø3ke -ø3le -øms5 -øn3st -øn4t3 -ø1re -ø3ri -ørne3 -ør5o -ø1ve -Ã¥1d -Ã¥1e -Ã¥5h -Ã¥3l -Ã¥3re -Ã¥rs5t -Ã¥5sk -Ã¥3t - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/da_compoundDictionary.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/da_compoundDictionary.txt deleted file mode 100644 index 9a14f40c5f9..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/da_compoundDictionary.txt +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# A set of words for testing the HyphenationCompound factory, -# in conjunction with the danish hyphenation grammar. -læse -hest diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/elevate.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/elevate.xml deleted file mode 100644 index ddf1e9fef32..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/elevate.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/enumsConfig.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/enumsConfig.xml deleted file mode 100644 index 9bfbfc35447..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/enumsConfig.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - Not Available - Low - Medium - High - - x4 - x5 - x6 - x7 - x8 - x9 - x10 - Critical - - x12 - x13 - x14 - x15 - x16 - x17 - x18 - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/foo/bar.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/foo/bar.txt deleted file mode 100644 index a58b94e7fbf..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/foo/bar.txt +++ /dev/null @@ -1 +0,0 @@ -Placeholder file to test replication of subdirs. diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/freeTextSuggest.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/freeTextSuggest.txt deleted file mode 100644 index cbb2c57ce7f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/freeTextSuggest.txt +++ /dev/null @@ -1,2 +0,0 @@ -foo bar baz blah -boo foo bar foo bee \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/frenchArticles.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/frenchArticles.txt deleted file mode 100644 index 914161185f7..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/frenchArticles.txt +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# A set of articles for testing the French Elision filter. -# Requiring a text file is a bit weird here... -l -m -t -qu -n -s -j diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/fuzzysuggest.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/fuzzysuggest.txt deleted file mode 100644 index 94e2152160a..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/fuzzysuggest.txt +++ /dev/null @@ -1,4 +0,0 @@ -# simple fuzzy suggest phrase dictionary for testing -change 1.0 -charge 1.0 -chance 1.0 \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/hunspell-test.aff b/solr/modules/hdfs/src/test-files/solr/collection1/conf/hunspell-test.aff deleted file mode 100644 index d035ad18001..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/hunspell-test.aff +++ /dev/null @@ -1,13 +0,0 @@ -SET UTF-8 -TRY abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ - -SFX A Y 2 -SFX A 0 e n -SFX A 0 e t - -SFX C Y 2 -SFX C 0 d/C c -SFX C 0 c b - -PFX B Y 1 -PFX B 0 s o \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/hunspell-test.dic b/solr/modules/hdfs/src/test-files/solr/collection1/conf/hunspell-test.dic deleted file mode 100644 index 92c35d2b6ab..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/hunspell-test.dic +++ /dev/null @@ -1,6 +0,0 @@ -5 -lucen/A -lucene -mahout/A -olr/B -ab/C \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/hyphenation.dtd b/solr/modules/hdfs/src/test-files/solr/collection1/conf/hyphenation.dtd deleted file mode 100644 index fb3db16cf67..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/hyphenation.dtd +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/jasuggest.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/jasuggest.txt deleted file mode 100644 index 6df149de61a..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/jasuggest.txt +++ /dev/null @@ -1,5 +0,0 @@ -# simple auto-suggest phrase dictionary for testing -# note this uses tabs as separator! -åŒ—æµ·é“ 1.0 -今夜 3.0 -話ã—㟠6.0 \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/keep-1.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/keep-1.txt deleted file mode 100644 index 8dfe80902d2..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/keep-1.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -foo -bar \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/keep-2.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/keep-2.txt deleted file mode 100644 index 646b7ff4ddb..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/keep-2.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -junk -more \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index ede7742581b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,246 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Syntax: -# "source" => "target" -# "source".length() > 0 (source cannot be empty.) -# "target".length() >= 0 (target can be empty.) - -# example: -# "À" => "A" -# "\u00C0" => "A" -# "\u00C0" => "\u0041" -# "ß" => "ss" -# "\t" => " " -# "\n" => "" - -# À => A -"\u00C0" => "A" - -# à => A -"\u00C1" => "A" - -#  => A -"\u00C2" => "A" - -# à => A -"\u00C3" => "A" - -# Ä => A -"\u00C4" => "A" - -# Ã… => A -"\u00C5" => "A" - -# Æ => AE -"\u00C6" => "AE" - -# Ç => C -"\u00C7" => "C" - -# È => E -"\u00C8" => "E" - -# É => E -"\u00C9" => "E" - -# Ê => E -"\u00CA" => "E" - -# Ë => E -"\u00CB" => "E" - -# ÃŒ => I -"\u00CC" => "I" - -# à => I -"\u00CD" => "I" - -# ÃŽ => I -"\u00CE" => "I" - -# à => I -"\u00CF" => "I" - -# IJ => IJ -"\u0132" => "IJ" - -# à => D -"\u00D0" => "D" - -# Ñ => N -"\u00D1" => "N" - -# Ã’ => O -"\u00D2" => "O" - -# Ó => O -"\u00D3" => "O" - -# Ô => O -"\u00D4" => "O" - -# Õ => O -"\u00D5" => "O" - -# Ö => O -"\u00D6" => "O" - -# Ø => O -"\u00D8" => "O" - -# Å’ => OE -"\u0152" => "OE" - -# Þ -"\u00DE" => "TH" - -# Ù => U -"\u00D9" => "U" - -# Ú => U -"\u00DA" => "U" - -# Û => U -"\u00DB" => "U" - -# Ü => U -"\u00DC" => "U" - -# à => Y -"\u00DD" => "Y" - -# Ÿ => Y -"\u0178" => "Y" - -# à => a -"\u00E0" => "a" - -# á => a -"\u00E1" => "a" - -# â => a -"\u00E2" => "a" - -# ã => a -"\u00E3" => "a" - -# ä => a -"\u00E4" => "a" - -# Ã¥ => a -"\u00E5" => "a" - -# æ => ae -"\u00E6" => "ae" - -# ç => c -"\u00E7" => "c" - -# è => e -"\u00E8" => "e" - -# é => e -"\u00E9" => "e" - -# ê => e -"\u00EA" => "e" - -# ë => e -"\u00EB" => "e" - -# ì => i -"\u00EC" => "i" - -# í => i -"\u00ED" => "i" - -# î => i -"\u00EE" => "i" - -# ï => i -"\u00EF" => "i" - -# ij => ij -"\u0133" => "ij" - -# ð => d -"\u00F0" => "d" - -# ñ => n -"\u00F1" => "n" - -# ò => o -"\u00F2" => "o" - -# ó => o -"\u00F3" => "o" - -# ô => o -"\u00F4" => "o" - -# õ => o -"\u00F5" => "o" - -# ö => o -"\u00F6" => "o" - -# ø => o -"\u00F8" => "o" - -# Å“ => oe -"\u0153" => "oe" - -# ß => ss -"\u00DF" => "ss" - -# þ => th -"\u00FE" => "th" - -# ù => u -"\u00F9" => "u" - -# ú => u -"\u00FA" => "u" - -# û => u -"\u00FB" => "u" - -# ü => u -"\u00FC" => "u" - -# ý => y -"\u00FD" => "y" - -# ÿ => y -"\u00FF" => "y" - -# ff => ff -"\uFB00" => "ff" - -# ï¬ => fi -"\uFB01" => "fi" - -# fl => fl -"\uFB02" => "fl" - -# ffi => ffi -"\uFB03" => "ffi" - -# ffl => ffl -"\uFB04" => "ffl" - -# ſt => ft -"\uFB05" => "ft" - -# st => st -"\uFB06" => "st" diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/multiword-synonyms.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/multiword-synonyms.txt deleted file mode 100644 index 15a53e0cf97..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/multiword-synonyms.txt +++ /dev/null @@ -1,15 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -US, U.S., U S, USA, U.S.A., U S A, United States, United States of America -bar, tropical cyclone -chicken, dinner bird \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/old_synonyms.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/old_synonyms.txt deleted file mode 100644 index a7624f0597d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/old_synonyms.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -a => aa -b => b1 b2 -c => c1,c2 -a\=>a => b\=>b -a\,a => b\,b -foo,bar,baz - -Television,TV,Televisions diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/open-exchange-rates.json b/solr/modules/hdfs/src/test-files/solr/collection1/conf/open-exchange-rates.json deleted file mode 100644 index 6b40ac42d64..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/open-exchange-rates.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "disclaimer": "This data is not real, it was synthetically created to match currency.xml. It is modeled after the data format available from openexchangerates.org. See https://openexchangerates.org/documentation for details - - - IMPORTANT NOTE: In order for tests to work, this data must be kept in sync with ./currency.xml", - - - "license": "http://www.apache.org/licenses/LICENSE-2.0", - "timestamp": 1332070464, - "base": "USD", - "rates": { - "USD": 1, - "JPY": 81.29, - "EUR": 2.5, - "GBP": 0.5, - "MXN": 2.0 - } -} diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/phrasesuggest.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/phrasesuggest.txt deleted file mode 100644 index fd4984d70b8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/phrasesuggest.txt +++ /dev/null @@ -1,8 +0,0 @@ -# simple auto-suggest phrase dictionary for testing -# note this uses tabs as separator! -the first phrase 1.0 -the second phrase 2.0 -testing 1234 3.0 -foo 5.0 -the fifth phrase 2.0 -the final phrase 4.0 diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/protected-1.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/protected-1.txt deleted file mode 100644 index 61c0583b579..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/protected-1.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -foobar -jaxfopbuz diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/protected-2.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/protected-2.txt deleted file mode 100644 index d9a5c3c7d26..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/protected-2.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -golden -compote diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/protwords.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/protwords.txt deleted file mode 100644 index ab7e3e2470e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/protwords.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#use a protected word file to avoid stemming two -#unrelated words to the same base word. -#to test, we will use words that would normally obviously be stemmed. -cats -ridding -c# -c++ -.net diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/regex-boost-processor-test.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/regex-boost-processor-test.txt deleted file mode 100644 index 1dc0537c72b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/regex-boost-processor-test.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Sample config file for RegexBoostProcessor -# This example applies boost on the "url" field to boost or deboost certain urls -# All rules are evaluated, and if several of them match, the boosts are multiplied. -# If for example one rule with boost 2.0 and one rule with boost 0.1 match, the resulting urlboost=0.2 - -https?://[^/]+/old/.* 0.1 #Comments are removed -https?://[^/]+/.*index\([0-9]\).html$ 0.5 - -# Prioritize certain sites over others -https?://www.mydomain.no/.* 1.5 \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml deleted file mode 100644 index 6ea70f30e15..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-SimpleTextCodec.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-SimpleTextCodec.xml deleted file mode 100644 index 528de731e3f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-SimpleTextCodec.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-add-schema-fields-update-processor.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-add-schema-fields-update-processor.xml deleted file mode 100644 index 654628738d8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-add-schema-fields-update-processor.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-analyzer-by-name.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-analyzer-by-name.xml deleted file mode 100644 index b5704253a00..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-analyzer-by-name.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-behavior.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-behavior.xml deleted file mode 100644 index 663de185faa..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-behavior.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-binaryfield.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-binaryfield.xml deleted file mode 100644 index f0f216b2b12..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-binaryfield.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - id - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml deleted file mode 100644 index a9c2a6a1ecb..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-bm25.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - 1.2 - 0.76 - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-booleansimilarity.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-booleansimilarity.xml deleted file mode 100644 index 3f7a2c18b27..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-booleansimilarity.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - id - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-charfilters.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-charfilters.xml deleted file mode 100644 index 1adb7aaf7e8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-charfilters.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-class-name-shortening-on-serialization.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-class-name-shortening-on-serialization.xml deleted file mode 100644 index 55f12136a66..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-class-name-shortening-on-serialization.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-classification.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-classification.xml deleted file mode 100644 index 89c27a6766a..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-classification.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-collate-dv.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-collate-dv.xml deleted file mode 100644 index 0a2953d590c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-collate-dv.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-collate.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-collate.xml deleted file mode 100644 index bfe65b157e1..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-collate.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-copyfield-test.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-copyfield-test.xml deleted file mode 100644 index 20dc97adb19..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-copyfield-test.xml +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-custom-field.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-custom-field.xml deleted file mode 100644 index c8e89a127a0..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-custom-field.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-customfield.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-customfield.xml deleted file mode 100644 index 44cea6351b7..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-customfield.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-deprecations.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-deprecations.xml deleted file mode 100644 index 95747544220..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-deprecations.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-dfi.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-dfi.xml deleted file mode 100644 index 184f142ac52..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-dfi.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - ChiSquared - - - - - - - - ChiSquared - false - - - - - - - - - id - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-dfr.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-dfr.xml deleted file mode 100644 index 78c3b7ff958..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-dfr.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - I(F) - B - H2 - - - - - - - - I(F) - B - H3 - 900 - - - - - - - - G - L - H2 - 7 - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml deleted file mode 100644 index 7be9b80300e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-distrib-interval-faceting.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-distributed-missing-sort.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-distributed-missing-sort.xml deleted file mode 100644 index 21874498e20..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-distributed-missing-sort.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValues.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValues.xml deleted file mode 100644 index 4a5ab17843e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValues.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml deleted file mode 100644 index a18f230d3ce..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesFaceting.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesJoin.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesJoin.xml deleted file mode 100644 index 844a472f091..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesJoin.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMissing.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMissing.xml deleted file mode 100644 index d80a426d23c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMissing.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMulti.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMulti.xml deleted file mode 100644 index eb841890e16..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-docValuesMulti.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-eff.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-eff.xml deleted file mode 100644 index d68a3da9021..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-eff.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - id - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-enums.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-enums.xml deleted file mode 100644 index 2443da4e125..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-enums.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-field-sort-values.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-field-sort-values.xml deleted file mode 100644 index e6428af2eaa..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-field-sort-values.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-folding.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-folding.xml deleted file mode 100644 index 0b13a570c10..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-folding.xml +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml deleted file mode 100644 index e5dbd74fe51..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-hash.xml +++ /dev/null @@ -1,586 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-ib.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-ib.xml deleted file mode 100644 index 7e66bb526bf..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-ib.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - SPL - DF - H2 - - - - - - - - LL - TTF - H3 - 900 - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-id-and-version-fields-only.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-id-and-version-fields-only.xml deleted file mode 100644 index be38c04741a..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-id-and-version-fields-only.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-inplace-required-field.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-inplace-required-field.xml deleted file mode 100644 index 6782cb55a82..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-inplace-required-field.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - id - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-inplace-updates.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-inplace-updates.xml deleted file mode 100644 index df9b2379fd4..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-inplace-updates.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-lmdirichlet.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-lmdirichlet.xml deleted file mode 100644 index 3c250988054..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-lmdirichlet.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - 1000 - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-lmjelinekmercer.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-lmjelinekmercer.xml deleted file mode 100644 index a90fd6552fd..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-lmjelinekmercer.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - 0.4 - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-luceneMatchVersion.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-luceneMatchVersion.xml deleted file mode 100644 index 832aa504988..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-luceneMatchVersion.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml deleted file mode 100644 index 9465e83dfe4..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minhash.xml +++ /dev/null @@ -1,602 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal-atomic-stress.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal-atomic-stress.xml deleted file mode 100644 index 39f0d581060..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal-atomic-stress.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - id - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal-with-another-uniqkey.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal-with-another-uniqkey.xml deleted file mode 100644 index 2087a1daae0..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal-with-another-uniqkey.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - notid - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal.xml deleted file mode 100644 index 287d4fe0149..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-minimal.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-multiword-synonyms.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-multiword-synonyms.xml deleted file mode 100644 index c7ebb36487c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-multiword-synonyms.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-nest.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-nest.xml deleted file mode 100644 index 537009a0431..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-nest.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-non-stored-docvalues.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-non-stored-docvalues.xml deleted file mode 100644 index 6477bd52754..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-non-stored-docvalues.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-not-required-unique-key.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-not-required-unique-key.xml deleted file mode 100644 index 484e29608af..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-not-required-unique-key.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-null-charfilters-analyzer.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-null-charfilters-analyzer.xml deleted file mode 100644 index 1ad96ca958a..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-null-charfilters-analyzer.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-numeric.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-numeric.xml deleted file mode 100644 index a343cf8376b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-numeric.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field-unique-key.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field-unique-key.xml deleted file mode 100644 index 49a587aef72..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field-unique-key.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - str - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field.xml deleted file mode 100644 index 8a22324f3d5..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-one-field-no-dynamic-field.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-phrases-identification.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-phrases-identification.xml deleted file mode 100644 index ab38f9fee3b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-phrases-identification.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml deleted file mode 100644 index 7059cd399b4..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-point.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-point.xml deleted file mode 100644 index c933d130456..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-point.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-postingshighlight.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-postingshighlight.xml deleted file mode 100644 index e68ba0f117b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-postingshighlight.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-preanalyzed.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-preanalyzed.xml deleted file mode 100644 index 7de08d62e96..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-preanalyzed.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-protected-term.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-protected-term.xml deleted file mode 100644 index 229439444b3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-protected-term.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-pseudo-fields.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-pseudo-fields.xml deleted file mode 100644 index 17cbececca8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-pseudo-fields.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rank-fields.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rank-fields.xml deleted file mode 100644 index 2da0c0de62f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rank-fields.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-replication1.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-replication1.xml deleted file mode 100644 index 1a4e32e2645..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-replication1.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-replication2.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-replication2.xml deleted file mode 100644 index 8b831272719..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-replication2.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-required-fields.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-required-fields.xml deleted file mode 100644 index 0ac0c0463ab..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-required-fields.xml +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rest-lucene-match-version.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rest-lucene-match-version.xml deleted file mode 100644 index 23c418c478b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rest-lucene-match-version.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml deleted file mode 100644 index 66249e1cb50..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-rest.xml +++ /dev/null @@ -1,732 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-reversed.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-reversed.xml deleted file mode 100644 index bb9f981beed..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-reversed.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-root.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-root.xml deleted file mode 100644 index aef3c9767fb..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-root.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sim-default-override.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sim-default-override.xml deleted file mode 100644 index 276432441bb..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sim-default-override.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - sim-used-as-default-override - - - - - - - - - - - - - - - - - - is there an echo? - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sim.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sim.xml deleted file mode 100644 index b9415711df6..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sim.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - is there an echo? - - - - - - - - - - - - - - - - - - - - - id - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-simpleqpplugin.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-simpleqpplugin.xml deleted file mode 100644 index 0ed7e10f6e0..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-simpleqpplugin.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-field.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-field.xml deleted file mode 100644 index 9e0d29f3e20..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-field.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-type.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-type.xml deleted file mode 100644 index bfbd3334204..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-type.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-types.incl b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-types.incl deleted file mode 100644 index fe9fd6d7a7b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-snippet-types.incl +++ /dev/null @@ -1,19 +0,0 @@ - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sorting-text.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sorting-text.xml deleted file mode 100644 index cf526b765b2..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sorting-text.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sortingresponse.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sortingresponse.xml deleted file mode 100644 index 9fb224b34a3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sortingresponse.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sorts.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sorts.xml deleted file mode 100644 index 70edcb221c2..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sorts.xml +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml deleted file mode 100644 index ffb473b7dc3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-spatial.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml deleted file mode 100644 index d5286ab72f9..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-spellchecker.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sql.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sql.xml deleted file mode 100644 index 7b5e2ae9e6d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sql.xml +++ /dev/null @@ -1,622 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sweetspot.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sweetspot.xml deleted file mode 100644 index 080faabfacc..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-sweetspot.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - 6.0 - 1.5 - - 3 - 5 - 0.5 - - - - - - - - 3.3 - 7.7 - 2.718281828459045 - 5.0 - - 1 - 5 - 0.2 - - - - - - - - - id - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-synonym-tokenizer.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-synonym-tokenizer.xml deleted file mode 100644 index 8ab64afdbb3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-synonym-tokenizer.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tagger.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tagger.xml deleted file mode 100644 index 051cd10c7a5..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tagger.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tfidf.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tfidf.xml deleted file mode 100644 index df05e82d15b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tfidf.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - false - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tiny.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tiny.xml deleted file mode 100644 index 555ee3571b7..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tiny.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - id - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tokenizer-test.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tokenizer-test.xml deleted file mode 100644 index 5613c66be2f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-tokenizer-test.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml deleted file mode 100644 index f42afb34710..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-trie.xml +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-unifiedhighlight.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-unifiedhighlight.xml deleted file mode 100644 index 90b7c524710..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-unifiedhighlight.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-version-dv.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-version-dv.xml deleted file mode 100644 index 375311a9b69..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-version-dv.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - id - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-version-indexed.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-version-indexed.xml deleted file mode 100644 index 4523d507ece..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-version-indexed.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - id - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-xinclude.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-xinclude.xml deleted file mode 100644 index 39767ea907e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema-xinclude.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - ]> - - - - - &schema_entity_include; - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema.xml deleted file mode 100644 index d6b14bbfcaf..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema.xml +++ /dev/null @@ -1,912 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I am your default sim - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema11.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema11.xml deleted file mode 100644 index 7ec301503ad..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema11.xml +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema12.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema12.xml deleted file mode 100644 index 5e67304be3e..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema12.xml +++ /dev/null @@ -1,794 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema15.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema15.xml deleted file mode 100644 index c5b90a007f1..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema15.xml +++ /dev/null @@ -1,635 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_codec.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_codec.xml deleted file mode 100644 index 6f2f04a2003..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_codec.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string_f - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml deleted file mode 100644 index 746b530ed7f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_latest.xml +++ /dev/null @@ -1,735 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_postingsformat.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_postingsformat.xml deleted file mode 100644 index 7d452a59d17..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schema_postingsformat.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml deleted file mode 100644 index 95045bedfe9..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/schemasurround.xml +++ /dev/null @@ -1,592 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml deleted file mode 100644 index 9c2411bde33..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-add-schema-fields-update-processor-chains.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-add-schema-fields-update-processor-chains.xml deleted file mode 100644 index 46ce9ad9a65..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-add-schema-fields-update-processor-chains.xml +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - true - managed-schema - - - - - text - - java.lang.Boolean - boolean - - - java.lang.Integer - pints - - - java.lang.Float - pfloats - - - java.util.Date - pdates - - - java.lang.Long - java.lang.Integer - plongs - - - - java.lang.Double - java.lang.Float - - pdoubles - - - - - - - text - - java.lang.String - text - - *_str - - - - java.lang.Boolean - boolean - - - java.lang.Integer - pints - - - java.lang.Float - pfloats - - - java.util.Date - pdates - - - java.lang.Long - java.lang.Integer - plongs - - - java.lang.Number - pdoubles - - - - - - - - text - - java.lang.String - text - - *_str - 10 - - - *_t - 20 - - - *2_t - 20 - - - - - - - - - - - - - java.lang.String - text - - *_str - 10 - - - true - - - java.lang.Boolean - boolean - - - java.lang.Integer - pints - - - java.lang.Float - pfloats - - - java.util.Date - pdates - - - java.lang.Long - java.lang.Integer - plongs - - - java.lang.Number - pdoubles - - - - - - - - - - - - - - yyyy-MM-dd['T'[HH:mm[:ss[.SSS]][z - yyyy-MM-dd['T'[HH:mm[:ss[,SSS]][z - yyyy-MM-dd HH:mm[:ss[.SSS]][z - yyyy-MM-dd HH:mm[:ss[,SSS]][z - [EEE, ]dd MMM yyyy HH:mm[:ss] z - EEEE, dd-MMM-yy HH:mm:ss z - EEE MMM ppd HH:mm:ss [z ]yyyy - - - - text - - java.lang.Boolean - boolean - - - java.lang.Integer - pints - - - java.lang.Float - pfloats - - - java.util.Date - pdates - - - java.lang.Long - java.lang.Integer - plongs - - - java.lang.Number - pdoubles - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml deleted file mode 100644 index 0c62584957c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml deleted file mode 100644 index ba195778369..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - - ${solr.data.dir:} - - - - 1000000 - 2000000 - 3000000 - 4000000 - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - ${solr.ulog.dir:} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - ${solr.max.booleanClauses:1024} - - - - - - - - - - - - true - - - - - - 10 - - - - - - - - - - - - - - - - - - true - - - - - - - - 100 - - - - - - 70 - - - - - - - ]]> - ]]> - - - - - - - - - - - - - 10 - .,!? - - - - - - WORD - en - US - - - - - - - - - max-age=30, public - - - - - prefix-${solr.test.sys.prop2}-suffix - - - - - - - uniq - uniq2 - uniq3 - - - - - - - - - regex_dup_A_s - x - x_x - - - - regex_dup_B_s - x - x_x - - - - - - - - regex_dup_A_s - x - x_x - - - regex_dup_B_s - x - x_x - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-basic.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-basic.xml deleted file mode 100644 index d98ecacf454..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-basic.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml deleted file mode 100644 index d51f8050c56..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-cache-enable-disable.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - ${solr.max.booleanClauses:1024} - - - - - - - - - - - - - - - true - - 10 - - - - - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-classification.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-classification.xml deleted file mode 100644 index 3370600574d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-classification.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - ${solr.ulog.dir:} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - title,content,author - cat - - knn - 1 - 1 - 5 - cat:(class1 OR class2) - - - - - - - title,content,author - cat - - knn - 1 - 1 - 5 - not valid ( lucene query - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml deleted file mode 100644 index d896666f185..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - ${solr.data.dir:} - - - - 1000000 - 2000000 - 3000000 - 4000000 - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - ${solr.ulog.dir:} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - ${solr.max.booleanClauses:1024} - - - - - - - - - - - - true - - - - - - 10 - - - - - - - - - - - - - - - - - - true - - - - - a_s - - - direct - DirectSolrSpellChecker - a_s - 3 - - - - - - - - - direct - false - false - 1 - - - spellcheck - - - - - - string - elevate.xml - - - - - - explicit - - - elevate - - - - - - - max-age=30, public - - - - - prefix-${solr.test.sys.prop2}-suffix - - - - - - - uniq - uniq2 - uniq3 - - - - - - - - - regex_dup_A_s - x - x_x - - - - regex_dup_B_s - x - x_x - - - - - - - - regex_dup_A_s - x - x_x - - - regex_dup_B_s - x - x_x - - - - - - - text - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml deleted file mode 100644 index 870596afe3b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-components-name.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - ${solr.data.dir:} - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - true - - component1 - - - component2 - - - - - - - max-age=30, public - - - - - foo - - - bar - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-concurrentmergescheduler.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-concurrentmergescheduler.xml deleted file mode 100644 index 140c4cfeedc..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-concurrentmergescheduler.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - ${useCompoundFile:false} - - - 987 - 42 - false - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-configurerecoverystrategy.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-configurerecoverystrategy.xml deleted file mode 100644 index d86a6de1012..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-configurerecoverystrategy.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - 250 - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-customrecoverystrategy.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-customrecoverystrategy.xml deleted file mode 100644 index 4e8effab96d..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-customrecoverystrategy.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - recovery_base_url - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-dedup-overwrites.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-dedup-overwrites.xml deleted file mode 100644 index 74b19f46a3f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-dedup-overwrites.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - true - v_t,t_field - org.apache.solr.update.processor.TextProfileSignature - - - - - - - false - id - - org.apache.solr.update.processor.Lookup3Signature - - - - - - - non_indexed_signature_sS - false - v_t,t_field - org.apache.solr.update.processor.TextProfileSignature - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - ${solr.commitwithin.softcommit:true} - - - - - - - - text - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-deeppaging.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-deeppaging.xml deleted file mode 100644 index d4b501736fe..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-deeppaging.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - ${solr.data.dir:} - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - delayingSearchComponent - - - - - - ${solr.ulog.dir:} - - - - - - - - - 50 - 500 - - ${solr.test.useFilterForSortedQuery} - - - - - - - - str - elevate.xml - - - - elevate - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-defaults.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-defaults.xml deleted file mode 100644 index 77bcba7ece7..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-defaults.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml deleted file mode 100644 index fcb0140fb80..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - - delayingSearchComponent - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml deleted file mode 100644 index 424783beef5..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - ${useCompoundFile:false} - - ${solr.tests.maxBufferedDocs} - ${solr.tests.ramBufferSizeMB} - - - - single - - - - true - 3 - 100MILLISECONDS - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml deleted file mode 100644 index bb4d3f85ba0..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - ${useCompoundFile:false} - - ${solr.tests.maxBufferedDocs} - ${solr.tests.ramBufferSizeMB} - - - - single - - - value1 - value2 - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-distrib-update-processor-chains.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-distrib-update-processor-chains.xml deleted file mode 100644 index b23a7dc9ff6..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-distrib-update-processor-chains.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${solr.hdfs.blockcache.enabled:true} - ${solr.hdfs.blockcache.blocksperbank:1024} - ${solr.hdfs.home:} - ${solr.hdfs.confdir:} - ${solr.hdfs.blockcache.global:false} - - - ${solr.data.dir:} - - - - - - - - - - - - - - true - - - - - - - - - - ${solr.ulog.dir:} - - - - - - - 10 - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-doc-expire-update-processor.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-doc-expire-update-processor.xml deleted file mode 100644 index 18d16a36d17..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-doc-expire-update-processor.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - ${solr.ulog.dir:} - - - - - - - - _expire_at_tdt - - - - - - _ttl_field_ - - _expire_at_tdt - - - _ttl_field_ - - - - - - _ttl_param_ - - _expire_at_tdt - - - - - - _ttl_field_ - _ttl_param_ - _expire_at_tdt - - - _ttl_field_ - - - - - - - - 3 - eXpField_tdt - tTl_s - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml deleted file mode 100644 index 8511e8918f8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-doctransformers.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - ${useCompoundFile:false} - - ${solr.data.dir:} - - - - - - ${solr.data.dir:} - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml deleted file mode 100644 index 4f40711a839..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-elevate.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - ${solr.data.dir:} - - - - - - - - - - - - - - - - ${solr.max.booleanClauses:1024} - - - - - - - - - - true - - 10 - - - - - - - - - text - ${elevate.file:elevate.xml} - - - - - - - - explicit - - - elevate - - - - - - - - - max-age=30, public - - - - - prefix-${solr.test.sys.prop2}-suffix - - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml deleted file mode 100644 index 0e785ce0adc..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${solr.hdfs.blockcache.enabled:true} - ${solr.hdfs.blockcache.blocksperbank:1024} - ${solr.hdfs.home:} - ${solr.hdfs.confdir:} - - - - ${solr.data.dir:} - - - - - - ${solr.ulog.dir:} - - - - - - - - - - live_b - true - - - - - true - my_version_l - del_version - - - - - live_b - false - - - - timestamp_tdt - - - - - - - - - true - my_version_f - del_version - - - - - - - - my_version_l - del_version - - - - - - - - my_version_l,my_version_f - del_version,del_version_2 - - - - - - - - - - - - - - - - - - - true - my_version_l - del_version - true - - - - - - - - - my_version_l - del_version - - true - 1 - 1 - 1.5 - bar - bar1 - bar2 - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower.xml deleted file mode 100644 index 217d56898b3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - ${solr.data.dir:} - - - - - - - - true - - - - - - - - - - - - - - http://127.0.0.1:TEST_PORT/solr/collection1 - 00:00:01 - COMPRESSION - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower1.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower1.xml deleted file mode 100644 index 26821b4e578..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-follower1.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - - true - - - - - - - - - - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml deleted file mode 100644 index ef0c39ae8e4..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - - - - - 0.0 - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml deleted file mode 100644 index 9c2e9f35820..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-hash.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - ${useCompoundFile:false} - - ${solr.data.dir:} - - - - - - ${solr.data.dir:} - - - - - - - - json - false - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-headers.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-headers.xml deleted file mode 100644 index 328fc9bd56a..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-headers.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - componentThatAddsHeader - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-highlight.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-highlight.xml deleted file mode 100644 index c714a4148d7..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-highlight.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - - - - - - - 100 - - - - - - 70 - - - - - - - ]]> - ]]> - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml deleted file mode 100644 index b9a72c5634a..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - LUCENE_4_1 - - ${solr.data.dir:} - - - - - - - - - - - - true - 20 - 20 - - true - - 1 - - - - - - - - - - all - text - ${solr.core.name} - ${solr.core.dataDir} - ${solr.core.config} - ${solr.core.schema} - ${solr.core.transient} - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexconfig-mergepolicyfactory.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexconfig-mergepolicyfactory.xml deleted file mode 100644 index efdd7ff4d11..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexconfig-mergepolicyfactory.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - ${solr.data.dir:} - - ${tests.luceneMatchVersion:LATEST} - - - ${useCompoundFile:false} - true - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexmetrics.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexmetrics.xml deleted file mode 100644 index 6238e7db021..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-indexmetrics.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${solr.tests.metrics.merge:false} - ${solr.tests.metrics.mergeDetails:false} - - - 100 - - - - 3 - 3 - - - - - - ${solr.commitwithin.softcommit:true} - - - - - - explicit - true - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-infixsuggesters.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-infixsuggesters.xml deleted file mode 100644 index a30186d9eed..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-infixsuggesters.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - - shortRandomAnalyzingInfixSuggester - AnalyzingInfixLookupFactory - RandomTestDictionaryFactory - 100 - short_random_analyzing_infix_suggester - text - false - false - - - - - true - - - analyzing_infix_suggester_random_short_dictionary - - - - - - longRandomAnalyzingInfixSuggester - AnalyzingInfixLookupFactory - RandomTestDictionaryFactory - 100000 - long_random_analyzing_infix_suggester - text - false - false - - - - - true - - - analyzing_infix_suggester_random_long_dictionary - - - - - - shortRandomBlendedInfixSuggester - BlendedInfixLookupFactory - RandomTestDictionaryFactory - 100 - position_linear - text - short_random_blended_infix_suggester - true - false - false - - - - - true - shortRandomBlendedInfixSuggester - true - 10 - true - - - blended_infix_suggester_random_short_dictionary - - - - false - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml deleted file mode 100644 index 2581d7e9141..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - ${solr.data.dir:} - - ${tests.luceneMatchVersion:LATEST} - - - true - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader-throttled.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader-throttled.xml deleted file mode 100644 index 1a37f3f4339..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader-throttled.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - - true - - - - - 0.05 - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader.xml deleted file mode 100644 index 3893a944a96..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - ${solr.data.dir:} - - - - - - - - true - - - - - commit - - schema.xml,foo/bar.txt - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1-keepOneBackup.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1-keepOneBackup.xml deleted file mode 100644 index 101ba30f351..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1-keepOneBackup.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - - - - - commit - schema-replication2.xml:schema.xml - commit - - 1 - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1.xml deleted file mode 100644 index 0c3eb860fe3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader1.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - - true - - - - - commit - commit - schema-replication2.xml:schema.xml - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader2.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader2.xml deleted file mode 100644 index 5eca4621bfd..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader2.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - true - - - - - startup - schema.xml - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader3.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader3.xml deleted file mode 100644 index 5d97350e558..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-leader3.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - true - - - - - commit - startup - schema.xml - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-logmergepolicyfactory.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-logmergepolicyfactory.xml deleted file mode 100644 index 539fd5c4d5c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-logmergepolicyfactory.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - -1 - -1 - - - 11 - 456 - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema-test.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema-test.xml deleted file mode 100644 index 666132f8e74..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema-test.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml deleted file mode 100644 index e00b0c10de8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - ${managed.schema.mutable} - ${managed.schema.resourceName:managed-schema.xml} - - - - - - - - - - - - - - - - - ${enableLazyFieldLoading:false} - - - - - ${solr.ulog.dir:} - - - - - true - - - - - - ${my.custom.variable.a:A} - ${my.custom.variable.b:B} - - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-memory-circuitbreaker.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-memory-circuitbreaker.xml deleted file mode 100644 index 6ab9f893022..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-memory-circuitbreaker.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - ${solr.max.booleanClauses:1024} - - - - - - - - - - - - - - - true - - 10 - - - - - - - - true - 75 - true - 75 - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-defaults.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-defaults.xml deleted file mode 100644 index 3e0cf1927b6..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-defaults.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml deleted file mode 100644 index b67d6645f31..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - ${useCompoundFile:false} - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicyfactory-nocfs.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicyfactory-nocfs.xml deleted file mode 100644 index b93fabd7c3a..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-mergepolicyfactory-nocfs.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - ${testSetNoCFSMergePolicyConfig.useCompoundFile:false} - - 0.5 - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-minhash.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-minhash.xml deleted file mode 100644 index fd90b8d8917..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-minhash.xml +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - - - ${solr.data.dir:} - - - - 1000000 - 2000000 - 3000000 - 4000000 - ${solr.hdfs.home:} - ${solr.hdfs.blockcache.enabled:true} - ${solr.hdfs.blockcache.global:true} - ${solr.hdfs.blockcache.write.enabled:false} - ${solr.hdfs.blockcache.blocksperbank:10} - ${solr.hdfs.blockcache.slab.count:1} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - ${solr.autoCommit.maxTime:-1} - - - - - - ${solr.ulog.dir:} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - ${solr.max.booleanClauses:1024} - - - - - - - - - - - - true - - - - - - 10 - - - - - - - - - - - - 2000 - - - - - - - - true - - - - - dismax - *:* - 0.01 - - text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0 - - - text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5 - - - weight^0.5 recip(rord(id),1,1000,1000)^0.3 - - - 3<-1 5<-2 6<90% - - 100 - - - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - - lowerpunctfilt - - - default - lowerfilt - spellchecker1 - false - - - direct - DirectSolrSpellChecker - lowerfilt - 3 - - - wordbreak - solr.WordBreakSolrSpellChecker - lowerfilt - true - true - 10 - - - multipleFields - lowerfilt1and2 - spellcheckerMultipleFields - false - - - - jarowinkler - lowerfilt - - org.apache.lucene.search.spell.JaroWinklerDistance - spellchecker2 - - - - solr.FileBasedSpellChecker - external - spellings.txt - UTF-8 - spellchecker3 - - - - freq - lowerfilt - spellcheckerFreq - - freq - false - - - fqcn - lowerfilt - spellcheckerFQCN - org.apache.solr.spelling.SampleComparator - false - - - perDict - org.apache.solr.handler.component.DummyCustomParamSpellChecker - lowerfilt - - - - - - - - - - false - - false - - 1 - - - spellcheck - - - - - direct - false - false - 1 - - - spellcheck - - - - - default - wordbreak - 20 - - - spellcheck - - - - - direct - wordbreak - 20 - - - spellcheck - - - - - dismax - lowerfilt1^1 - - - spellcheck - - - - - - - - - - - - - - - tvComponent - - - - - - - - - - - - 100 - - - - - - 70 - - - - - - - ]]> - ]]> - - - - - - - - - - - - - 10 - .,!? - - - - - - WORD - en - US - - - - - - - - - max-age=30, public - - - - - - foo_s - - - foo_s:bar - - - - - foo_s - foo_s:bar - - - - - prefix-${solr.test.sys.prop2}-suffix - - - - - - - uniq - uniq2 - uniq3 - - - - - - - - - regex_dup_A_s - x - x_x - - - - regex_dup_B_s - x - x_x - - - - - - - - regex_dup_A_s - x - x_x - - - regex_dup_B_s - x - x_x - - - - - - - org.apache.solr.rest.ManagedResourceStorage$InMemoryStorageIO - - - - - - text - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-minimal.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-minimal.xml deleted file mode 100644 index aedb68305ab..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-minimal.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - ${solr.commitwithin.softcommit:true} - - - - - - explicit - true - text - - - - - - - text - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-nocache.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-nocache.xml deleted file mode 100644 index 137c519bdc4..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-nocache.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - ${solr.data.dir:} - - - - - - - - - - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml deleted file mode 100644 index 62fb05b03c4..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - ${useCompoundFile:false} - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-noopregen.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-noopregen.xml deleted file mode 100644 index e2a20a3379c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-noopregen.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-paramset.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-paramset.xml deleted file mode 100644 index a9e71f63ebc..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-paramset.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - A - - - B - - - C - - - - - P - - - - - - - - - - - A1 - - - B1 - - - C1 - - - - - - /some/path - /some/other/path - - - - - - text - - - - - - explicit - - - elevator - - - - - - server-enabled.txt - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-parsing-update-processor-chains.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-parsing-update-processor-chains.xml deleted file mode 100644 index 43f2d285a9f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-parsing-update-processor-chains.xml +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - yyyy-MM-dd'T'HH:mm:ss.SSSz - - - - - - - yyyy-MM-dd'T'HH:mm:ss.SSSz - - - - - - false - yyyy-MM-dd'T'HH:mm:ss.SSSz - - - - - - solr.DatePointField - yyyy-MM-dd'T'HH:mm:ss.SSSz - - - - - - solr.TrieDateField - yyyy-MM-dd'T'HH:mm:ss.SSSz - - - - - - America/New_York - yyyy-MM-dd'T'HH:mm:ss.SSS[z] - - - - - - - America/Los_Angeles - - M/d/yyyy - - - - - - - - yyyy-MM-dd'T'HH:mm[:ss[.SSS]][z - yyyy-MM-dd'T'HH:mm[:ss[,SSS]][z - yyyy-MM-dd HH:mm[:ss[.SSS]][z - yyyy-MM-dd HH:mm[:ss[,SSS]][z - yyyy-MM-dd - yyyy-MM-dd hh:mm[ ]a - EEE MMM dd HH:mm:ss ZZZ yyyy - EEE MMM dd HH:mm:ss yyyy[ z] - EEE, dd MMM yyyy HH:mm:ss z - EEEE, dd-MMM-yy HH:mm:ss z - EEEE, MMMM dd, yyyy - MMMM dd, yyyy - MMM. dd, yyyy - - - - - - - UTC - fr - 'le' EEEE dd MMMM yyyy - - - - - - - yyyy-MM-dd['T'[HH:mm[:ss[.SSS]][z - yyyy-MM-dd['T'[HH:mm[:ss[,SSS]][z - yyyy-MM-dd HH:mm[:ss[.SSS]][z - yyyy-MM-dd HH:mm[:ss[,SSS]][z - [EEE, ]dd MMM yyyy HH:mm[:ss] z - EEEE, dd-MMM-yy HH:mm:ss z - EEE MMM ppd HH:mm:ss [z ]yyyy - - - - - - - - - - - - - - - - - ru_RU - - - - - - - - - - - - - - - ru_RU - - - - - - - - - - - - - - - fr_FR - - - - - - - - - - - - - - - fr_FR - - - - - - - - - - - - - - - false - - true - YES - on - - - false - no - oFF - - - - - - - yup - nope - - - - - - - - - - - - - - - - yyyy-MM-dd - yyyy-MM-dd'T'HH:mm:ss.SSSz - yyyy-MM-dd'T'HH:mm - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrases-identification.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrases-identification.xml deleted file mode 100644 index 65ccd5e0965..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrases-identification.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - phrases - - - explicit - true - body - multigrams_body multigrams_title^2 - - - - - - - phrases - - - explicit - true - true - multigrams_body multigrams_title^2 - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml deleted file mode 100644 index 0f79d7c4572..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml +++ /dev/null @@ -1,468 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - ${solr.data.dir:} - - - - - - - - suggest_wfst - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.WFSTLookupFactory - suggest_wfst - false - - - true - - phrasesuggest.txt - - - - phrase_suggest - - - - - - suggest_analyzing - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.AnalyzingLookupFactory - suggest_analyzing - false - - - true - ja_suggest - false - - jasuggest.txt - - - - phrase_suggest - - - - - - infix_suggest_analyzing - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory - false - - - text - - analyzingInfixSuggest.txt - - - - phrase_suggest - - - - - - - analyzing_infix_suggest_default - AnalyzingInfixLookupFactory - FileDictionaryFactory - false - analyzing_infix_suggest_default - analyzingInfixSuggest.txt - text - - - - analyzing_infix_suggest_without_highlight - AnalyzingInfixLookupFactory - FileDictionaryFactory - false - analyzing_infix_suggest_without_highlight - analyzingInfixSuggest.txt - text - false - - - - analyzing_infix_suggest_not_all_terms_required - AnalyzingInfixLookupFactory - FileDictionaryFactory - false - analyzing_infix_suggest_not_all_terms_required - analyzingInfixSuggest.txt - text - false - - - - - - - - fuzzy_suggest_analyzing_with_high_freq_dict - org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory - org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory - fuzzy_suggest_analyzing - false - - - true - text - false - stext - - - - - - - free_text_suggest - FreeTextLookupFactory - FileDictionaryFactory - free_text_suggest - false - freeTextSuggest.txt - - - - text - 2 - - - - - - - blended_infix_suggest_linear - BlendedInfixLookupFactory - FileDictionaryFactory - false - blendedInfixSuggest.txt - blendedInfixDir1 - - - - position_linear - text - - - - blended_infix_suggest_reciprocal - BlendedInfixLookupFactory - FileDictionaryFactory - false - blendedInfixSuggest.txt - blendedInfixDir2 - - - - position_reciprocal - text - - - - - blended_infix_suggest_exponential_reciprocal - BlendedInfixLookupFactory - FileDictionaryFactory - false - blendedInfixSuggest.txt - blended_infix_suggest_exponential_reciprocal - - - - position_exponential_reciprocal - text - - - - blended_infix_suggest_exponential_reciprocal_1 - BlendedInfixLookupFactory - FileDictionaryFactory - false - blendedInfixSuggest.txt - blended_infix_suggest_exponential_reciprocal_1 - - - position_exponential_reciprocal - 1.0 - text - - - - - - - - fuzzy_suggest_analyzing_with_file_dict - org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory - org.apache.solr.spelling.suggest.FileDictionaryFactory - fuzzy_suggest_analyzing - false - - - true - text - false - - fuzzysuggest.txt - - - - - - fuzzy_suggest_analyzing - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory - fuzzy_suggest_analyzing - false - - - true - text - false - - fuzzysuggest.txt - - - - phrase_suggest - - - - - - fuzzy_suggest_analyzing_with_max_edit_2 - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory - fuzzy_suggest_analyzing_with_max_edit_2 - false - - - true - text - false - 2 - - fuzzysuggest.txt - - - - phrase_suggest - - - - - - fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4 - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory - fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4 - false - - - true - text - false - 4 - - fuzzysuggest.txt - - - - phrase_suggest - - - - - - fuzzy_suggest_analyzing_with_min_fuzzy_length_2 - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory - fuzzy_suggest_analyzing_with_min_fuzzy_length_2 - false - - - true - text - false - 2 - - fuzzysuggest.txt - - - - phrase_suggest - - - - - - - - - true - suggest_wfst - false - - true - - - suggest_wfst - - - - - - - true - suggest_analyzing - false - - true - - - suggest_analyzing - - - - - - - true - infix_suggest_analyzing - false - - true - - - infix_suggest_analyzing - - - - - - true - - - fuzzy_suggest_analyzing_with_file_dict - - - - - - true - - - analyzing_infix_suggest - - - - - - true - - - blended_infix_suggest - - - - - - true - - - free_text_suggest - - - - - - - true - - - fuzzy_suggest_analyzing_with_high_freq_dict - - - - - - true - fuzzy_suggest_analyzing - false - - true - - - fuzzy_suggest_analyzing - - - - - - - true - fuzzy_suggest_analyzing_with_max_edit_2 - false - - true - - - fuzzy_suggest_analyzing_with_max_edit_2 - - - - - - - true - fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4 - false - - true - - - fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4 - - - - - - - true - fuzzy_suggest_analyzing_with_min_fuzzy_length_2 - false - - true - - - fuzzy_suggest_analyzing_with_min_fuzzy_length_2 - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml deleted file mode 100644 index a9544b2ad88..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - - - - ${solr.data.dir:} - - - - 1000000 - 2000000 - 3000000 - 4000000 - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - ${solr.ulog.dir:} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - ${solr.max.booleanClauses:1024} - - - - - - - - - - - - true - - - - - - 10 - - - - - - - - - - - - - - - - - - true - - - - - - dismax - *:* - 0.01 - - text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0 - - - text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5 - - - ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3 - - - 3<-1 5<-2 6<90% - - 100 - - - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - lowerpunctfilt - - - default - lowerfilt - spellchecker1 - false - - - direct - DirectSolrSpellChecker - lowerfilt - 3 - - - wordbreak - solr.WordBreakSolrSpellChecker - lowerfilt - true - true - 10 - - - multipleFields - lowerfilt1and2 - spellcheckerMultipleFields - false - - - - jarowinkler - lowerfilt - - org.apache.lucene.search.spell.JaroWinklerDistance - spellchecker2 - - - - solr.FileBasedSpellChecker - external - spellings.txt - UTF-8 - spellchecker3 - - - - freq - lowerfilt - spellcheckerFreq - - freq - false - - - fqcn - lowerfilt - spellcheckerFQCN - org.apache.solr.spelling.SampleComparator - false - - - perDict - org.apache.solr.handler.component.DummyCustomParamSpellChecker - lowerfilt - - - - - - - - - - false - - false - - 1 - - - spellcheck - - - - - direct - false - false - 1 - - - spellcheck - - - - - default - wordbreak - 20 - - - spellcheck - - - - - direct - wordbreak - 20 - - - spellcheck - - - - - dismax - lowerfilt1^1 - - - spellcheck - - - - - - - - - - - - - - - tvComponent - - - - - - string - elevate.xml - - - - - - explicit - - - elevate - - - - - - - - - - - - - 100 - - - - - - 70 - - - - - - - ]]> - ]]> - - - - - - - - - - - - - 10 - .,!? - - - - - - WORD - en - US - - - - - - - - - max-age=30, public - - - - - prefix-${solr.test.sys.prop2}-suffix - - - - - - - uniq - uniq2 - uniq3 - - - - - - - - - regex_dup_A_s - x - x_x - - - - regex_dup_B_s - x - x_x - - - - - - - - regex_dup_A_s - x - x_x - - - regex_dup_B_s - x - x_x - - - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml deleted file mode 100644 index a5785634156..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - false - text - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-query-parser-init.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-query-parser-init.xml deleted file mode 100644 index eb538fa620b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-query-parser-init.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - false - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml deleted file mode 100644 index 9d4f83d68c3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender.xml deleted file mode 100644 index 1404f8abb4f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-querysender.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - - - - - - - solr 0 10 /mock - rocks 0 10 /mock - - - - - - - - fast_warm 0 10 - /mock - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-repeater.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-repeater.xml deleted file mode 100644 index 160bc4e8564..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-repeater.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - ${solr.data.dir:} - - - - - - - - true - - - - - - - - - - - - - - commit - schema.xml - - - http://127.0.0.1:TEST_PORT/solr/replication - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-replication-legacy.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-replication-legacy.xml deleted file mode 100644 index c2f25ba77f0..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-replication-legacy.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - ${solr.data.dir:} - - - - - - - - true - - - - - - - - - - - - - - commit - - - http://127.0.0.1:TEST_PORT/solr/collection1 - 00:00:01 - COMPRESSION - - - - - - - max-age=30, public - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-reqHandler.incl b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-reqHandler.incl deleted file mode 100644 index cc975040e14..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-reqHandler.incl +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml deleted file mode 100644 index 643d9a62fc7..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - ${solr.data.dir:} - - - - - - - - - - - dismax - - - responselog - - - - - - dismax - - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-schemaless.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-schemaless.xml deleted file mode 100644 index d2f842611c9..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-schemaless.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - - - ${solr.ulog.dir:} - - - - - - - - - true - - - - - add-unknown-fields-to-the-schema - - - - - - - - [^\w-\.] - _ - - - - - - - yyyy-MM-dd['T'[HH:mm[:ss[.SSS]][z - yyyy-MM-dd['T'[HH:mm[:ss[,SSS]][z - yyyy-MM-dd HH:mm[:ss[.SSS]][z - yyyy-MM-dd HH:mm[:ss[,SSS]][z - [EEE, ]dd MMM yyyy HH:mm[:ss] z - EEEE, dd-MMM-yy HH:mm:ss z - EEE MMM ppd HH:mm:ss [z ]yyyy - - - - - text - - java.lang.Boolean - boolean - - - java.util.Date - pdates - - - java.lang.Long - java.lang.Integer - plongs - - - java.lang.Number - pdoubles - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-searcher-listeners1.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-searcher-listeners1.xml deleted file mode 100644 index c71f8baf9d4..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-searcher-listeners1.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - ${tests.solr.useColdSearcher:false} - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-snippet-processor.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-snippet-processor.xml deleted file mode 100644 index 8c76857f32b..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-snippet-processor.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - field-included - x - x_x - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml deleted file mode 100644 index fc707d461fd..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - ${foo.foo1} - ${foo.foo2} - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingmergepolicyfactory.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingmergepolicyfactory.xml deleted file mode 100644 index 17e6f4c7a56..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingmergepolicyfactory.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - in - org.apache.solr.util.RandomForceMergePolicyFactory - timestamp_i_dvo desc - - ${solr.tests.lockType:single} - - - - - - - ${solr.ulog.dir:} - - - - ${solr.autoCommit.maxTime:-1} - false - - - - ${solr.autoSoftCommit.maxTime:-1} - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingresponse.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingresponse.xml deleted file mode 100644 index 1bb3c97a225..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sortingresponse.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - true - - 20 - - 200 - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spatial.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spatial.xml deleted file mode 100644 index 889d1c24968..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spatial.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml deleted file mode 100644 index 7760eb261e3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - ${useCompoundFile:false} - ${solr.tests.maxBufferedDocs} - ${solr.tests.ramBufferSizeMB} - - 1000 - 10000 - ${solr.tests.lockType:single} - - false - 1 - - - - - - ${solr.data.dir:} - - - - - - - - lowerpunctfilt - - - default - lowerfilt - spellchecker1 - true - - - default_teststop - default_teststop - true - teststop - - - direct - solr.DirectSolrSpellChecker - 3 - 100 - teststop - - - direct_lowerfilt - solr.DirectSolrSpellChecker - 3 - 100 - lowerfilt - - - wordbreak - solr.WordBreakSolrSpellChecker - lowerfilt - true - true - MAX_FREQ - 10 - - - threshold - lowerfilt - spellcheckerThreshold - true - .29 - - - threshold_direct - solr.DirectSolrSpellChecker - lowerfilt - spellcheckerThreshold - true - .29 - - - multipleFields - lowerfilt1and2 - spellcheckerMultipleFields - true - - - - jarowinkler - lowerfilt - - org.apache.lucene.search.spell.JaroWinklerDistance - spellchecker2 - - - - solr.FileBasedSpellChecker - external - spellings.txt - UTF-8 - spellchecker3 - - - - freq - lowerfilt - spellcheckerFreq - - freq - true - - - fqcn - lowerfilt - spellcheckerFQCN - org.apache.solr.spelling.SampleComparator - true - - - perDict - org.apache.solr.handler.component.DummyCustomParamSpellChecker - lowerfilt - - - - - - - - - - false - - false - - 1 - - - spellcheck - - - - - dismax - lowerfilt1^1 - - - spellcheck - - - - - default - wordbreak - 20 - - - spellcheck - - - - - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml deleted file mode 100644 index a876fb6f27c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - suggest - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.jaspell.JaspellLookup - suggest - suggest - true - - - 0.0 - - - - - - - suggest_tst - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.tst.TSTLookup - suggest - suggest_tst - true - - - 0.0 - - - - - - - suggest_fst - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.FSTLookup - suggest - suggest_fst - true - - - 5 - true - - - - - - - suggest_wfst - org.apache.solr.spelling.suggest.Suggester - org.apache.solr.spelling.suggest.fst.WFSTLookupFactory - suggest - suggest_wfst - true - - - true - - - - - - - true - suggest - true - - - suggest_jaspell - - - - - - - true - suggest_tst - true - - - suggest_tst - - - - - - - true - suggest_fst - false - - - suggest_fst - - - - - - - true - suggest_wfst - false - - - suggest_wfst - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml deleted file mode 100644 index 35e56aa4574..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-sql.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - ${useCompoundFile:false} - - ${solr.data.dir:} - - - - - - ${solr.data.dir:} - - - - - - - true - - - - - - - - - - - - - - - *:* - - - all - - server-enabled.txt - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent-context-filter-query.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent-context-filter-query.xml deleted file mode 100644 index 36b6755bd23..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent-context-filter-query.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - ${tests.luceneMatchVersion:LATEST} - - ${solr.data.dir:} - - - - - - - - - - - suggest_blended_infix_suggester - BlendedInfixLookupFactory - DocumentDictionaryFactory - cat - price - my_contexts_t - text - false - false - suggest_blended_infix_suggester - suggest_blended_infix_suggester - false - - - - suggest_blended_infix_suggester_string - BlendedInfixLookupFactory - DocumentDictionaryFactory - cat - price - my_contexts_s - text - false - false - suggest_blended_infix_suggester_string - suggest_blended_infix_suggester_string - false - - - - suggest_lookup_has_no_context_implementation - AnalyzingLookupFactory - DocumentDictionaryFactory - cat - price - text - false - false - suggest_lookup_has_no_context_implementation - suggest_lookup_has_no_context_implementation - false - - - - suggest_context_filtering_not_implemented - AnalyzingLookupFactory - DocumentDictionaryFactory - cat - price - text - false - false - my_contexts_t - suggest_context_filtering_not_implemented - suggest_context_filtering_not_implemented - false - - - - - suggest_context_implemented_but_not_configured - BlendedInfixLookupFactory - DocumentDictionaryFactory - cat - price - text - false - false - suggest_context_implemented_but_not_configured - suggest_context_implemented_but_not_configured - false - - - - - - true - 5 - - - suggest - - - - false - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml deleted file mode 100644 index 857fb113687..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-suggestercomponent.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - ${solr.data.dir:} - - - - - - - - - - - - suggest_fuzzy_with_high_freq_dict - FuzzyLookupFactory - cat - suggest_fuzzy_with_high_freq_dict - text - true - - 0.0 - - - - - suggest_fuzzy_file_based - FuzzyLookupFactory - fuzzysuggest.txt - suggest_fuzzy_file_based - text - true - - - - - suggest_fuzzy_doc_dict - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - text - true - false - - - - - suggest_fuzzy_doc_expr_dict - DocumentExpressionDictionaryFactory - FuzzyLookupFactory - cat - ((price * 2) + weight) - weight - price - suggest_fuzzy_doc_expr_dict - text - true - - - - - suggest_fuzzy_doc_dict_build_startup - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - text - false - true - - - - - suggest_fuzzy_doc_manal_build - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - text - false - false - suggest_fuzzy_doc_manal_build - - - - - suggest_doc_default_startup - AnalyzingLookupFactory - DocumentDictionaryFactory - cat - price - text - false - suggest_doc_default_startup - - - - - suggest_doc_default_startup_no_store - AnalyzingLookupFactory - DocumentDictionaryFactory - cat - price - text - false - - - - - - - true - - - suggest - - - - false - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tagger.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tagger.xml deleted file mode 100644 index c97ce085660..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tagger.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - - - - - name_tag:[* TO *] - - - - - name_tag:[* TO *] - - - - - - - - - name_tag - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml deleted file mode 100644 index 00d49db3285..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - prefix-${solr.test.sys.prop2}-suffix - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-testxmlparser.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-testxmlparser.xml deleted file mode 100644 index 401710e8d32..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-testxmlparser.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - org.apache.solr.search.HandyQueryBuilder - org.apache.solr.search.HelloQueryBuilder - org.apache.solr.search.GoodbyeQueryBuilder - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml deleted file mode 100644 index 3494db00d9c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tieredmergepolicyfactory.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - ${useCompoundFile:false} - - 19 - 7 - 9 - 0.1 - - - 987 - 42 - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml deleted file mode 100644 index 6d5ed8474d6..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tlog.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${solr.hdfs.blockcache.enabled:true} - ${solr.hdfs.blockcache.blocksperbank:1024} - ${solr.hdfs.home:} - ${solr.hdfs.confdir:} - ${solr.hdfs.blockcache.global:true} - - - - - - - ${solr.data.dir:} - - - - - - - - - - - - - - - ${solr.autoCommit.maxSize:} - - - ${solr.ulog.dir:} - ${solr.ulog.maxNumLogsToKeep:10} - ${solr.ulog.numRecordsToKeep:100} - ${solr.ulog.tlogDfsReplication:2} - - - - - ${solr.autoCommit.maxTime:-1} - false - - - - ${solr.autoSoftCommit.maxTime:-1} - - - - - - - regex_dup_A_s - x - x_x - - - - regex_dup_B_s - x - x_x - - - - - - - - regex_dup_A_s - x - x_x - - - regex_dup_B_s - x - x_x - - - - - - - A - B - - - - - - - - - - - - - - - - - - text - - - - - - 0.0 - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-search.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-search.xml deleted file mode 100644 index 9c4601e3d70..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-search.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - ${solr.commitwithin.softcommit:true} - - - - - - explicit - true - text - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-update-minimal.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-update-minimal.xml deleted file mode 100644 index d3b90db50f6..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-tolerant-update-minimal.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - explicit - true - text - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-transformers.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-transformers.xml deleted file mode 100644 index ef38e8099e9..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-transformers.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - x1 - x2 - - - - 100 - 2000 - - - - x1 - x2 - - - - - xA - xA - - - - - - - - 88 - 99 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml deleted file mode 100644 index e22ad695859..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml +++ /dev/null @@ -1,652 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - solr.TrieIntField - solr.TrieLongField - solr.IntPointField - solr.LongPointField - - - - min_foo_l - - - max_foo_l - - - ; - - primary_author_s1 - - - - primary_author_s1 - first_foo_l - - - - - - - - - - - - - foo_t - - - - - - - - foo_t - - - - - - foo.* - bar.* - - .*HOSS.* - - - - - - foo.* - bar.* - - - solr.TrieDateField - solr.DatePointField - - - .*HOSS.* - - - - - - foo.* - bar.* - - - solr.TrieDateField - .*HOSS.* - - - - - - - name - foo_t - - - - - - name - foo_t - - - - - - - foo.* - bar.*_s - - - - - - nametext - text_sw - - - - - - solr.TrieDateField - solr.DatePointField - solr.StrField - - - - - - solr.TrieDateField - solr.StrField - - foo.* - - - - - - - - - - - - - - - - - - foo.* - yak.* - - - - - - - - - - - foo_s - - - - - string - ; - - - - - - foo_s - bar_s - - - - - foo_s - bar_s - - - - - foo_i - foo_s - bar_s - - - - - foo_i - foo_s - bar_s - - - - - - html_s - - - - - - - trunc - 5 - - - - - - count_field - - - - - - - - - - false - - - - - - true - - - - - - foo.* - false - - - - - - foo.* - - false - - - - - - - false - - - - - - true - - - - - - .*_raw - - - - - - source1_s - dest_s - - - - - - source1_s - - source\d(_s) - dest$1 - - - - - - - source1_s - source2_s - dest_s - - - - - - source1_s - source2_s - - source\d(_s) - dest$1 - - - - - - - - source1_s - source2_s - - dest_s - - - - - - - source1_s - source2_s - - - source\d(_s) - dest$1 - - - - - - - - source\d_.* - - source0_.* - - - dest_s - - - - - - - source\d_.* - - source0_.* - - - - source\d(_s) - dest$1 - - - - - - - source\d_.* - dest_s - - - - - - - foo.* - - - - x(\d) - y$1 - - - - - - - field1 - toField - - - toField - 3 - - - - - - field1 - toField - - - field1 - - - - - - toField - - - field1 - toField - - - - - - field1 - field2 - toField - - - ; - toField - - - - - - field(.*) - toField - - - toField - - - - - - - category - category_s - - - - authors - editors - - contributors - - - - .*_price$ - - list_price - - - all_prices - - - - ^feat(.*)s$ - - - ^feat(.*)s$ - key_feat$1 - - - - - ^feat(.*)s$ - best_feat$1 - - - - - - category - category_count - - - category_count - - - category_count - 0 - - - - - - content - title - \s+ - X - - - - - - content - title - (try) - <$1> - true - - - - - - content - title - (try) - <$1> - - - - - - content - title - (try) - <$1> - false - - - - - - content - title - (try) - <$1> - true - - - - - - processor_default_s - X - - - processor_default_i - 42 - - - uuid - - - timestamp - - - - - - - id - - - - - - - - - - - uniq_.* - - - - - - subject - title - teststop - nonexistent - ssto - sind - simple - - - - - - - subject - title - teststop - nonexistent - ssto - sind - json - - - - - - - - - - - - 200 - Thou shall not issue a commit! - - - - - - - Thou shall not issue an optimize, but commits are OK! - true - - - - - - - 10 - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-warmer-randommergepolicyfactory.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-warmer-randommergepolicyfactory.xml deleted file mode 100644 index 21101b1d9e6..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-warmer-randommergepolicyfactory.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - ${tests.luceneMatchVersion:LATEST} - ${solr.data.dir:} - - - - - - - - - - ${useCompoundFile} - ${solr.tests.maxBufferedDocs} - ${solr.tests.ramBufferSizeMB} - - 1000 - 10000 - single - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-withgethandler.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-withgethandler.xml deleted file mode 100644 index 59879ce6ca3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-withgethandler.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${solr.commitwithin.softcommit:true} - - - - - - explicit - true - text - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml deleted file mode 100644 index 17df214cb71..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml deleted file mode 100644 index de5c714aa23..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - ${useCompoundFile:false} - - ${solr.tests.maxBufferedDocs} - ${solr.tests.ramBufferSizeMB} - ${solr.tests.maxCommitMergeWaitTime:-1} - ${solr.tests.ramPerThreadHardLimitMB} - - - - 1000 - 10000 - - - ${solr.tests.lockType:single} - - ${solr.tests.infostream:false} - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml deleted file mode 100644 index 02d79645eba..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig.xml +++ /dev/null @@ -1,525 +0,0 @@ - - - - - - - - - - ${solr.data.dir:} - - - - 1000000 - 2000000 - 3000000 - 4000000 - ${solr.hdfs.home:} - ${solr.hdfs.blockcache.enabled:true} - ${solr.hdfs.blockcache.global:true} - ${solr.hdfs.blockcache.write.enabled:false} - ${solr.hdfs.blockcache.blocksperbank:10} - ${solr.hdfs.blockcache.slab.count:1} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - - - - ${solr.autoCommit.maxTime:-1} - - - - - - ${solr.ulog.dir:} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - ${solr.max.booleanClauses:1024} - - - - - - - - - - - - true - - - - - - 10 - - - - - - - - - - - - 2000 - - - - - - - - true - - - - - dismax - *:* - 0.01 - - text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0 - - - text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5 - - - weight^0.5 recip(rord(id),1,1000,1000)^0.3 - - - 3<-1 5<-2 6<90% - - 100 - - - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - 4 - true - text,name,subject,title,whitetok - - - - - - - - lowerpunctfilt - - - default - lowerfilt - spellchecker1 - false - - - direct - DirectSolrSpellChecker - lowerfilt - 3 - - - wordbreak - solr.WordBreakSolrSpellChecker - lowerfilt - true - true - 10 - - - multipleFields - lowerfilt1and2 - spellcheckerMultipleFields - false - - - - jarowinkler - lowerfilt - - org.apache.lucene.search.spell.JaroWinklerDistance - spellchecker2 - - - - solr.FileBasedSpellChecker - external - spellings.txt - UTF-8 - spellchecker3 - - - - freq - lowerfilt - spellcheckerFreq - - freq - false - - - fqcn - lowerfilt - spellcheckerFQCN - org.apache.solr.spelling.SampleComparator - false - - - perDict - org.apache.solr.handler.component.DummyCustomParamSpellChecker - lowerfilt - - - - - - - - - - - - - false - - false - - 1 - - - spellcheck - - - - - direct - false - false - 1 - - - spellcheck - - - - - default - wordbreak - 20 - - - spellcheck - - - - - direct - wordbreak - 20 - - - spellcheck - - - - - dismax - lowerfilt1^1 - - - spellcheck - - - - - - - - - - - - - - - tvComponent - - - - - - - - - - - - 100 - - - - - - 70 - - - - - - - ]]> - ]]> - - - - - - - - - - - - - 10 - .,!? - - - - - - WORD - en - US - - - - - - - - - max-age=30, public - - - - - - foo_s - - - foo_s:bar - - - - - foo_s - foo_s:bar - - - - - prefix-${solr.test.sys.prop2}-suffix - - - - - - - uniq - uniq2 - uniq3 - - - - - - - - - regex_dup_A_s - x - x_x - - - - regex_dup_B_s - x - x_x - - - - - - - - regex_dup_A_s - x - x_x - - - regex_dup_B_s - x - x_x - - - - - - - org.apache.solr.rest.ManagedResourceStorage$InMemoryStorageIO - - - - - - text - - - - - - text - - - nl - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_SimpleTextCodec.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_SimpleTextCodec.xml deleted file mode 100644 index 7b0c3e368ba..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_SimpleTextCodec.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec.xml deleted file mode 100644 index ad080961d9f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - ${tests.COMPRESSION_MODE:BEST_COMPRESSION} - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec2.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec2.xml deleted file mode 100644 index c4a8ae73dfe..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_codec2.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - ${tests.luceneMatchVersion:LATEST} - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_perf.xml b/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_perf.xml deleted file mode 100644 index 29fbd3d6f97..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/solrconfig_perf.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - ${tests.luceneMatchVersion:LATEST} - - ${solr.data.dir:} - - - - - - - - - - - - - - - - - - true - 20 - 200 - false - - - - - - - - - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stemdict.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stemdict.txt deleted file mode 100644 index f57a4ad490f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stemdict.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# test that we can override the stemming algorithm with our own mappings -# these must be tab-separated -monkeys monkey -otters otter -# some crazy ones that a stemmer would never do -dogs cat diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-1.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-1.txt deleted file mode 100644 index 8dfe80902d2..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-1.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -foo -bar \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-2.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-2.txt deleted file mode 100644 index 646b7ff4ddb..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-2.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -junk -more \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-snowball.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-snowball.txt deleted file mode 100644 index 1c0c6f51142..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stop-snowball.txt +++ /dev/null @@ -1,10 +0,0 @@ - | This is a file in snowball format, empty lines are ignored, '|' is a comment - | Additionally, multiple words can be on the same line, allowing stopwords to be - | arranged in tables (useful in some languages where they might inflect) - - | fictitious table below - -|third person singular -|Subject Object Possessive Reflexive -he him his himself| masculine -she her hers herself| feminine diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stoptypes-1.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stoptypes-1.txt deleted file mode 100644 index 456348ea9dc..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stoptypes-1.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stoptypes-2.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stoptypes-2.txt deleted file mode 100644 index d8a3810c26c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stoptypes-2.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwithbom.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwithbom.txt deleted file mode 100644 index eb5f6e1c0f8..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwithbom.txt +++ /dev/null @@ -1 +0,0 @@ -BOMsAreEvil diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwords.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwords.txt deleted file mode 100644 index b5824da3263..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwords.txt +++ /dev/null @@ -1,58 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# a couple of test stopwords to test that the words are really being -# configured from this file: -stopworda -stopwordb - -#Standard english stop words taken from Lucene's StopAnalyzer -a -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -s -such -t -that -the -their -then -there -these -they -this -to -was -will -with - diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwordsWrongEncoding.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwordsWrongEncoding.txt deleted file mode 100644 index 0d305c88c59..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/stopwordsWrongEncoding.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# stopwords in the wrong encoding (ISO-8859-1). -# tests resourceloader's ability to report wrongly encoded files. -bañadores diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/synonyms.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/synonyms.txt deleted file mode 100644 index d7feb34ee64..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/synonyms.txt +++ /dev/null @@ -1,54 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -#some test synonym mappings unlikely to appear in real input text -aaa => aaaa -bbb => bbbb1 bbbb2 -ccc => cccc1,cccc2 -a\=>a => b\=>b -a\,a => b\,b -fooaaa,baraaa,bazaaa - -# Some synonym groups specific to this example -GB,gib,gigabyte,gigabytes -MB,mib,megabyte,megabytes -Television, Televisions, TV, TVs -#notice we use "gib" instead of "GiB" so any WordDelimiterGraphFilter coming -#after us won't split it into two words. - -# Synonym mappings can be used for spelling correction too -pixima => pixma - -# multiword synonyms -wi fi => wifi -crow blackbird, grackle - -# Synonyms used in semantic expansion -tabby => tabby, cat, feline, animal -persian => persian, cat, feline, animal - -jeans, denim pants - -# Boosted Synonyms -tiger, tigre|0.9 -lynx => lince|0.8, lynx_canadensis|0.9 - -leopard, big cat|0.8, bagheera|0.9, panthera pardus|0.85 -lion => panthera leo|0.9, simba leo|0.8, kimba|0.75 - -panthera pardus, leopard|0.6 -panthera tigris => tiger|0.99 - -snow leopard, panthera uncia|0.9, big cat|0.8, white_leopard|0.6 -panthera onca => jaguar|0.95, big cat|0.85, black panther|0.65 -panthera blytheae, oldest|0.5 ancient|0.9 panthera \ No newline at end of file diff --git a/solr/modules/hdfs/src/test-files/solr/collection1/conf/wdftypes.txt b/solr/modules/hdfs/src/test-files/solr/collection1/conf/wdftypes.txt deleted file mode 100644 index 9a453c8da9f..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/collection1/conf/wdftypes.txt +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# A customized type mapping for WordDelimiterGraphFilterFactory -# the allowable types are: LOWER, UPPER, ALPHA, DIGIT, ALPHANUM, SUBWORD_DELIM -# -# the default for any character without a mapping is always computed from -# Unicode character properties - -# Map the $, %, '.', and ',' characters to DIGIT -# This might be useful for financial data. -$ => DIGIT -% => DIGIT -. => DIGIT -\u002C => DIGIT - -# in some cases you might not want to split on ZWJ -# this also tests the case where we need a bigger byte[] -# see http://en.wikipedia.org/wiki/Zero-width_joiner -\u200D => ALPHANUM diff --git a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/schema.xml b/solr/modules/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/schema.xml deleted file mode 100644 index 52a63f41944..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/schema.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml b/solr/modules/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml deleted file mode 100644 index 3e54f30a902..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-hdfs/conf/solrconfig.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - hdfs - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - explicit - true - text - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/schema.xml b/solr/modules/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/schema.xml deleted file mode 100644 index 4124feab0c3..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/schema.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/solrconfig.xml b/solr/modules/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/solrconfig.xml deleted file mode 100644 index 853ba656241..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-minimal/conf/solrconfig.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - explicit - true - text - - - - - -: - - diff --git a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/schema.xml b/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/schema.xml deleted file mode 100644 index 52a63f41944..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/schema.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - id - diff --git a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/solrconfig.xml b/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/solrconfig.xml deleted file mode 100644 index 059e58f447c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/solrconfig.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - ${solr.data.dir:} - - - - - ${tests.luceneMatchVersion:LATEST} - - - - ${solr.commitwithin.softcommit:true} - - - - - - - explicit - true - text - - - - - diff --git a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/stopwords/stopwords-en.txt b/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/stopwords/stopwords-en.txt deleted file mode 100644 index 5f155dd2588..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/configsets/cloud-subdirs/conf/stopwords/stopwords-en.txt +++ /dev/null @@ -1,62 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# a couple of test stopwords to test that the words are really being -# configured from this file: -# So far, this is here only to be able to test the configset upload -# and download and local->ZK recursive upload and download process -# - -stopworda -stopwordb - -#Standard english stop words taken from Lucene's StopAnalyzer -a -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -s -such -t -that -the -their -then -there -these -they -this -to -was -will -with - diff --git a/solr/modules/hdfs/src/test-files/solr/solr.xml b/solr/modules/hdfs/src/test-files/solr/solr.xml deleted file mode 100644 index 735388f638c..00000000000 --- a/solr/modules/hdfs/src/test-files/solr/solr.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - ${shareSchema:false} - ${configSetBaseDir:configsets} - ${coreRootDirectory:.} - ${solr.allowPaths:} - ${solr.tests.allowUrls:} - - - ${urlScheme:} - ${socketTimeout:15000} - ${connTimeout:15000} - - - - 4 - - - - - 127.0.0.1 - ${hostPort:8983} - ${hostContext:solr} - ${solr.zkclienttimeout:60000} - ${genericCoreNodeNames:true} - ${leaderVoteWait:15000} - ${leaderConflictResolveWait:45000} - ${distribUpdateConnTimeout:5000} - ${distribUpdateSoTimeout:30000} - - - From 9ae46ef4588359f1f8d468120c2cc5b5d20f335b Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Wed, 26 Jan 2022 16:39:34 -0500 Subject: [PATCH 38/52] HDFS Contrib module: updateHandler will use the update log instance returned by the directory factory if no class is specified in solrconfig.xml. --- .../java/org/apache/solr/core/DirectoryFactory.java | 9 +++++++++ .../src/java/org/apache/solr/update/UpdateHandler.java | 5 ++++- .../org/apache/solr/core/HdfsDirectoryFactory.java | 10 ++++++++++ .../test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java | 3 ++- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java index 2ccc5923ec2..1ed575a6bdd 100644 --- a/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java +++ b/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java @@ -36,6 +36,7 @@ import org.apache.lucene.store.LockFactory; import org.apache.solr.common.SolrException; import org.apache.solr.core.CachingDirectoryFactory.CloseListener; +import org.apache.solr.update.UpdateLog; import org.apache.solr.util.plugin.NamedListInitializedPlugin; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -430,4 +431,12 @@ static DirectoryFactory loadDirectoryFactory(SolrConfig config, CoreContainer cc } return dirFactory; } + + /** + * Returns a default Update Log instance. UpdateHandler will invoke this method if the + * solrconfig / plugin info does not specify any ulog class. + */ + public UpdateLog newDefaultUpdateLog() { + return new UpdateLog(); + } } diff --git a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java index c819755932e..df70db796d2 100644 --- a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java +++ b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java @@ -116,7 +116,10 @@ public UpdateHandler(SolrCore core, UpdateLog updateLog) { if (updateLog == null && ulogPluginInfo != null && ulogPluginInfo.isEnabled() && !skipUpdateLog) { DirectoryFactory dirFactory = core.getDirectoryFactory(); - ulog = ulogPluginInfo.className == null ? new UpdateLog(): + // if the update log class is not defined in the plugin info / solrconfig.xml + // (like ) + // we fall back use the one which is the default for the given directory factory + ulog = ulogPluginInfo.className == null ? dirFactory.newDefaultUpdateLog() : core.getResourceLoader().newInstance(ulogPluginInfo, UpdateLog.class, true); if (!core.isReloaded() && !dirFactory.isPersistent()) { diff --git a/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java b/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java index c5e9c6fc9f3..269ed22e28c 100644 --- a/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java +++ b/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java @@ -64,6 +64,8 @@ import org.apache.solr.store.hdfs.HdfsDirectory; import org.apache.solr.store.hdfs.HdfsLocalityReporter; import org.apache.solr.store.hdfs.HdfsLockFactory; +import org.apache.solr.update.HdfsUpdateLog; +import org.apache.solr.update.UpdateLog; import org.apache.solr.util.HdfsUtil; import org.apache.solr.util.plugin.SolrCoreAware; import org.slf4j.Logger; @@ -98,6 +100,8 @@ public class HdfsDirectoryFactory extends CachingDirectoryFactory implements Sol public static final String CACHE_MERGES = "solr.hdfs.blockcache.cachemerges"; public static final String CACHE_READONCE = "solr.hdfs.blockcache.cachereadonce"; + + public static final String HDFS_UPDATE_LOG_CLASS_NAME = "solr.HdfsUpdateLog"; private SolrParams params; @@ -629,4 +633,10 @@ public void move(Directory fromDir, Directory toDir, String fileName, IOContext super.move(fromDir, toDir, fileName, ioContext); } + + @Override + public UpdateLog newDefaultUpdateLog() { + return new HdfsUpdateLog(); + } + } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java index 2ebe67252a8..8da94c302fd 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java @@ -45,6 +45,7 @@ import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.util.IOUtils; import org.apache.solr.core.DirectoryFactory; +import org.apache.solr.core.HdfsDirectoryFactory; import org.apache.solr.util.HdfsUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -115,7 +116,7 @@ public static MiniDFSCluster setupClass(String dir, boolean safeModeTesting, boo System.setProperty("test.build.data", dir + File.separator + "hdfs" + File.separator + "build"); System.setProperty("test.cache.data", dir + File.separator + "hdfs" + File.separator + "cache"); System.setProperty("solr.lock.type", DirectoryFactory.LOCK_TYPE_HDFS); - System.setProperty(SolrTestCaseJ4.UPDATELOG_SYSPROP, "solr.HdfsUpdateLog"); + System.setProperty(SolrTestCaseJ4.UPDATELOG_SYSPROP, HdfsDirectoryFactory.HDFS_UPDATE_LOG_CLASS_NAME); // test-files/solr/solr.xml sets this to be 15000. This isn't long enough for HDFS in some cases. System.setProperty("socketTimeout", "90000"); From afedd2dda5b75e508810613db6949971c778a67b Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Thu, 27 Jan 2022 12:26:13 -0500 Subject: [PATCH 39/52] Simplify test-framework --- gradle/validation/forbidden-apis.gradle | 6 - .../validate-source-patterns.gradle | 9 +- solr/core/src/test-files/core-site.xml | 2 +- .../TestSolrCloudWithSecureImpersonation.java | 2 +- .../hadoop/HadoopAuthFakeGroupMapping.java} | 23 +++- .../solr/security/hadoop/HadoopTestUtil.java | 58 ++++++++ .../hadoop/TestDelegationWithHadoopAuth.java | 1 - .../TestImpersonationWithHadoopAuth.java | 1 - .../TestSolrCloudWithHadoopAuthPlugin.java | 1 - .../hadoop/TestZkAclsWithHadoopAuth.java | 1 - solr/modules/hdfs/build.gradle | 11 +- .../modules/hdfs/src/test-files/core-site.xml | 23 ++++ .../test}/org/apache/hadoop/fs/FileUtil.java | 0 .../test}/org/apache/hadoop/fs/HardLink.java | 0 .../apache/hadoop/fs/RawLocalFileSystem.java | 0 .../org/apache/hadoop/http/HttpServer2.java | 0 .../org/apache/hadoop/util/DiskChecker.java | 0 .../cloud/hdfs/HdfsFakeGroupMapping.java} | 8 +- .../apache/solr/cloud/hdfs/HdfsTestUtil.java | 104 ++++++++++++--- .../HdfsBackupRepositoryIntegrationTest.java | 5 +- .../solr/index/hdfs/CheckHdfsIndexTest.java | 3 +- .../solr/store/blockcache/BlockCacheTest.java | 22 +-- .../store/blockcache/BlockDirectoryTest.java | 8 +- .../store/blockcache/BufferStoreTest.java | 5 +- solr/test-framework/build.gradle | 12 -- .../java/org/apache/hadoop/package-info.java | 39 ------ .../solr/cloud/hadoop/HadoopTestUtil.java | 126 ------------------ versions.lock | 2 +- 28 files changed, 222 insertions(+), 250 deletions(-) rename solr/{test-framework/src/java/org/apache/solr/cloud/hadoop/package-info.java => core/src/test/org/apache/solr/security/hadoop/HadoopAuthFakeGroupMapping.java} (59%) create mode 100644 solr/core/src/test/org/apache/solr/security/hadoop/HadoopTestUtil.java create mode 100644 solr/modules/hdfs/src/test-files/core-site.xml rename solr/{test-framework/src/java => modules/hdfs/src/test}/org/apache/hadoop/fs/FileUtil.java (100%) rename solr/{test-framework/src/java => modules/hdfs/src/test}/org/apache/hadoop/fs/HardLink.java (100%) rename solr/{test-framework/src/java => modules/hdfs/src/test}/org/apache/hadoop/fs/RawLocalFileSystem.java (100%) rename solr/{test-framework/src/java => modules/hdfs/src/test}/org/apache/hadoop/http/HttpServer2.java (100%) rename solr/{test-framework/src/java => modules/hdfs/src/test}/org/apache/hadoop/util/DiskChecker.java (100%) rename solr/{test-framework/src/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java => modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsFakeGroupMapping.java} (91%) delete mode 100644 solr/test-framework/src/java/org/apache/hadoop/package-info.java delete mode 100644 solr/test-framework/src/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java diff --git a/gradle/validation/forbidden-apis.gradle b/gradle/validation/forbidden-apis.gradle index 8eb45764810..0ffb3a3a272 100644 --- a/gradle/validation/forbidden-apis.gradle +++ b/gradle/validation/forbidden-apis.gradle @@ -134,12 +134,6 @@ allprojects { prj -> if (prj.path == ":solr:modules:hdfs") { forbiddenApisTest.exclude("**/org/apache/hadoop/**") } - if (prj.path == ":solr:test-framework") { - forbiddenApisMain.exclude("**/org/apache/hadoop/**") - } - - - // We rely on resolved configurations to compute the relevant set of rule // files for forbiddenApis. Since we don't want to resolve these configurations until diff --git a/gradle/validation/validate-source-patterns.gradle b/gradle/validation/validate-source-patterns.gradle index 426a968bae1..3aae4b63caf 100644 --- a/gradle/validation/validate-source-patterns.gradle +++ b/gradle/validation/validate-source-patterns.gradle @@ -108,19 +108,12 @@ allprojects { configure(project(':solr:core')) { project.tasks.withType(ValidateSourcePatternsTask) { sourceFiles.exclude 'src/**/CheckLoggingConfiguration.java' - sourceFiles.exclude 'src/**/org/apache/hadoop/**' - } -} - -configure(project(':solr:test-framework')) { - project.tasks.withType(ValidateSourcePatternsTask) { - sourceFiles.exclude 'src/**/org/apache/hadoop/**' } } configure(project(':solr:modules:hdfs')) { project.tasks.withType(ValidateSourcePatternsTask) { - sourceFiles.exclude 'src/**/org/apache/hadoop/**' + sourceFiles.exclude 'src/test/org/apache/hadoop/**' } } diff --git a/solr/core/src/test-files/core-site.xml b/solr/core/src/test-files/core-site.xml index 994ca6d8772..66718b71127 100644 --- a/solr/core/src/test-files/core-site.xml +++ b/solr/core/src/test-files/core-site.xml @@ -18,6 +18,6 @@ hadoop.security.group.mapping - org.apache.solr.cloud.hadoop.FakeGroupMapping + org.apache.solr.security.hadoop.HadoopAuthFakeGroupMapping diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java index d92b44d85bc..e4d8447f044 100644 --- a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java +++ b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java @@ -32,7 +32,7 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.client.solrj.response.CollectionAdminResponse; -import org.apache.solr.cloud.hadoop.HadoopTestUtil; +import org.apache.solr.security.hadoop.HadoopTestUtil; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.IOUtils; diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/package-info.java b/solr/core/src/test/org/apache/solr/security/hadoop/HadoopAuthFakeGroupMapping.java similarity index 59% rename from solr/test-framework/src/java/org/apache/solr/cloud/hadoop/package-info.java rename to solr/core/src/test/org/apache/solr/security/hadoop/HadoopAuthFakeGroupMapping.java index f5358306add..b77a7232d14 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/package-info.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/HadoopAuthFakeGroupMapping.java @@ -14,8 +14,27 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +package org.apache.solr.security.hadoop; + +import java.util.Collections; +import java.util.List; + +import org.apache.hadoop.security.GroupMappingServiceProvider; /** - * Test framework classes for Hadoop-related functionality. + * Fake mapping for Hadoop to prevent falling back to Shell group provider */ -package org.apache.solr.cloud.hadoop; \ No newline at end of file +public class HadoopAuthFakeGroupMapping implements GroupMappingServiceProvider { + @Override + public List getGroups(String user) { + return Collections.singletonList("supergroup"); + } + + @Override + public void cacheGroupsRefresh() { + } + + @Override + public void cacheGroupsAdd(List groups) { + } +} diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/HadoopTestUtil.java b/solr/core/src/test/org/apache/solr/security/hadoop/HadoopTestUtil.java new file mode 100644 index 00000000000..f8a7222f942 --- /dev/null +++ b/solr/core/src/test/org/apache/solr/security/hadoop/HadoopTestUtil.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.solr.security.hadoop; + +import java.lang.invoke.MethodHandles; +import org.apache.hadoop.io.nativeio.NativeIO; + +import org.apache.lucene.util.Constants; +import org.apache.solr.SolrTestCase; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class HadoopTestUtil { + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + public static void checkAssumptions() { + ensureHadoopHomeNotSet(); + checkHadoopWindows(); + } + + /** + * If Hadoop home is set via environment variable HADOOP_HOME or Java system property + * hadoop.home.dir, the behavior of test is undefined. Ensure that these are not set + * before starting. It is not possible to easily unset environment variables so better + * to bail out early instead of trying to test. + */ + protected static void ensureHadoopHomeNotSet() { + if (System.getenv("HADOOP_HOME") != null) { + SolrTestCase.fail("Ensure that HADOOP_HOME environment variable is not set."); + } + if (System.getProperty("hadoop.home.dir") != null) { + SolrTestCase.fail("Ensure that \"hadoop.home.dir\" Java property is not set."); + } + } + + /** + * Hadoop integration tests fail on Windows without Hadoop NativeIO + */ + protected static void checkHadoopWindows() { + SolrTestCase.assumeTrue("Hadoop does not work on Windows without Hadoop NativeIO", + !Constants.WINDOWS || NativeIO.isAvailable()); + } +} diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/TestDelegationWithHadoopAuth.java b/solr/core/src/test/org/apache/solr/security/hadoop/TestDelegationWithHadoopAuth.java index 81c6ab82fad..86737bbb3f3 100644 --- a/solr/core/src/test/org/apache/solr/security/hadoop/TestDelegationWithHadoopAuth.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/TestDelegationWithHadoopAuth.java @@ -36,7 +36,6 @@ import org.apache.solr.client.solrj.response.CollectionAdminResponse; import org.apache.solr.client.solrj.response.DelegationTokenResponse; import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.cloud.SolrZkClient; import org.apache.solr.common.params.ModifiableSolrParams; diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWithHadoopAuth.java b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWithHadoopAuth.java index c8db1b4c6d9..049d756b522 100644 --- a/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWithHadoopAuth.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWithHadoopAuth.java @@ -29,7 +29,6 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.util.Utils; import org.apache.solr.security.HadoopAuthPlugin; diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/TestSolrCloudWithHadoopAuthPlugin.java b/solr/core/src/test/org/apache/solr/security/hadoop/TestSolrCloudWithHadoopAuthPlugin.java index 7c9c1d9dff6..063f3dcadf2 100644 --- a/solr/core/src/test/org/apache/solr/security/hadoop/TestSolrCloudWithHadoopAuthPlugin.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/TestSolrCloudWithHadoopAuthPlugin.java @@ -23,7 +23,6 @@ import org.apache.solr.cloud.AbstractDistribZkTestBase; import org.apache.solr.cloud.KerberosTestServices; import org.apache.solr.cloud.SolrCloudAuthTestCase; -import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.SolrInputDocument; import org.junit.AfterClass; import org.junit.BeforeClass; diff --git a/solr/core/src/test/org/apache/solr/security/hadoop/TestZkAclsWithHadoopAuth.java b/solr/core/src/test/org/apache/solr/security/hadoop/TestZkAclsWithHadoopAuth.java index 06abcff4897..26e2a6a8711 100644 --- a/solr/core/src/test/org/apache/solr/security/hadoop/TestZkAclsWithHadoopAuth.java +++ b/solr/core/src/test/org/apache/solr/security/hadoop/TestZkAclsWithHadoopAuth.java @@ -29,7 +29,6 @@ import org.apache.solr.cloud.MiniSolrCloudCluster; import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.cloud.SecurityAwareZkACLProvider; import org.apache.solr.common.cloud.SolrZkClient; import org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLProvider; diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle index e73ddb010e1..db782f0f2d4 100644 --- a/solr/modules/hdfs/build.gradle +++ b/solr/modules/hdfs/build.gradle @@ -47,15 +47,13 @@ dependencies { // Many HDFS tests are using/subclassing test framework classes testImplementation project(':solr:test-framework') - // HdfsCheckindexTool tests reference LuceneTestCase - testImplementation ('org.apache.lucene:lucene-test-framework') - // hadoop dependencies for tests testImplementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-hdfs::tests') { transitive = false } testImplementation ('org.apache.hadoop:hadoop-minikdc') { transitive = false } + testImplementation 'org.slf4j:jcl-over-slf4j' testImplementation 'org.apache.logging.log4j:log4j-1.2-api' // classes like solr.ICUCollationField, used by NNFailoverTest for example. @@ -67,9 +65,14 @@ dependencies { // commons packages needed by test classes testImplementation('commons-io:commons-io') { transitive = false } + // used by the hadoop-specific test framework classes + testImplementation ('org.apache.commons:commons-compress') { transitive = false } + testImplementation ('org.apache.commons:commons-collections4') { transitive = false } + testImplementation ('org.apache.commons:commons-lang3') { transitive = false } + testImplementation ('com.sun.jersey:jersey-servlet') { transitive = false } + // Zookeeper dependency - some tests like HdfsCloudBackupRestore need this implementation ('org.apache.zookeeper:zookeeper') - } diff --git a/solr/modules/hdfs/src/test-files/core-site.xml b/solr/modules/hdfs/src/test-files/core-site.xml new file mode 100644 index 00000000000..c949ff35224 --- /dev/null +++ b/solr/modules/hdfs/src/test-files/core-site.xml @@ -0,0 +1,23 @@ + + + + + hadoop.security.group.mapping + org.apache.solr.cloud.hdfs.HdfsFakeGroupMapping + + diff --git a/solr/test-framework/src/java/org/apache/hadoop/fs/FileUtil.java b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java similarity index 100% rename from solr/test-framework/src/java/org/apache/hadoop/fs/FileUtil.java rename to solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java diff --git a/solr/test-framework/src/java/org/apache/hadoop/fs/HardLink.java b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/HardLink.java similarity index 100% rename from solr/test-framework/src/java/org/apache/hadoop/fs/HardLink.java rename to solr/modules/hdfs/src/test/org/apache/hadoop/fs/HardLink.java diff --git a/solr/test-framework/src/java/org/apache/hadoop/fs/RawLocalFileSystem.java b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/RawLocalFileSystem.java similarity index 100% rename from solr/test-framework/src/java/org/apache/hadoop/fs/RawLocalFileSystem.java rename to solr/modules/hdfs/src/test/org/apache/hadoop/fs/RawLocalFileSystem.java diff --git a/solr/test-framework/src/java/org/apache/hadoop/http/HttpServer2.java b/solr/modules/hdfs/src/test/org/apache/hadoop/http/HttpServer2.java similarity index 100% rename from solr/test-framework/src/java/org/apache/hadoop/http/HttpServer2.java rename to solr/modules/hdfs/src/test/org/apache/hadoop/http/HttpServer2.java diff --git a/solr/test-framework/src/java/org/apache/hadoop/util/DiskChecker.java b/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java similarity index 100% rename from solr/test-framework/src/java/org/apache/hadoop/util/DiskChecker.java rename to solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsFakeGroupMapping.java similarity index 91% rename from solr/test-framework/src/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java rename to solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsFakeGroupMapping.java index 52002fd3e1e..2865d8174f2 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/FakeGroupMapping.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsFakeGroupMapping.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.solr.cloud.hadoop; +package org.apache.solr.cloud.hdfs; + +import org.apache.hadoop.security.GroupMappingServiceProvider; import java.util.Collections; import java.util.List; -import org.apache.hadoop.security.GroupMappingServiceProvider; - /** * Fake mapping for Hadoop to prevent falling back to Shell group provider */ -public class FakeGroupMapping implements GroupMappingServiceProvider { +public class HdfsFakeGroupMapping implements GroupMappingServiceProvider { @Override public List getGroups(String user) { return Collections.singletonList("supergroup"); diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java index 8da94c302fd..989e8f7050d 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java @@ -19,6 +19,8 @@ import java.io.File; import java.lang.invoke.MethodHandles; import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Enumeration; import java.util.HashMap; import java.util.List; @@ -28,33 +30,40 @@ import java.util.TimerTask; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinWorkerThread; +import java.util.regex.Pattern; +import org.apache.commons.lang3.time.FastDateFormat; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.FileUtil; +import org.apache.hadoop.fs.HardLink; import org.apache.hadoop.fs.Path; +import org.apache.hadoop.fs.RawLocalFileSystem; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.MiniDFSNNTopology; import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter; import org.apache.hadoop.hdfs.server.namenode.NameNodeResourceChecker; import org.apache.hadoop.hdfs.server.namenode.ha.HATestUtil; +import org.apache.hadoop.http.HttpServer2; +import org.apache.hadoop.io.nativeio.NativeIO; import org.apache.hadoop.metrics2.MetricsSystem; import org.apache.hadoop.metrics2.impl.MetricsSystemImpl; import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; +import org.apache.hadoop.util.DiskChecker; +import org.apache.lucene.util.Constants; import org.apache.solr.SolrTestCaseJ4; -import org.apache.solr.cloud.hadoop.HadoopTestUtil; import org.apache.solr.common.util.IOUtils; +import org.apache.solr.common.util.SuppressForbidden; import org.apache.solr.core.DirectoryFactory; -import org.apache.solr.core.HdfsDirectoryFactory; import org.apache.solr.util.HdfsUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static org.apache.lucene.util.LuceneTestCase.random; - -public class HdfsTestUtil extends HadoopTestUtil { +public class HdfsTestUtil { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + private static final String SOLR_HACK_FOR_CLASS_VERIFICATION_FIELD = "SOLR_HACK_FOR_CLASS_VERIFICATION"; private static final String LOGICAL_HOSTNAME = "ha-nn-uri-%d"; @@ -76,18 +85,47 @@ public static MiniDFSCluster setupClass(String dir, boolean haTesting) throws Ex } public static void checkAssumptions() { - HadoopTestUtil.ensureHadoopHomeNotSet(); - HadoopTestUtil.checkHadoopWindows(); - HadoopTestUtil.checkOverriddenHadoopClasses(getModifiedHadoopClasses()); - HadoopTestUtil.checkFastDateFormat(); - HadoopTestUtil.checkGeneratedIdMatches(); + ensureHadoopHomeNotSet(); + checkHadoopWindows(); + checkOverriddenHadoopClasses(); + checkFastDateFormat(); + checkGeneratedIdMatches(); } - protected static List> getModifiedHadoopClasses() { - List> modifiedHadoopClasses = HadoopTestUtil.getModifiedHadoopClasses(); + /** + * If Hadoop home is set via environment variable HADOOP_HOME or Java system property + * hadoop.home.dir, the behavior of test is undefined. Ensure that these are not set + * before starting. It is not possible to easily unset environment variables so better + * to bail out early instead of trying to test. + */ + private static void ensureHadoopHomeNotSet() { + if (System.getenv("HADOOP_HOME") != null) { + SolrTestCaseJ4.fail("Ensure that HADOOP_HOME environment variable is not set."); + } + if (System.getProperty("hadoop.home.dir") != null) { + SolrTestCaseJ4.fail("Ensure that \"hadoop.home.dir\" Java property is not set."); + } + } - modifiedHadoopClasses.add(NameNodeResourceChecker.class); + /** + * Hadoop integration tests fail on Windows without Hadoop NativeIO + */ + private static void checkHadoopWindows() { + SolrTestCaseJ4.assumeTrue("Hadoop does not work on Windows without Hadoop NativeIO", + !Constants.WINDOWS || NativeIO.isAvailable()); + } + /** + * Ensure that the tests are picking up the modified Hadoop classes + */ + private static void checkOverriddenHadoopClasses() { + List> modifiedHadoopClasses = new ArrayList<>(Arrays.asList( + DiskChecker.class, + FileUtil.class, + HardLink.class, + HttpServer2.class, + NameNodeResourceChecker.class, + RawLocalFileSystem.class)); // Dodge weird scope errors from the compiler (SOLR-14417) try { modifiedHadoopClasses.add( @@ -95,9 +133,39 @@ protected static List> getModifiedHadoopClasses() { } catch (Exception e) { throw new RuntimeException(e); } - return modifiedHadoopClasses; + + for (Class clazz : modifiedHadoopClasses) { + try { + SolrTestCaseJ4.assertNotNull("Field on " + clazz.getCanonicalName() + " should not have been null", + clazz.getField(SOLR_HACK_FOR_CLASS_VERIFICATION_FIELD)); + } catch (NoSuchFieldException e) { + SolrTestCaseJ4.fail("Expected to load Solr modified Hadoop class " + clazz.getCanonicalName() + + " , but it was not found."); + } + } + } + + /** + * Checks that commons-lang3 FastDateFormat works with configured locale + */ + @SuppressForbidden(reason="Call FastDateFormat.format same way Hadoop calls it") + private static void checkFastDateFormat() { + try { + FastDateFormat.getInstance().format(System.currentTimeMillis()); + } catch (ArrayIndexOutOfBoundsException e) { + SolrTestCaseJ4.assumeNoException("commons-lang3 FastDateFormat doesn't work with " + + Locale.getDefault().toLanguageTag(), e); + } } + /** + * Hadoop fails to generate locale agnostic ids - Checks that generated string matches + */ + private static void checkGeneratedIdMatches() { + // This is basically how Namenode generates fsimage ids and checks that the fsimage filename matches + SolrTestCaseJ4.assumeTrue("Check that generated id matches regex", + Pattern.matches("(\\d+)", String.format(Locale.getDefault(),"%019d", 0))); + } public static MiniDFSCluster setupClass(String dir, boolean safeModeTesting, boolean haTesting) throws Exception { checkAssumptions(); @@ -121,7 +189,7 @@ public static MiniDFSCluster setupClass(String dir, boolean safeModeTesting, boo // test-files/solr/solr.xml sets this to be 15000. This isn't long enough for HDFS in some cases. System.setProperty("socketTimeout", "90000"); - String blockcacheGlobal = System.getProperty("solr.hdfs.blockcache.global", Boolean.toString(random().nextBoolean())); + String blockcacheGlobal = System.getProperty("solr.hdfs.blockcache.global", Boolean.toString(SolrTestCaseJ4.random().nextBoolean())); System.setProperty("solr.hdfs.blockcache.global", blockcacheGlobal); // Limit memory usage for HDFS tests if(Boolean.parseBoolean(blockcacheGlobal)) { @@ -146,11 +214,11 @@ public static MiniDFSCluster setupClass(String dir, boolean safeModeTesting, boo if (haTesting) dfsCluster.transitionToActive(0); - int rndMode = random().nextInt(3); + int rndMode = SolrTestCaseJ4.random().nextInt(3); if (safeModeTesting && rndMode == 1) { NameNodeAdapter.enterSafeMode(dfsCluster.getNameNode(), false); - int rnd = random().nextInt(10000); + int rnd = SolrTestCaseJ4.random().nextInt(10000); Timer timer = new Timer(); synchronized (TIMERS_LOCK) { if (timers == null) { @@ -166,7 +234,7 @@ public void run() { } }, rnd); } else if (haTesting && rndMode == 2) { - int rnd = random().nextInt(30000); + int rnd = SolrTestCaseJ4.random().nextInt(30000); Timer timer = new Timer(); synchronized (TIMERS_LOCK) { if (timers == null) { diff --git a/solr/modules/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java b/solr/modules/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java index 52485f5b394..773e811a819 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java @@ -28,7 +28,6 @@ import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.protocol.HdfsConstants; -import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.cloud.api.collections.AbstractBackupRepositoryTest; import org.apache.solr.cloud.hdfs.HdfsTestUtil; @@ -39,7 +38,7 @@ import org.junit.AfterClass; import org.junit.BeforeClass; -@LuceneTestCase.SuppressCodecs({"SimpleText"}) // Backups do checksum validation against a footer value not present in 'SimpleText' +@SolrTestCaseJ4.SuppressCodecs({"SimpleText"}) // Backups do checksum validation against a footer value not present in 'SimpleText' @ThreadLeakFilters(defaultFilters = true, filters = { BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) @@ -51,7 +50,7 @@ public class HdfsBackupRepositoryIntegrationTest extends AbstractBackupRepositor @BeforeClass public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(LuceneTestCase.createTempDir().toFile().getAbsolutePath()); + dfsCluster = HdfsTestUtil.setupClass(SolrTestCaseJ4.createTempDir().toFile().getAbsolutePath()); hdfsUri = HdfsTestUtil.getURI(dfsCluster); try { URI uri = new URI(hdfsUri); diff --git a/solr/modules/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java b/solr/modules/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java index ff1cd3e15a4..87da12912c7 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java @@ -24,7 +24,6 @@ import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.lucene.index.BaseTestCheckIndex; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.QuickPatchThreadsFilter; import org.apache.solr.SolrIgnoredThreadsFilter; import org.apache.solr.SolrTestCaseJ4; @@ -67,7 +66,7 @@ public CheckHdfsIndexTest() { @BeforeClass public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(LuceneTestCase.createTempDir().toFile().getAbsolutePath()); + dfsCluster = HdfsTestUtil.setupClass(SolrTestCaseJ4.createTempDir().toFile().getAbsolutePath()); path = new Path(HdfsTestUtil.getURI(dfsCluster) + "/solr/"); } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java index 3b646d09ef7..4dca4679222 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java @@ -16,18 +16,18 @@ */ package org.apache.solr.store.blockcache; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.RemovalCause; +import com.github.benmanes.caffeine.cache.RemovalListener; +import org.apache.solr.SolrTestCase; +import org.junit.Assert; +import org.junit.Test; + import java.util.Arrays; import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; -import com.github.benmanes.caffeine.cache.*; -import org.apache.lucene.util.LuceneTestCase; -import org.apache.solr.SolrTestCase; - -import org.junit.Assert; -import org.junit.Test; - public class BlockCacheTest extends SolrTestCase { @Test @@ -40,7 +40,7 @@ public void testBlockCache() { BlockCache blockCache = new BlockCache(new Metrics(), true, totalMemory, slabSize, blockSize); byte[] buffer = new byte[1024]; - Random random = LuceneTestCase.random(); + Random random = SolrTestCase.random(); byte[] newData = new byte[blockSize]; AtomicLong hitsInCache = new AtomicLong(); AtomicLong missesInCache = new AtomicLong(); @@ -99,7 +99,7 @@ private static byte getByte(long pos) { @Test public void testBlockCacheConcurrent() throws Exception { - Random rnd = LuceneTestCase.random(); + Random rnd = SolrTestCase.random(); final int blocksInTest = 400; // pick something bigger than 256, since that would lead to a slab size of 64 blocks and the bitset locks would consist of a single word. final int blockSize = 64; @@ -233,7 +233,7 @@ static class Val { // Sanity test the underlying concurrent map that BlockCache is using, in the same way that we use it. @Test public void testCacheConcurrent() throws Exception { - Random rnd = LuceneTestCase.random(); + Random rnd = SolrTestCase.random(); // TODO: introduce more randomness in cache size, hit rate, etc final int blocksInTest = 400; @@ -359,7 +359,7 @@ public void test() { // Thread.sleep(1000); // need to wait if executor is used for listener? long cacheSize = cache.estimatedSize(); System.out.println("Done! # of Elements = " + cacheSize + " inserts=" + inserts.get() + " removals=" + removals.get() + " hits=" + hits.get() + " maxObservedSize=" + maxObservedSize); - Assert.assertEquals("cache size different from (inserts - removal)", cacheSize, inserts.get() - removals.get()); + Assert.assertEquals("cache size different from (inserts - removal)", cacheSize, inserts.get() - removals.get()); Assert.assertFalse(failed.get()); } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java index 8c7a8403303..e1484d15063 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java @@ -30,14 +30,12 @@ import org.apache.lucene.store.IndexOutput; import org.apache.lucene.store.MergeInfo; import org.apache.lucene.util.IOUtils; -import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.SolrTestCaseJ4; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 12-Jun-2018 public class BlockDirectoryTest extends SolrTestCaseJ4 { private static class MapperCache implements Cache { @@ -110,11 +108,11 @@ public void releaseResources() {} @Before public void setUp() throws Exception { super.setUp(); - file = LuceneTestCase.createTempDir().toFile(); + file = SolrTestCaseJ4.createTempDir().toFile(); FSDirectory dir = FSDirectory.open(new File(file, "base").toPath()); mapperCache = new MapperCache(); - if (LuceneTestCase.random().nextBoolean()) { + if (SolrTestCaseJ4.random().nextBoolean()) { Metrics metrics = new Metrics(); int blockSize = 8192; int slabSize = blockSize * 16384; @@ -125,7 +123,7 @@ public void setUp() throws Exception { } else { directory = new BlockDirectory("test", dir, mapperCache, null, true, true); } - random = LuceneTestCase.random(); + random = SolrTestCaseJ4.random(); } @After diff --git a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java index 1dadefb965f..93dd870fdd6 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java @@ -19,7 +19,6 @@ import java.math.BigDecimal; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.SolrTestCase; import org.apache.solr.metrics.MetricsMap; @@ -42,8 +41,8 @@ public class BufferStoreTest extends SolrTestCase { public void setup() { metrics = new Metrics(); SolrMetricManager metricManager = new SolrMetricManager(); - String registry = TestUtil.randomSimpleString(LuceneTestCase.random(), 2, 10); - String scope = TestUtil.randomSimpleString(LuceneTestCase.random(), 2, 10); + String registry = TestUtil.randomSimpleString(SolrTestCase.random(), 2, 10); + String scope = TestUtil.randomSimpleString(SolrTestCase.random(), 2, 10); SolrMetricsContext solrMetricsContext = new SolrMetricsContext(metricManager, registry, "foo"); metrics.initializeMetrics(solrMetricsContext, scope); metricsMap = (MetricsMap) ((SolrMetricManager.GaugeWrapper)metricManager.registry(registry).getMetrics().get("CACHE." + scope + ".hdfsBlockCache")).getGauge(); diff --git a/solr/test-framework/build.gradle b/solr/test-framework/build.gradle index d3b66ce2a54..066790fde7e 100644 --- a/solr/test-framework/build.gradle +++ b/solr/test-framework/build.gradle @@ -39,17 +39,5 @@ dependencies { implementation ('com.google.guava:guava') { transitive = false } implementation 'io.dropwizard.metrics:metrics-jetty9' implementation 'commons-cli:commons-cli' - - // used by the hadoop-specific test framework classes - implementation ('org.apache.hadoop:hadoop-common') { transitive = false } - implementation ('org.apache.hadoop:hadoop-auth') { transitive = false } - implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false } - implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false } - implementation ('org.apache.commons:commons-compress') { transitive = false } - implementation ('org.apache.commons:commons-collections4') { transitive = false } - implementation ('org.apache.commons:commons-lang3') { transitive = false } - implementation ('com.sun.jersey:jersey-servlet') { transitive = false } - implementation ('commons-logging:commons-logging') { transitive = false } - } diff --git a/solr/test-framework/src/java/org/apache/hadoop/package-info.java b/solr/test-framework/src/java/org/apache/hadoop/package-info.java deleted file mode 100644 index f10ed779f79..00000000000 --- a/solr/test-framework/src/java/org/apache/hadoop/package-info.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The classes under this package were copied from Apache Hadoop and modified - * to avoid certain issues during tests. The copied classes override the - * Apache Hadoop dependency versions during tests. - * - * HttpServer2 class was copied to avoid Jetty 9.4 dependency issues. Since - * Solr uses Jetty 9.4, Hadoop integration tests needs to use Jetty 9.4 as - * well. The HttpServer2 class should be removed when Hadoop is upgraded to - * 3.3.0 due to HADOOP-16152 upgrading Hadoop to Jetty 9.4. - * - * The classes BlockPoolSlice (HDFS-14251), DiskChecker, FileUtil, HardLink, - * NameNodeResourceChecker, and RawLocalFileSystem were copied to avoid - * issues with running Hadoop integration tests under the Java security - * manager. Many of these classes use org.apache.hadoop.util.Shell - * which shells out to try to do common filesystem checks. - * - * Overtime these classes should be removed as upstream fixes to Apache - * Hadoop are made. When the Apache Hadoop dependency is upgraded in - * Solr, the classes should be compared against that version. - */ -package org.apache.hadoop; - diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java b/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java deleted file mode 100644 index b876dca0e0a..00000000000 --- a/solr/test-framework/src/java/org/apache/solr/cloud/hadoop/HadoopTestUtil.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.solr.cloud.hadoop; - -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; -import java.util.regex.Pattern; - -import org.apache.commons.lang3.time.FastDateFormat; -import org.apache.hadoop.fs.FileUtil; -import org.apache.hadoop.fs.HardLink; -import org.apache.hadoop.fs.RawLocalFileSystem; -import org.apache.hadoop.http.HttpServer2; -import org.apache.hadoop.io.nativeio.NativeIO; - -import org.apache.hadoop.util.DiskChecker; -import org.apache.lucene.util.Constants; -import org.apache.lucene.util.LuceneTestCase; -import org.apache.solr.common.util.SuppressForbidden; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class HadoopTestUtil { - private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - protected static final String SOLR_HACK_FOR_CLASS_VERIFICATION_FIELD = "SOLR_HACK_FOR_CLASS_VERIFICATION"; - - - public static void checkAssumptions() { - ensureHadoopHomeNotSet(); - checkHadoopWindows(); - checkOverriddenHadoopClasses(getModifiedHadoopClasses()); - checkFastDateFormat(); - checkGeneratedIdMatches(); - } - - /** - * If Hadoop home is set via environment variable HADOOP_HOME or Java system property - * hadoop.home.dir, the behavior of test is undefined. Ensure that these are not set - * before starting. It is not possible to easily unset environment variables so better - * to bail out early instead of trying to test. - */ - protected static void ensureHadoopHomeNotSet() { - if (System.getenv("HADOOP_HOME") != null) { - LuceneTestCase.fail("Ensure that HADOOP_HOME environment variable is not set."); - } - if (System.getProperty("hadoop.home.dir") != null) { - LuceneTestCase.fail("Ensure that \"hadoop.home.dir\" Java property is not set."); - } - } - - /** - * Hadoop integration tests fail on Windows without Hadoop NativeIO - */ - protected static void checkHadoopWindows() { - LuceneTestCase.assumeTrue("Hadoop does not work on Windows without Hadoop NativeIO", - !Constants.WINDOWS || NativeIO.isAvailable()); - } - - - protected static List> getModifiedHadoopClasses() { - List> modifiedHadoopClasses = new ArrayList<>(Arrays.asList( - DiskChecker.class, - FileUtil.class, - HardLink.class, - HttpServer2.class, - RawLocalFileSystem.class)); - - return modifiedHadoopClasses; - } - - /** - * Ensure that the tests are picking up the modified Hadoop classes - */ - protected static void checkOverriddenHadoopClasses(List> modifiedHadoopClasses) { - for (Class clazz : modifiedHadoopClasses) { - try { - LuceneTestCase.assertNotNull("Field on " + clazz.getCanonicalName() + " should not have been null", - clazz.getField(SOLR_HACK_FOR_CLASS_VERIFICATION_FIELD)); - } catch (NoSuchFieldException e) { - LuceneTestCase.fail("Expected to load Solr modified Hadoop class " + clazz.getCanonicalName() + - " , but it was not found."); - } - } - } - - /** - * Checks that commons-lang3 FastDateFormat works with configured locale - */ - @SuppressForbidden(reason="Call FastDateFormat.format same way Hadoop calls it") - protected static void checkFastDateFormat() { - try { - FastDateFormat.getInstance().format(System.currentTimeMillis()); - } catch (ArrayIndexOutOfBoundsException e) { - LuceneTestCase.assumeNoException("commons-lang3 FastDateFormat doesn't work with " + - Locale.getDefault().toLanguageTag(), e); - } - } - - /** - * Hadoop fails to generate locale agnostic ids - Checks that generated string matches - */ - protected static void checkGeneratedIdMatches() { - // This is basically how Namenode generates fsimage ids and checks that the fsimage filename matches - LuceneTestCase.assumeTrue("Check that generated id matches regex", - Pattern.matches("(\\d+)", String.format(Locale.getDefault(),"%019d", 0))); - } -} diff --git a/versions.lock b/versions.lock index e16864da365..43e8aa251b5 100644 --- a/versions.lock +++ b/versions.lock @@ -55,7 +55,6 @@ com.lmax:disruptor:3.4.2 (1 constraints: 0b050836) com.pff:java-libpst:0.8.1 (1 constraints: 0b050436) com.rometools:rome:1.12.2 (1 constraints: 3805313b) com.rometools:rome-utils:1.12.2 (1 constraints: 3805313b) -com.sun.jersey:jersey-servlet:1.19 (1 constraints: df04fa30) com.tdunning:t-digest:3.1 (1 constraints: a804212c) commons-cli:commons-cli:1.4 (1 constraints: a9041e2c) commons-codec:commons-codec:1.13 (4 constraints: b633162d) @@ -294,6 +293,7 @@ com.nimbusds:oauth2-oidc-sdk:9.2.3 (1 constraints: c40ec362) com.squareup.okhttp3:mockwebserver:4.9.1 (1 constraints: c40ebd62) com.squareup.okhttp3:okhttp:4.9.1 (1 constraints: 3d0f4f6d) com.squareup.okio:okio:2.8.0 (1 constraints: 540c39fd) +com.sun.jersey:jersey-servlet:1.19 (1 constraints: df04fa30) com.vaadin.external.google:android-json:0.0.20131108.vaadin1 (1 constraints: 34092a9e) io.github.microutils:kotlin-logging:2.0.6 (1 constraints: be0e9d62) io.github.microutils:kotlin-logging-jvm:2.0.6 (1 constraints: 810f877c) From 9703b1f0f8028d4da26c8fe4262fad4e4106c549 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Thu, 27 Jan 2022 14:41:28 -0500 Subject: [PATCH 40/52] Remove DirectoryFactory.LOCK_TYPE_HDFS --- .../src/java/org/apache/solr/core/DirectoryFactory.java | 1 - .../src/test/org/apache/solr/TestSolrCoreProperties.java | 2 +- .../test/org/apache/solr/core/DirectoryFactoriesTest.java | 2 -- .../test/org/apache/solr/core/DirectoryFactoryTest.java | 1 - .../test/org/apache/solr/update/SolrIndexConfigTest.java | 3 +-- .../java/org/apache/solr/core/HdfsDirectoryFactory.java | 8 +++++--- .../src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java | 4 ++-- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java index 1ed575a6bdd..ea278514907 100644 --- a/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java +++ b/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java @@ -68,7 +68,6 @@ public enum DirContext {DEFAULT, META_DATA} public final static String LOCK_TYPE_NATIVE = "native"; public final static String LOCK_TYPE_SINGLE = "single"; public final static String LOCK_TYPE_NONE = "none"; - public final static String LOCK_TYPE_HDFS = "hdfs"; protected volatile CoreContainer coreContainer; diff --git a/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java b/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java index 9a044ff3433..5387f04ce23 100644 --- a/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java +++ b/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java @@ -76,7 +76,7 @@ public static void beforeTest() throws Exception { Properties nodeProperties = new Properties(); // this sets the property for jetty starting SolrDispatchFilter - if (System.getProperty("solr.data.dir") == null && System.getProperty("solr.hdfs.home") == null) { + if (System.getProperty("solr.data.dir") == null) { nodeProperties.setProperty("solr.data.dir", createTempDir().toFile().getCanonicalPath()); } jetty = new JettySolrRunner(homeDir.getAbsolutePath(), nodeProperties, buildJettyConfig("/solr")); diff --git a/solr/core/src/test/org/apache/solr/core/DirectoryFactoriesTest.java b/solr/core/src/test/org/apache/solr/core/DirectoryFactoriesTest.java index b9853f14425..2cc1f188543 100644 --- a/solr/core/src/test/org/apache/solr/core/DirectoryFactoriesTest.java +++ b/solr/core/src/test/org/apache/solr/core/DirectoryFactoriesTest.java @@ -36,8 +36,6 @@ *

*/ public class DirectoryFactoriesTest extends SolrTestCaseJ4 { - - // TODO: what do we need to setup to be able to test HdfsDirectoryFactory? public static final List> ALL_CLASSES = Arrays.asList(MMapDirectoryFactory.class, MockDirectoryFactory.class, diff --git a/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java b/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java index f614bc7ae3c..57d51c8996a 100755 --- a/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java +++ b/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java @@ -64,7 +64,6 @@ public void testLockTypesUnchanged() throws Exception { assertEquals("native", DirectoryFactory.LOCK_TYPE_NATIVE); assertEquals("single", DirectoryFactory.LOCK_TYPE_SINGLE); assertEquals("none", DirectoryFactory.LOCK_TYPE_NONE); - assertEquals("hdfs", DirectoryFactory.LOCK_TYPE_HDFS); } @Test diff --git a/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java b/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java index 93bfdf1d89d..4a40abcd888 100644 --- a/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java +++ b/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java @@ -198,8 +198,7 @@ public void testToMap() throws Exception { assertTrue(DirectoryFactory.LOCK_TYPE_SIMPLE.equals(lockType) || DirectoryFactory.LOCK_TYPE_NATIVE.equals(lockType) || DirectoryFactory.LOCK_TYPE_SINGLE.equals(lockType) || - DirectoryFactory.LOCK_TYPE_NONE.equals(lockType) || - DirectoryFactory.LOCK_TYPE_HDFS.equals(lockType)); + DirectoryFactory.LOCK_TYPE_NONE.equals(lockType)); } ++mSizeExpected; assertTrue(m.get("infoStreamEnabled") instanceof Boolean); diff --git a/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java b/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java index 269ed22e28c..03f26028cbf 100644 --- a/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java +++ b/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java @@ -75,7 +75,9 @@ public class HdfsDirectoryFactory extends CachingDirectoryFactory implements SolrCoreAware, SolrMetricProducer { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - + + public final static String LOCK_TYPE_HDFS = "hdfs"; + public static final String BLOCKCACHE_SLAB_COUNT = "solr.hdfs.blockcache.slab.count"; public static final String BLOCKCACHE_DIRECT_MEMORY_ALLOCATION = "solr.hdfs.blockcache.direct.memory.allocation"; public static final String BLOCKCACHE_ENABLED = "solr.hdfs.blockcache.enabled"; @@ -182,12 +184,12 @@ public void init(NamedList args) { @Override protected LockFactory createLockFactory(String rawLockType) throws IOException { if (null == rawLockType) { - rawLockType = DirectoryFactory.LOCK_TYPE_HDFS; + rawLockType = LOCK_TYPE_HDFS; log.warn("No lockType configured, assuming '{}'.", rawLockType); } final String lockType = rawLockType.toLowerCase(Locale.ROOT).trim(); switch (lockType) { - case DirectoryFactory.LOCK_TYPE_HDFS: + case LOCK_TYPE_HDFS: return HdfsLockFactory.INSTANCE; case DirectoryFactory.LOCK_TYPE_SINGLE: return new SingleInstanceLockFactory(); diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java index 989e8f7050d..1f640e6538d 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java @@ -55,7 +55,7 @@ import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.util.IOUtils; import org.apache.solr.common.util.SuppressForbidden; -import org.apache.solr.core.DirectoryFactory; +import org.apache.solr.core.HdfsDirectoryFactory; import org.apache.solr.util.HdfsUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -183,7 +183,7 @@ public static MiniDFSCluster setupClass(String dir, boolean safeModeTesting, boo System.setProperty("test.build.data", dir + File.separator + "hdfs" + File.separator + "build"); System.setProperty("test.cache.data", dir + File.separator + "hdfs" + File.separator + "cache"); - System.setProperty("solr.lock.type", DirectoryFactory.LOCK_TYPE_HDFS); + System.setProperty("solr.lock.type", HdfsDirectoryFactory.LOCK_TYPE_HDFS); System.setProperty(SolrTestCaseJ4.UPDATELOG_SYSPROP, HdfsDirectoryFactory.HDFS_UPDATE_LOG_CLASS_NAME); // test-files/solr/solr.xml sets this to be 15000. This isn't long enough for HDFS in some cases. From 13d9dfcc71a190146aa2371803c7739f6d391928 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Thu, 27 Jan 2022 15:29:33 -0500 Subject: [PATCH 41/52] Fix HdfsRestartWhileUpdatingTest --- .../apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java index 324c7107875..ae2b5a67912 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java @@ -42,6 +42,9 @@ public class HdfsRestartWhileUpdatingTest extends AbstractRestartWhileUpdatingTe public HdfsRestartWhileUpdatingTest() throws Exception { super(); + + // The constructor runs after setupClass so reset the DirectoryFactory + useFactory("org.apache.solr.core.HdfsDirectoryFactory"); } @BeforeClass From 96322a6d3568791f4374a1e7ad1bd5ff833eb34b Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Thu, 27 Jan 2022 16:14:10 -0500 Subject: [PATCH 42/52] Undo changes to HdfsTlogReplayBufferedWhileIndexingTest --- solr/modules/hdfs/build.gradle | 1 + ...fsTlogReplayBufferedWhileIndexingTest.java | 29 +++++++++++++++++-- ...ogReplayBufferedWhileIndexingTestBase.java | 2 +- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle index db782f0f2d4..082cbb2553a 100644 --- a/solr/modules/hdfs/build.gradle +++ b/solr/modules/hdfs/build.gradle @@ -45,6 +45,7 @@ dependencies { implementation ('com.github.ben-manes.caffeine:caffeine') // Many HDFS tests are using/subclassing test framework classes + testImplementation project(':solr:solrj') testImplementation project(':solr:test-framework') // hadoop dependencies for tests diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java index 48ebb21bee5..4a25cf1e4cf 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java @@ -17,13 +17,17 @@ package org.apache.solr.cloud.hdfs; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering; -import com.carrotsearch.randomizedtesting.annotations.Nightly; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; -import org.apache.lucene.util.LuceneTestCase.Slow; +import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.lucene.util.QuickPatchThreadsFilter; +import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.solr.SolrIgnoredThreadsFilter; import org.apache.solr.cloud.AbstractTlogReplayBufferedWhileIndexingTestBase; import org.apache.solr.util.BadHdfsThreadsFilter; +import org.junit.AfterClass; +import org.junit.BeforeClass; + +import com.carrotsearch.randomizedtesting.annotations.Nightly; +import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; @Slow @Nightly @@ -34,9 +38,28 @@ }) @ThreadLeakLingering(linger = 10) public class HdfsTlogReplayBufferedWhileIndexingTest extends AbstractTlogReplayBufferedWhileIndexingTestBase { + private static MiniDFSCluster dfsCluster; public HdfsTlogReplayBufferedWhileIndexingTest() throws Exception { super(); } + @BeforeClass + public static void setupClass() throws Exception { + dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); + } + + @AfterClass + public static void teardownClass() throws Exception { + try { + HdfsTestUtil.teardownClass(dfsCluster); + } finally { + dfsCluster = null; + } + } + + @Override + protected String getDataDir(String dataDir) { + return HdfsTestUtil.getDataDir(dfsCluster, dataDir); + } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractTlogReplayBufferedWhileIndexingTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractTlogReplayBufferedWhileIndexingTestBase.java index 31e0098a050..16aaf838047 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractTlogReplayBufferedWhileIndexingTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractTlogReplayBufferedWhileIndexingTestBase.java @@ -47,7 +47,7 @@ public static void beforeRestartWhileUpdatingTest() throws Exception { System.setProperty("solr.autoSoftCommit.maxTime", "3000"); TestInjection.updateLogReplayRandomPause = "true:10"; TestInjection.updateRandomPause = "true:10"; - if (System.getProperty("solr.hdfs.home") != null) useFactory("solr.StandardDirectoryFactory"); + useFactory("solr.StandardDirectoryFactory"); } @AfterClass From 3a9abc6ed03a8c8879ce91e4a8c10fd67ed9245e Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Thu, 27 Jan 2022 16:52:18 -0500 Subject: [PATCH 43/52] Ensure hdfs module is packaged --- solr/packaging/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/solr/packaging/build.gradle b/solr/packaging/build.gradle index 370dd4590a3..87951000f90 100644 --- a/solr/packaging/build.gradle +++ b/solr/packaging/build.gradle @@ -53,6 +53,7 @@ dependencies { ":solr:modules:extraction", ":solr:modules:clustering", ":solr:modules:gcs-repository", + ":solr:modules:hdfs", ":solr:modules:jaegertracer-configurator", ":solr:modules:langid", ":solr:modules:ltr", From c34e6a9376c4b3bc681ffd45a7829cf710ba82e5 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Fri, 28 Jan 2022 10:58:29 -0500 Subject: [PATCH 44/52] Fix o.a.hadoop source patterns --- gradle/validation/validate-source-patterns.gradle | 6 ------ .../hdfs/src/test/org/apache/hadoop/fs/FileUtil.java | 2 +- .../hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java | 2 +- .../hdfs/src/test/org/apache/hadoop/http/HttpServer2.java | 2 +- .../hdfs/src/test/org/apache/hadoop/util/DiskChecker.java | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/gradle/validation/validate-source-patterns.gradle b/gradle/validation/validate-source-patterns.gradle index 3aae4b63caf..3dc22f50b0d 100644 --- a/gradle/validation/validate-source-patterns.gradle +++ b/gradle/validation/validate-source-patterns.gradle @@ -111,12 +111,6 @@ configure(project(':solr:core')) { } } -configure(project(':solr:modules:hdfs')) { - project.tasks.withType(ValidateSourcePatternsTask) { - sourceFiles.exclude 'src/test/org/apache/hadoop/**' - } -} - configure(project(':solr:server')) { project.tasks.withType(ValidateSourcePatternsTask) { sourceFiles.exclude '**/configsets/**' diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java index 5045b18c102..e21a5b92c2e 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java @@ -77,7 +77,7 @@ public class FileUtil { public static final Object SOLR_HACK_FOR_CLASS_VERIFICATION = new Object(); // Apparently the Hadoop code expectes upper-case LOG, so... - private static final Logger LOG = LoggerFactory.getLogger(FileUtil.class); //nowarn + private static final Logger LOG = LoggerFactory.getLogger(FileUtil.class); // nowarn_valid_logger /* The error code is defined in winutils to indicate insufficient * privilege to create symbolic links. This value need to keep in diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java b/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java index c75ef8df72d..26c3d3c6f76 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java @@ -82,7 +82,7 @@ public class BlockPoolSlice { public static final Object SOLR_HACK_FOR_CLASS_VERIFICATION = new Object(); // Apparently the Hadoop code expectes upper-case LOG, so... - static final Logger LOG = LoggerFactory.getLogger(BlockPoolSlice.class); //nowarn + static final Logger LOG = LoggerFactory.getLogger(BlockPoolSlice.class); // nowarn_valid_logger private final String bpid; private final FsVolumeImpl volume; // volume to which this BlockPool belongs to diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/http/HttpServer2.java b/solr/modules/hdfs/src/test/org/apache/hadoop/http/HttpServer2.java index 3dcbb9f10b4..d9da3f5491d 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/http/HttpServer2.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/http/HttpServer2.java @@ -119,7 +119,7 @@ public final class HttpServer2 implements FilterContainer { public static final Object SOLR_HACK_FOR_CLASS_VERIFICATION = new Object(); // Apparently the Hadoop code expectes upper-case LOG, so... - public static final Logger LOG = LoggerFactory.getLogger(HttpServer2.class); //nowarn + public static final Logger LOG = LoggerFactory.getLogger(HttpServer2.class); // nowarn_valid_logger public static final String HTTP_SCHEME = "http"; public static final String HTTPS_SCHEME = "https"; diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java b/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java index 6699ce13108..98127b057fb 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java @@ -45,7 +45,7 @@ public class DiskChecker { public static final Object SOLR_HACK_FOR_CLASS_VERIFICATION = new Object(); - public static final Logger log = LoggerFactory.getLogger(DiskChecker.class); + public static final Logger log = LoggerFactory.getLogger(DiskChecker.class); // nowarn_valid_logger public static class DiskErrorException extends IOException { public DiskErrorException(String msg) { From 9675773a7e4ebdd2a794a021db187576571d2db8 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Fri, 28 Jan 2022 11:01:27 -0500 Subject: [PATCH 45/52] Remove HDFS contrib in docs --- solr/solr-ref-guide/src/solr-on-hdfs.adoc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/solr/solr-ref-guide/src/solr-on-hdfs.adoc b/solr/solr-ref-guide/src/solr-on-hdfs.adoc index 8e274a3c252..8845cb6d500 100644 --- a/solr/solr-ref-guide/src/solr-on-hdfs.adoc +++ b/solr/solr-ref-guide/src/solr-on-hdfs.adoc @@ -17,10 +17,7 @@ // under the License. -Solr has support for writing and reading its index and transaction log files to the HDFS distributed filesystem. - -Starting from 9.0, this functionality has been moved from Solr Core to the HDFS contrib module. - +The Solr HDFS module has support for writing and reading its index and transaction log files to the HDFS distributed filesystem. This does not use Hadoop MapReduce to process Solr data, rather it only uses the HDFS filesystem for index and transaction log file storage. From 32aaf75ede6e24e7367e044490cc970a505c468f Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Fri, 28 Jan 2022 11:33:44 -0500 Subject: [PATCH 46/52] Make sure to consume the confDir in HdfsDirectoryFactory --- solr/core/src/java/org/apache/solr/update/UpdateHandler.java | 2 +- .../src/java/org/apache/solr/core/HdfsDirectoryFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java index df70db796d2..f7a62b51512 100644 --- a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java +++ b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java @@ -103,7 +103,7 @@ protected void callPostOptimizeCallbacks() { public UpdateHandler(SolrCore core) { this(core, null); } - + public UpdateHandler(SolrCore core, UpdateLog updateLog) { this.core=core; idField = core.getLatestSchema().getUniqueKeyField(); diff --git a/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java b/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java index 03f26028cbf..b88eb3a733c 100644 --- a/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java +++ b/solr/modules/hdfs/src/java/org/apache/solr/core/HdfsDirectoryFactory.java @@ -638,7 +638,7 @@ public void move(Directory fromDir, Directory toDir, String fileName, IOContext @Override public UpdateLog newDefaultUpdateLog() { - return new HdfsUpdateLog(); + return new HdfsUpdateLog(getConfDir()); } } From 856ca1c2f33027292fb67e89a5dcc83a4cb318b5 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Fri, 28 Jan 2022 11:37:38 -0500 Subject: [PATCH 47/52] Add comment about render-javadoc --- gradle/documentation/render-javadoc.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradle index 7f33a240013..26a1bc8da3a 100644 --- a/gradle/documentation/render-javadoc.gradle +++ b/gradle/documentation/render-javadoc.gradle @@ -164,9 +164,9 @@ configure(project(":solr:test-framework")) { } configure(project(":solr:modules:hdfs")) { - project.tasks.withType(RenderJavadocTask) { + project.tasks.withType(RenderJavadocTask) { + // TODO: clean up split packages javadocMissingIgnore = [ - "org.apache.solr", "org.apache.solr.core", "org.apache.solr.core.backup.repository", "org.apache.solr.update", From bb216a74511e8a13787556ff94da35332ca71692 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Fri, 28 Jan 2022 11:54:31 -0500 Subject: [PATCH 48/52] Minor edits to documentation --- solr/modules/hdfs/README.md | 2 -- solr/solr-ref-guide/src/backup-restore.adoc | 4 +--- solr/solr-ref-guide/src/solr-on-hdfs.adoc | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/solr/modules/hdfs/README.md b/solr/modules/hdfs/README.md index ed271e5a02c..86fcb6be74f 100644 --- a/solr/modules/hdfs/README.md +++ b/solr/modules/hdfs/README.md @@ -26,6 +26,4 @@ To execute the module tests: Usage ----- -To use the module, it needs to be placed to the Solr web application classpath (for example by symlinking it to the WEB-INF/lib directory.) - Please refer to the 'Running Solr on HDFS' section of the reference guide: https://solr.apache.org/guide/running-solr-on-hdfs.html diff --git a/solr/solr-ref-guide/src/backup-restore.adoc b/solr/solr-ref-guide/src/backup-restore.adoc index 22d0ccfb0ca..9a5117c0ac4 100644 --- a/solr/solr-ref-guide/src/backup-restore.adoc +++ b/solr/solr-ref-guide/src/backup-restore.adoc @@ -401,9 +401,7 @@ An example configuration using this property can be found below. === HdfsBackupRepository -Stores and retrieves backup files from HDFS directories. - -WARNING: HdfsBackupRepository is deprecated and may be removed or relocated in a subsequent version of Solr. +Stores and retrieves backup files from HDFS directories. This plugin must first be <> before using. HdfsBackupRepository accepts the following configuration options: diff --git a/solr/solr-ref-guide/src/solr-on-hdfs.adoc b/solr/solr-ref-guide/src/solr-on-hdfs.adoc index 8845cb6d500..f5b488c3d61 100644 --- a/solr/solr-ref-guide/src/solr-on-hdfs.adoc +++ b/solr/solr-ref-guide/src/solr-on-hdfs.adoc @@ -17,7 +17,7 @@ // under the License. -The Solr HDFS module has support for writing and reading its index and transaction log files to the HDFS distributed filesystem. +The Solr HDFS module has support for writing and reading its index and transaction log files to the HDFS distributed filesystem. This plugin must first be <> before using. This does not use Hadoop MapReduce to process Solr data, rather it only uses the HDFS filesystem for index and transaction log file storage. From e75d6ac1bc6c6ee7777f23ea0b2b8877928b86e6 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Fri, 28 Jan 2022 14:15:28 -0500 Subject: [PATCH 49/52] Undo some test file changes to make diff smaller --- .../cloud/ChaosMonkeyNothingIsSafeTest.java | 6 --- .../hdfs/HdfsBasicDistributedZkTest.java | 7 ++- .../HdfsChaosMonkeyNothingIsSafeTest.java | 14 +++--- .../hdfs/HdfsRestartWhileUpdatingTest.java | 2 - .../solr/cloud/hdfs/HdfsSyncSliceTest.java | 1 - .../hdfs/HdfsUnloadDistributedZkTest.java | 2 - .../HdfsBackupRepositoryIntegrationTest.java | 8 ++-- .../solr/index/hdfs/CheckHdfsIndexTest.java | 2 +- .../solr/store/blockcache/BlockCacheTest.java | 30 ++++++------ .../store/blockcache/BlockDirectoryTest.java | 48 +++++++++---------- .../store/blockcache/BufferStoreTest.java | 11 ++--- ...tractChaosMonkeyNothingIsSafeTestBase.java | 12 ++--- 12 files changed, 65 insertions(+), 78 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java index 2815e90d842..6fd58502705 100644 --- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java @@ -28,10 +28,4 @@ @Slow @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776") public class ChaosMonkeyNothingIsSafeTest extends AbstractChaosMonkeyNothingIsSafeTestBase { - private static final String DIRECTORY_FACTORY = "solr.StandardDirectoryFactory"; - - @Override - protected String getDirectoryFactory() { - return DIRECTORY_FACTORY; - } } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java index 43b025ab50b..74571da0422 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java @@ -27,10 +27,10 @@ import org.apache.solr.util.BadHdfsThreadsFilter; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.Test; import com.carrotsearch.randomizedtesting.annotations.Nightly; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; -import org.junit.Test; @Slow @Nightly @@ -42,7 +42,7 @@ @ThreadLeakLingering(linger = 10) public class HdfsBasicDistributedZkTest extends AbstractBasicDistributedZkTestBase { private static MiniDFSCluster dfsCluster; - + @BeforeClass public static void setupClass() throws Exception { dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); @@ -61,7 +61,7 @@ public static void teardownClass() throws Exception { dfsCluster = null; } } - + @Override protected String getDataDir(String dataDir) throws IOException { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); @@ -73,5 +73,4 @@ protected String getDataDir(String dataDir) throws IOException { public void test() throws Exception { super.test(); } - } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java index 67f44c49bce..0850d6a2c0e 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java @@ -41,7 +41,6 @@ @ThreadLeakLingering(linger = 10) public class HdfsChaosMonkeyNothingIsSafeTest extends AbstractChaosMonkeyNothingIsSafeTestBase { private static MiniDFSCluster dfsCluster; - private static final String DIRECTORY_FACTORY = "org.apache.solr.core.HdfsDirectoryFactory"; @BeforeClass public static void setupClass() throws Exception { @@ -60,12 +59,15 @@ public static void teardownClass() throws Exception { } @Override - protected String getDataDir(String dataDir) throws IOException { - return HdfsTestUtil.getDataDir(dfsCluster, dataDir); - } + public void distribSetUp() throws Exception { + super.distribSetUp(); - protected String getDirectoryFactory() { - return DIRECTORY_FACTORY; + // super class may hard code directory + useFactory("org.apache.solr.core.HdfsDirectoryFactory"); } + @Override + protected String getDataDir(String dataDir) throws IOException { + return HdfsTestUtil.getDataDir(dfsCluster, dataDir); + } } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java index ae2b5a67912..d90db0bd4d7 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java @@ -65,6 +65,4 @@ public static void teardownClass() throws Exception { protected String getDataDir(String dataDir) { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } - - } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java index bdad188cde0..68f4ee0137b 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java @@ -60,5 +60,4 @@ public static void teardownClass() throws Exception { protected String getDataDir(String dataDir) throws IOException { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } - } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java index 45f560cb486..1711ed17c65 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java @@ -58,6 +58,4 @@ public static void teardownClass() throws Exception { protected String getDataDir(String dataDir) { return HdfsTestUtil.getDataDir(dfsCluster, dataDir); } - - } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java b/solr/modules/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java index 773e811a819..a395435f0d8 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/core/backup/repository/HdfsBackupRepositoryIntegrationTest.java @@ -28,7 +28,7 @@ import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.protocol.HdfsConstants; -import org.apache.solr.SolrTestCaseJ4; +import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.cloud.api.collections.AbstractBackupRepositoryTest; import org.apache.solr.cloud.hdfs.HdfsTestUtil; import org.apache.solr.common.util.IOUtils; @@ -38,7 +38,7 @@ import org.junit.AfterClass; import org.junit.BeforeClass; -@SolrTestCaseJ4.SuppressCodecs({"SimpleText"}) // Backups do checksum validation against a footer value not present in 'SimpleText' +@LuceneTestCase.SuppressCodecs({"SimpleText"}) // Backups do checksum validation against a footer value not present in 'SimpleText' @ThreadLeakFilters(defaultFilters = true, filters = { BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) @@ -50,7 +50,7 @@ public class HdfsBackupRepositoryIntegrationTest extends AbstractBackupRepositor @BeforeClass public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(SolrTestCaseJ4.createTempDir().toFile().getAbsolutePath()); + dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); hdfsUri = HdfsTestUtil.getURI(dfsCluster); try { URI uri = new URI(hdfsUri); @@ -76,7 +76,7 @@ public static void setupClass() throws Exception { System.setProperty("solr.hdfs.default.backup.path", "/backup"); System.setProperty("solr.hdfs.home", hdfsUri + "/solr"); - SolrTestCaseJ4.useFactory("solr.StandardDirectoryFactory"); + useFactory("solr.StandardDirectoryFactory"); } @AfterClass diff --git a/solr/modules/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java b/solr/modules/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java index 87da12912c7..28e82ca6edf 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java @@ -66,7 +66,7 @@ public CheckHdfsIndexTest() { @BeforeClass public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(SolrTestCaseJ4.createTempDir().toFile().getAbsolutePath()); + dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); path = new Path(HdfsTestUtil.getURI(dfsCluster) + "/solr/"); } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java index 4dca4679222..bb2963eda35 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java @@ -16,18 +16,16 @@ */ package org.apache.solr.store.blockcache; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.RemovalCause; -import com.github.benmanes.caffeine.cache.RemovalListener; -import org.apache.solr.SolrTestCase; -import org.junit.Assert; -import org.junit.Test; - import java.util.Arrays; import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; +import com.github.benmanes.caffeine.cache.*; +import org.apache.solr.SolrTestCase; + +import org.junit.Test; + public class BlockCacheTest extends SolrTestCase { @Test @@ -40,7 +38,7 @@ public void testBlockCache() { BlockCache blockCache = new BlockCache(new Metrics(), true, totalMemory, slabSize, blockSize); byte[] buffer = new byte[1024]; - Random random = SolrTestCase.random(); + Random random = random(); byte[] newData = new byte[blockSize]; AtomicLong hitsInCache = new AtomicLong(); AtomicLong missesInCache = new AtomicLong(); @@ -72,7 +70,7 @@ public void testBlockCache() { long t3 = System.nanoTime(); if (blockCache.fetch(blockCacheKey, buffer)) { fetchTime += (System.nanoTime() - t3); - Assert.assertTrue("buffer content differs", Arrays.equals(testData, buffer)); + assertTrue("buffer content differs", Arrays.equals(testData, buffer)); } } System.out.println("Cache Hits = " + hitsInCache.get()); @@ -99,7 +97,7 @@ private static byte getByte(long pos) { @Test public void testBlockCacheConcurrent() throws Exception { - Random rnd = SolrTestCase.random(); + Random rnd = random(); final int blocksInTest = 400; // pick something bigger than 256, since that would lead to a slab size of 64 blocks and the bitset locks would consist of a single word. final int blockSize = 64; @@ -221,7 +219,7 @@ public void test() { System.out.println("Cache Store Fails = " + storeFails.get()); System.out.println("Blocks with Errors = " + validateFails.get()); - Assert.assertFalse("cached bytes differ from expected", failed.get()); + assertFalse("cached bytes differ from expected", failed.get()); } @@ -233,7 +231,7 @@ static class Val { // Sanity test the underlying concurrent map that BlockCache is using, in the same way that we use it. @Test public void testCacheConcurrent() throws Exception { - Random rnd = SolrTestCase.random(); + Random rnd = random(); // TODO: introduce more randomness in cache size, hit rate, etc final int blocksInTest = 400; @@ -259,7 +257,7 @@ public void testCacheConcurrent() throws Exception { return; } } - Assert.assertEquals("cache key differs from value's key", k, (Long) v.key); + assertEquals("cache key differs from value's key", k, (Long) v.key); if (!v.live.compareAndSet(true, false)) { throw new RuntimeException("listener called more than once! k=" + k + " v=" + v + " removalCause=" + removalCause); // return; // use this variant if listeners may be called more than once @@ -329,7 +327,7 @@ public void test() { Val v = cache.getIfPresent(k); if (v != null) { hits.incrementAndGet(); - Assert.assertEquals("cache key differs from value's key", k, (Long) v.key); + assertEquals("cache key differs from value's key", k, (Long) v.key); } if (v == null || odds(updateAnywayOdds)) { @@ -359,8 +357,8 @@ public void test() { // Thread.sleep(1000); // need to wait if executor is used for listener? long cacheSize = cache.estimatedSize(); System.out.println("Done! # of Elements = " + cacheSize + " inserts=" + inserts.get() + " removals=" + removals.get() + " hits=" + hits.get() + " maxObservedSize=" + maxObservedSize); - Assert.assertEquals("cache size different from (inserts - removal)", cacheSize, inserts.get() - removals.get()); - Assert.assertFalse(failed.get()); + assertEquals("cache size different from (inserts - removal)", cacheSize, inserts.get() - removals.get()); + assertFalse(failed.get()); } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java index e1484d15063..7bcb445940f 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BlockDirectoryTest.java @@ -32,10 +32,10 @@ import org.apache.lucene.util.IOUtils; import org.apache.solr.SolrTestCaseJ4; import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; +// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 12-Jun-2018 public class BlockDirectoryTest extends SolrTestCaseJ4 { private static class MapperCache implements Cache { @@ -108,11 +108,11 @@ public void releaseResources() {} @Before public void setUp() throws Exception { super.setUp(); - file = SolrTestCaseJ4.createTempDir().toFile(); + file = createTempDir().toFile(); FSDirectory dir = FSDirectory.open(new File(file, "base").toPath()); mapperCache = new MapperCache(); - if (SolrTestCaseJ4.random().nextBoolean()) { + if (random().nextBoolean()) { Metrics metrics = new Metrics(); int blockSize = 8192; int slabSize = blockSize * 16384; @@ -123,9 +123,9 @@ public void setUp() throws Exception { } else { directory = new BlockDirectory("test", dir, mapperCache, null, true, true); } - random = SolrTestCaseJ4.random(); + random = random(); } - + @After public void tearDown() throws Exception { super.tearDown(); @@ -142,7 +142,7 @@ public void testEOF() throws IOException { createFile(name, fsDir, directory); long fsLength = fsDir.fileLength(name); long hdfsLength = directory.fileLength(name); - Assert.assertEquals(fsLength, hdfsLength); + assertEquals(fsLength, hdfsLength); testEof(name, fsDir, fsLength); testEof(name, directory, hdfsLength); fsDir.close(); @@ -151,10 +151,10 @@ public void testEOF() throws IOException { private void testEof(String name, Directory directory, long length) throws IOException { IndexInput input = directory.openInput(name, new IOContext()); try { - input.seek(length); + input.seek(length); try { input.readByte(); - Assert.fail("should throw eof"); + fail("should throw eof"); } catch (IOException e) { } } finally { @@ -176,7 +176,7 @@ public void testRandomAccessWrites() throws IOException { } } catch (Exception e) { e.printStackTrace(); - Assert.fail("Test failed on pass [" + i + "]"); + fail("Test failed on pass [" + i + "]"); } long t2 = System.nanoTime(); System.out.println("Total time is " + ((t2 - t1)/1000000) + "ms"); @@ -195,7 +195,7 @@ private void assertInputsEquals(String name, Directory fsDir, Directory hdfs) th int reads = random.nextInt(MAX_NUMBER_OF_READS); IndexInput fsInput = fsDir.openInput(name, new IOContext()); IndexInput hdfsInput = hdfs.openInput(name, new IOContext()); - Assert.assertEquals(fsInput.length(), hdfsInput.length()); + assertEquals(fsInput.length(), hdfsInput.length()); int fileLength = (int) fsInput.length(); for (int i = 0; i < reads; i++) { int rnd; @@ -209,21 +209,21 @@ private void assertInputsEquals(String name, Directory fsDir, Directory hdfs) th byte[] hdfsBuf = new byte[fsBuf.length]; int offset = random.nextInt(fsBuf.length); int length = random.nextInt(fsBuf.length - offset); - + int pos; if (fileLength == 0) { pos = 0; } else { pos = random.nextInt(fileLength - length); } - + fsInput.seek(pos); fsInput.readBytes(fsBuf, offset, length); hdfsInput.seek(pos); hdfsInput.readBytes(hdfsBuf, offset, length); for (int f = offset; f < length; f++) { if (fsBuf[f] != hdfsBuf[f]) { - Assert.fail("read [" + i + "]"); + fail("read [" + i + "]"); } } } @@ -270,26 +270,26 @@ public void ensureCacheConfigurable() throws Exception { IOContext mergeContext = new IOContext(new MergeInfo(1,1,false,1)); BlockDirectory d = directory; - Assert.assertTrue(d.useReadCache("", IOContext.DEFAULT)); + assertTrue(d.useReadCache("", IOContext.DEFAULT)); if (d.getCache() instanceof MapperCache) { - Assert.assertTrue(d.useWriteCache("", IOContext.DEFAULT)); + assertTrue(d.useWriteCache("", IOContext.DEFAULT)); } else { - Assert.assertFalse(d.useWriteCache("", IOContext.DEFAULT)); + assertFalse(d.useWriteCache("", IOContext.DEFAULT)); } - Assert.assertFalse(d.useWriteCache("", mergeContext)); + assertFalse(d.useWriteCache("", mergeContext)); d = new BlockDirectory("test", directory, mapperCache, null, true, false); - Assert.assertTrue(d.useReadCache("", IOContext.DEFAULT)); - Assert.assertFalse(d.useWriteCache("", IOContext.DEFAULT)); - Assert.assertFalse(d.useWriteCache("", mergeContext)); + assertTrue(d.useReadCache("", IOContext.DEFAULT)); + assertFalse(d.useWriteCache("", IOContext.DEFAULT)); + assertFalse(d.useWriteCache("", mergeContext)); d = new BlockDirectory("test", directory, mapperCache, null, false, true); - Assert.assertFalse(d.useReadCache("", IOContext.DEFAULT)); + assertFalse(d.useReadCache("", IOContext.DEFAULT)); if (d.getCache() instanceof MapperCache) { - Assert.assertTrue(d.useWriteCache("", IOContext.DEFAULT)); + assertTrue(d.useWriteCache("", IOContext.DEFAULT)); } else { - Assert.assertFalse(d.useWriteCache("", IOContext.DEFAULT)); + assertFalse(d.useWriteCache("", IOContext.DEFAULT)); } - Assert.assertFalse(d.useWriteCache("", mergeContext)); + assertFalse(d.useWriteCache("", mergeContext)); } } diff --git a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java index 93dd870fdd6..f822f3f2df1 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java @@ -25,7 +25,6 @@ import org.apache.solr.metrics.SolrMetricManager; import org.apache.solr.metrics.SolrMetricsContext; import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -41,8 +40,8 @@ public class BufferStoreTest extends SolrTestCase { public void setup() { metrics = new Metrics(); SolrMetricManager metricManager = new SolrMetricManager(); - String registry = TestUtil.randomSimpleString(SolrTestCase.random(), 2, 10); - String scope = TestUtil.randomSimpleString(SolrTestCase.random(), 2, 10); + String registry = TestUtil.randomSimpleString(random(), 2, 10); + String scope = TestUtil.randomSimpleString(random(), 2, 10); SolrMetricsContext solrMetricsContext = new SolrMetricsContext(metricManager, registry, "foo"); metrics.initializeMetrics(solrMetricsContext, scope); metricsMap = (MetricsMap) ((SolrMetricManager.GaugeWrapper)metricManager.registry(registry).getMetrics().get("CACHE." + scope + ".hdfsBlockCache")).getGauge(); @@ -54,7 +53,7 @@ public void setup() { public void clearBufferStores() { BufferStore.clearBufferStores(); } - + @Test public void testBufferTakePut() { byte[] b1 = store.takeBuffer(blockSize); @@ -97,9 +96,9 @@ private void assertRawMetricCounts(int allocated, int lost) { private void assertGaugeMetricsChanged(boolean allocated, boolean lost) { Map stats = metricsMap.getValue(); - Assert.assertEquals("Buffer allocation metric not updating correctly.", + assertEquals("Buffer allocation metric not updating correctly.", allocated, isMetricPositive(stats, "buffercache.allocations")); - Assert.assertEquals("Buffer lost metric not updating correctly.", + assertEquals("Buffer lost metric not updating correctly.", lost, isMetricPositive(stats, "buffercache.lost")); } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java index 7e843185f5c..48facc9aa91 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java @@ -39,13 +39,13 @@ public abstract class AbstractChaosMonkeyNothingIsSafeTestBase extends AbstractF @BeforeClass public static void beforeSuperClass() { - schemaString = "schema15.xml"; // we need a string id + schemaString = "schema15.xml"; // we need a string id System.setProperty("solr.autoCommit.maxTime", "15000"); System.clearProperty("solr.httpclient.retries"); System.clearProperty("solr.retries.on.forward"); System.clearProperty("solr.retries.to.followers"); - setErrorHook(); -} + setErrorHook(); + } @AfterClass public static void afterSuperClass() { @@ -53,6 +53,8 @@ public static void afterSuperClass() { clearErrorHook(); } + + @Override protected void destroyServers() throws Exception { @@ -76,14 +78,12 @@ public RandVal[] getRandValues() { return randVals; } - protected abstract String getDirectoryFactory(); - @Override public void distribSetUp() throws Exception { super.distribSetUp(); // can help to hide this when testing and looking at logs //ignoreException("shard update error"); - useFactory(getDirectoryFactory()); + useFactory("solr.StandardDirectoryFactory"); } @Override From 843fc717695608b2f41dc2c8e4f8417e5a183344 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Fri, 28 Jan 2022 22:23:06 +0100 Subject: [PATCH 50/52] HDFS module: use gradle variables to specify core test resources location instead of relative paths --- solr/modules/hdfs/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle index 082cbb2553a..5b164f51e83 100644 --- a/solr/modules/hdfs/build.gradle +++ b/solr/modules/hdfs/build.gradle @@ -82,7 +82,7 @@ dependencies { // schemas and SolrConfigs. This can be improved later by making the test classes // load the resources from core directories directly. task copySolrCoreTestResources(type: Copy) { - from('../../core/src/test-files') { + from(project(':solr:core').sourceSets.test.resources.srcDirs) { exclude '**/*.java' } into sourceSets.test.output.resourcesDir From ae67b144357113a9ee80ab981ee1279242c53242 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Fri, 28 Jan 2022 15:38:32 -0500 Subject: [PATCH 51/52] Cleanup more dependencies --- solr/core/build.gradle | 24 +++++++++--------------- solr/modules/hdfs/build.gradle | 8 +++++++- versions.lock | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/solr/core/build.gradle b/solr/core/build.gradle index b413689142a..99105f451c9 100644 --- a/solr/core/build.gradle +++ b/solr/core/build.gradle @@ -66,7 +66,6 @@ dependencies { implementation 'commons-io:commons-io' implementation 'com.carrotsearch:hppc' implementation 'org.apache.commons:commons-collections4' - runtimeOnly 'commons-collections:commons-collections' // for Hadoop and...? implementation('com.github.ben-manes.caffeine:caffeine') { transitive = false } @@ -136,22 +135,17 @@ dependencies { implementation ('org.apache.calcite:calcite-linq4j') { transitive = false } implementation ('org.apache.calcite.avatica:avatica-core') { transitive = false } - // Hadoop; general stuff - implementation ('org.apache.hadoop:hadoop-common') { transitive = false } // too many to ignore - implementation ('org.apache.hadoop:hadoop-annotations') - runtimeOnly 'org.apache.htrace:htrace-core4' // note: removed in Hadoop 3.3.2 - runtimeOnly "org.apache.commons:commons-configuration2" - testImplementation ('org.apache.hadoop:hadoop-common::tests') { transitive = false } - // Hadoop Test hacks for Java Security Manager -- SOLR-14033 - testImplementation 'org.apache.commons:commons-compress' - testImplementation ('com.sun.jersey:jersey-servlet') { transitive = false } - - // Hadoop auth framework + implementation ('org.apache.hadoop:hadoop-annotations') implementation ('org.apache.hadoop:hadoop-auth') { transitive = false } - runtimeOnly 'com.google.re2j:re2j' // transitive of hadoop-common; used by Kerberos auth - runtimeOnly ('org.apache.kerby:kerb-core') - runtimeOnly ('org.apache.kerby:kerb-util') + implementation ('org.apache.hadoop:hadoop-common') { transitive = false } + // transitive of hadoop-common; used by Kerberos auth + runtimeOnly 'commons-collections:commons-collections' + runtimeOnly 'com.google.re2j:re2j' + runtimeOnly 'org.apache.commons:commons-configuration2' + runtimeOnly 'org.apache.htrace:htrace-core4' // note: removed in Hadoop 3.3.2 + runtimeOnly 'org.apache.kerby:kerb-core' + runtimeOnly 'org.apache.kerby:kerb-util' // Hadoop MiniKdc Dependencies (for Kerberos auth tests) testImplementation ('org.apache.hadoop:hadoop-minikdc', { diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle index 5b164f51e83..515d238205f 100644 --- a/solr/modules/hdfs/build.gradle +++ b/solr/modules/hdfs/build.gradle @@ -35,8 +35,14 @@ dependencies { implementation ('org.apache.hadoop:hadoop-annotations') { transitive = false } implementation ('org.apache.hadoop:hadoop-auth') { transitive = false } implementation ('org.apache.hadoop:hadoop-common') { transitive = false } + // transitive of hadoop-common; used by HDFS + runtimeOnly 'commons-collections:commons-collections' + runtimeOnly 'com.google.re2j:re2j' + runtimeOnly 'org.apache.commons:commons-configuration2' + runtimeOnly 'org.apache.htrace:htrace-core4' // note: removed in Hadoop 3.3.2 + runtimeOnly 'org.apache.kerby:kerb-core' + runtimeOnly 'org.apache.kerby:kerb-util' implementation ('org.apache.hadoop:hadoop-hdfs-client') { transitive = false } - implementation ('org.apache.hadoop:hadoop-hdfs') { transitive = false } // Guava implements the VisibleForTesting annotations implementation ('com.google.guava:guava') { transitive = false } diff --git a/versions.lock b/versions.lock index 43e8aa251b5..064bff22d96 100644 --- a/versions.lock +++ b/versions.lock @@ -113,7 +113,6 @@ org.apache.curator:curator-recipes:2.13.0 (1 constraints: 3805383b) org.apache.hadoop:hadoop-annotations:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-auth:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-common:3.2.0 (1 constraints: 07050036) -org.apache.hadoop:hadoop-hdfs:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-hdfs-client:3.2.0 (1 constraints: 07050036) org.apache.htrace:htrace-core4:4.1.0-incubating (1 constraints: 58090086) org.apache.httpcomponents:httpclient:4.5.13 (8 constraints: 237a2994) @@ -310,6 +309,7 @@ net.bytebuddy:byte-buddy:1.10.20 (2 constraints: 7c10a9d0) net.minidev:accessors-smart:1.2 (1 constraints: e60926a4) net.minidev:json-smart:2.3 (1 constraints: ae0de552) no.nav.security:mock-oauth2-server:0.3.3 (1 constraints: 0805f735) +org.apache.hadoop:hadoop-hdfs:3.2.0 (1 constraints: 07050036) org.apache.hadoop:hadoop-minikdc:3.2.0 (1 constraints: 07050036) org.apache.kerby:kerb-admin:1.0.1 (1 constraints: 840d892f) org.apache.kerby:kerb-client:1.0.1 (1 constraints: 840d892f) From 2a414d2c536d32a495eb3f4d2f48113c6fa868f0 Mon Sep 17 00:00:00 2001 From: Istvan Farkas Date: Fri, 28 Jan 2022 23:48:15 +0100 Subject: [PATCH 52/52] HDFS module: updated changelog and solr on hdfs documentation --- .../src/major-changes-in-solr-9.adoc | 6 ++++-- solr/solr-ref-guide/src/solr-on-hdfs.adoc | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc index 66f842d7a10..a08b7c1a6ce 100644 --- a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc +++ b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc @@ -107,6 +107,9 @@ The `response` field is now a map, containing information about the backup (`sta * SOLR-15884: In Backup request responses, the `response` key now uses a map to return information instead of a list. This is only applicable for users returning information in JSON format, which is the default behavior. +* SOLR-14660: HDFS storage support has been moved to a module. Existing Solr configurations need no HDFS-related +changes, however the module needs to be installed. Please refer to the readme of the module. + == New Features & Enhancements * Replica placement plugins @@ -243,6 +246,7 @@ Instead, these libraries will be included with all other module dependencies in * SOLR-15954: The prometheus-exporter is no longer packaged as a Solr module. It can be found under `solr/prometheus-exporter/`. + == Deprecations & Removed Features The following list of features have been permanently removed from Solr: @@ -269,8 +273,6 @@ Users have to modify their existing configurations to use CaffeineCache instead. * CDCR -* Storing indexes and backups in HDFS - * Solr's blob store ** SOLR-14654: plugins cannot be loaded using "runtimeLib=true" option. Use the package manager to use and load plugins diff --git a/solr/solr-ref-guide/src/solr-on-hdfs.adoc b/solr/solr-ref-guide/src/solr-on-hdfs.adoc index f5b488c3d61..7dc0513a0b4 100644 --- a/solr/solr-ref-guide/src/solr-on-hdfs.adoc +++ b/solr/solr-ref-guide/src/solr-on-hdfs.adoc @@ -17,7 +17,7 @@ // under the License. -The Solr HDFS module has support for writing and reading its index and transaction log files to the HDFS distributed filesystem. This plugin must first be <> before using. +The Solr HDFS module has support for writing and reading its index and transaction log files to the HDFS distributed filesystem. This plugin must first be <> before using. This module needs to be installed as lib, it is planned to evolve to a Solr package in a later release. This does not use Hadoop MapReduce to process Solr data, rather it only uses the HDFS filesystem for index and transaction log file storage. @@ -243,6 +243,19 @@ s|Required |Default: none + The Kerberos principal that Solr should use to authenticate to secure Hadoop; the format of a typical Kerberos V5 principal is: `primary/instance@realm`. +== Update Log settings +When using HDFS to store Solr indexes, it is recommended to also store the transaction logs on HDFS. This can be done by using the `solr.HdfsUpdateLog` update log hander class. +The solrconfig.xml is often used to define an update log handler class name either using a variable reference or direct specification, for example: + +[source,xml] +---- + +---- + +When specifying a class like this, it needs to be ensured that the correct class name is specified. +When no class name is specified, Solr automatically picks the correct update log handler class `solr.HdfsUpdateLog` for collections which are configured to use the HdfsDirectory Factory. + + == Example solrconfig.xml for HDFS Here is a sample `solrconfig.xml` configuration for storing Solr indexes on HDFS: