You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2020/12/02 13:11:40 UTC
[lucene-solr] branch jira/solr-15016 updated (6853640 -> 88083a4)
This is an automated email from the ASF dual-hosted git repository.
ab pushed a change to branch jira/solr-15016
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.
from 6853640 SOLR-15016: Add unit test for dynamic reconfiguration. Remove old API endpoint.
add b9a93cf LUCENE-8626: Standardize Lucene test file naming Part 2 (#2053)
add 02514e5 Remove h3 from HnswGraph javadoc; doclet doesn't seem to like it
add 2b5b0f9 SOLR-14683: move "Missing Metrics" section down to config section; add short blurb to intro text
add cb0d0cf Use h2 for top-level headers in HnswGraph javadoc, following jdk14 rule
add ea4dd05 SOLR-14792: remove leftover /browse UI screenshot from ref guide docs
add af0455a SOLR-14560: Interleaving for Learning To Rank (#1571)
add c4d4767 SOLR-14035: Remove deprecated preferLocalShards=true support in favour of the shards.preference=replica.location:local alternative. (Alex Bulygin via Christine Poerschke)
add 8c7b709 LUCENE-9592: Loosen equality checks in TestVectorUtil. (#2084)
add 77a2053 SOLR-14993: Unable to download zookeeper files of 1byte in size
add a5d0654 LUCENE-9581: Japanese tokenizer should discard the compound token instead of disabling the decomposition of long tokens when discardCompoundToken is activated.
add 44be9f9 LUCENE-9595: Make Component2D#withinPoint implementations consistent with ShapeQuery logic (#2059)
add ca04040 SOLR-15015: added support to parametric Interleaving algorithm (#2096)
add 4d05e72 [SOLR-15015] added support to parametric Interleaving algorithm + tests (#2096)
add 7d54c28 Merge remote-tracking branch 'origin/master'
add c71f119 LUCENE-9508: Fix DocumentsWriter to block threads until unstalled (#2085)
add b63c37d LUCENE-9606: Wrap boolean queries generated by shape fields with a Constant score query (#2093)
add 99c38ee SOLR-14851 Http2SolrClient doesn't handle keystore type (#2098)
add 1e0ae2f SOLR-15001 Docker: require init_var_solr.sh (#2083)
add 021de9f SOLR-14915: Prometheus-exporter should not depend on Solr-core (#1972)
add 2da3d1f fix duplicate compute on maxUnpatchedValue (#2106)
add 37a6163 SOLR-14958: Refactor zkHost config logic to make testing easier and reduce risk of incorrect value being used
add cb5ba42 SOLR-15009 Propogate IOException from DF.exists
add a049284 SOLR-12182: Don't persist base_url in ZK as the scheme is variable, compute from node_name instead (#2010)
add 689e56f Ref Guide: fix wrong class name in CSS to toggle the icon shown in sidebar nav when a section is open
add 663655d SOLR-15013: Prevent merges since test asserts doc order
add 3df7250 SOLR-15004: tests for the replica placement API + placement plugin fixes and light refactoring (#2110)
add feb897a SOLR-15017: Core's lib/ dir was ignored sometimes (#2107)
add d99c166 SOLR-14942: Move request registration to ContentStreamHandlerBase (#2112)
new 0cdd738 Merge branch 'master' into jira/solr-15016
new 88083a4 SOLR-15016: Use '.' prefix for predefined plugins. Prevent errors when using unquoted JSON with string with a leading dot :) Make sure to process only plugin configs with the predefined names.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
dev-tools/scripts/addVersion.py | 1 +
gradle/solr/packaging.gradle | 3 +-
lucene/CHANGES.txt | 17 +
.../lucene/analysis/ja/JapaneseTokenizer.java | 59 +--
.../lucene/analysis/ja/TestJapaneseAnalyzer.java | 14 +-
.../lucene/analysis/ja/TestJapaneseTokenizer.java | 6 +
.../apache/lucene/analysis/ja/TestSearchMode.java | 5 -
.../apache/lucene/codecs/lucene84/PForUtil.java | 2 +-
.../org/apache/lucene/document/LatLonShape.java | 3 +-
.../document/LatLonShapeBoundingBoxQuery.java | 3 +-
.../java/org/apache/lucene/document/XYShape.java | 3 +-
.../src/java/org/apache/lucene/geo/Circle2D.java | 2 +-
.../src/java/org/apache/lucene/geo/Line2D.java | 6 +-
.../src/java/org/apache/lucene/geo/Polygon2D.java | 2 +-
.../java/org/apache/lucene/geo/Rectangle2D.java | 4 +-
.../org/apache/lucene/index/DocumentsWriter.java | 20 +-
.../lucene/index/DocumentsWriterStallControl.java | 4 +
.../org/apache/lucene/util/hnsw/HnswGraph.java | 2 +-
.../apache/lucene/document/TestLatLonShape.java | 74 ++++
.../org/apache/lucene/document/TestXYShape.java | 73 ++++
.../org/apache/lucene/index/TestIndexWriter.java | 43 ++
.../org/apache/lucene/util/TestVectorUtil.java | 8 +-
...orTest.java => TestAllGroupHeadsCollector.java} | 2 +-
...lectorTest.java => TestAllGroupsCollector.java} | 2 +-
...ockGroupingTest.java => TestBlockGrouping.java} | 2 +-
...rTest.java => TestDistinctValuesCollector.java} | 2 +-
...Test.java => TestDoubleRangeGroupSelector.java} | 2 +-
...ectorTest.java => TestGroupFacetCollector.java} | 2 +-
...pingSearchTest.java => TestGroupingSearch.java} | 2 +-
...orTest.java => TestLongRangeGroupSelector.java} | 2 +-
...electorTest.java => TestTermGroupSelector.java} | 2 +-
.../{TopGroupsTest.java => TestTopGroups.java} | 2 +-
...Test.java => TestValueSourceGroupSelector.java} | 2 +-
...rmsQueryTest.java => TestCommonTermsQuery.java} | 6 +-
... => TestIndexAndTaxonomyReplicationClient.java} | 2 +-
...Test.java => TestIndexAndTaxonomyRevision.java} | 2 +-
...ntTest.java => TestIndexReplicationClient.java} | 2 +-
...dexRevisionTest.java => TestIndexRevision.java} | 2 +-
...eplicatorTest.java => TestLocalReplicator.java} | 2 +-
...SessionTokenTest.java => TestSessionToken.java} | 2 +-
...ReplicatorTest.java => TestHttpReplicator.java} | 2 +-
...sQueryTest.java => TestFuzzyLikeThisQuery.java} | 2 +-
...StrategyTest.java => TestDistanceStrategy.java} | 4 +-
.../{PortedSolr3Test.java => TestPortedSolr3.java} | 4 +-
.../{SpatialArgsTest.java => TestSpatialArgs.java} | 2 +-
...trategyTest.java => TestCompositeStrategy.java} | 2 +-
...NRStrategyTest.java => TestDateNRStrategy.java} | 2 +-
...unterTest.java => TestHeatmapFacetCounter.java} | 2 +-
.../{JtsPolygonTest.java => TestJtsPolygon.java} | 4 +-
...eFacetsTest.java => TestNumberRangeFacets.java} | 2 +-
...ava => TestRandomSpatialOpFuzzyPrefixTree.java} | 4 +-
...a => TestRandomSpatialOpFuzzyPrefixTree50.java} | 2 +-
...xTreeTest.java => TestDateRangePrefixTree.java} | 4 +-
...S2PrefixTreeTest.java => TestS2PrefixTree.java} | 2 +-
...fixTreeTest.java => TestSpatialPrefixTree.java} | 2 +-
...sParserTest.java => TestSpatialArgsParser.java} | 2 +-
...rategyTest.java => TestSerializedStrategy.java} | 2 +-
solr/CHANGES.txt | 26 +-
.../src/java/org/apache/solr/ltr/LTRRescorer.java | 153 ++++---
.../java/org/apache/solr/ltr/LTRScoringQuery.java | 4 +
.../solr/ltr/SolrQueryRequestContextUtils.java | 12 +-
.../apache/solr/ltr/interleaving/Interleaving.java | 46 +++
.../solr/ltr/interleaving/InterleavingResult.java | 35 +-
.../ltr/interleaving/LTRInterleavingQuery.java | 75 ++++
.../ltr/interleaving/LTRInterleavingRescorer.java | 162 ++++++++
.../interleaving/LTRInterleavingScoringQuery.java | 53 +++
.../OriginalRankingLTRScoringQuery.java} | 20 +-
.../algorithms/TeamDraftInterleaving.java | 127 ++++++
.../ltr/interleaving/algorithms}/package-info.java | 4 +-
.../solr/ltr/interleaving}/package-info.java | 4 +-
.../LTRFeatureLoggerTransformerFactory.java | 187 ++++++---
.../LTRInterleavingTransformerFactory.java | 114 ++++++
.../apache/solr/ltr/search/LTRQParserPlugin.java | 155 ++++----
.../java/org/apache/solr/ltr/search/LTRQuery.java | 80 ++++
solr/contrib/ltr/src/java/overview.html | 2 +-
.../solr/collection1/conf/solrconfig-ltr.xml | 9 +
.../org/apache/solr/ltr/TestLTRQParserExplain.java | 160 ++++++++
.../org/apache/solr/ltr/TestLTRQParserPlugin.java | 16 +-
.../test/org/apache/solr/ltr/TestLTRWithSort.java | 103 +++++
.../interleaving/TestLTRQParserInterleaving.java | 206 ++++++++++
.../algorithms/TeamDraftInterleavingTest.java | 170 ++++++++
.../transform/TestFeatureLoggerTransformer.java | 400 +++++++++++++++++++
.../transform/TestInterleavingTransformer.java | 277 +++++++++++++
solr/contrib/prometheus-exporter/CHANGES.md | 20 +
solr/contrib/prometheus-exporter/bin/solr-exporter | 15 -
.../prometheus-exporter/bin/solr-exporter.cmd | 5 +-
solr/contrib/prometheus-exporter/build.gradle | 51 ++-
solr/contrib/prometheus-exporter/conf/log4j2.xml | 40 ++
.../prometheus/exporter/MetricsConfiguration.java | 72 +++-
.../solr/prometheus/exporter/SolrExporter.java | 15 +-
.../solr/prometheus/scraper/SolrCloudScraper.java | 16 +-
.../org/apache/solr/prometheus/utils/Helpers.java | 13 +-
.../src/java/org/apache/solr/cloud/CloudUtil.java | 3 +-
.../org/apache/solr/cloud/RecoveryStrategy.java | 13 +-
.../solr/cloud/ShardLeaderElectionContextBase.java | 4 +-
.../java/org/apache/solr/cloud/ZkController.java | 23 +-
.../solr/cloud/api/collections/AddReplicaCmd.java | 1 -
.../cloud/api/collections/CreateCollectionCmd.java | 1 -
.../OverseerCollectionMessageHandler.java | 14 +-
.../solr/cloud/api/collections/SplitShardCmd.java | 1 -
.../apache/solr/cloud/overseer/SliceMutator.java | 18 +-
.../solr/cluster/events/ClusterEventProducer.java | 2 +-
.../events/impl/ClusterEventProducerFactory.java | 32 +-
.../cluster/placement/PlacementPluginFactory.java | 2 +-
.../impl/PlacementPluginFactoryLoader.java | 17 +-
.../plugins/AffinityPlacementFactory.java | 166 +++++---
.../cluster/placement/plugins/package-info.java | 2 +-
.../java/org/apache/solr/core/BlobRepository.java | 3 +-
.../apache/solr/core/CachingDirectoryFactory.java | 15 +-
.../src/java/org/apache/solr/core/CloudConfig.java | 2 +-
.../src/java/org/apache/solr/core/NodeConfig.java | 36 +-
.../src/java/org/apache/solr/core/SolrConfig.java | 68 ++--
.../java/org/apache/solr/core/SolrXmlConfig.java | 49 ++-
.../apache/solr/core/StandardDirectoryFactory.java | 15 +-
.../src/java/org/apache/solr/core/ZkContainer.java | 19 +-
.../apache/solr/filestore/DistribPackageStore.java | 2 +-
.../solr/handler/ContentStreamHandlerBase.java | 65 +--
.../apache/solr/handler/admin/ClusterStatus.java | 26 +-
.../solr/handler/admin/MetricsHistoryHandler.java | 3 +-
.../solr/handler/admin/RebalanceLeaders.java | 2 +-
.../solr/handler/admin/RequestSyncShardOp.java | 1 -
.../solr/handler/admin/ZookeeperInfoHandler.java | 10 +-
.../java/org/apache/solr/servlet/HttpSolrCall.java | 82 ++--
.../apache/solr/servlet/SolrDispatchFilter.java | 103 ++---
.../src/java/org/apache/solr/util/SolrCLI.java | 2 +
.../test/org/apache/solr/TestRandomDVFaceting.java | 1 +
.../solr/cloud/ClusterStateMockUtilTest.java | 1 +
.../org/apache/solr/cloud/DeleteReplicaTest.java | 6 +-
.../org/apache/solr/cloud/LeaderElectionTest.java | 32 +-
.../org/apache/solr/cloud/NodeMutatorTest.java | 2 +
.../test/org/apache/solr/cloud/OverseerTest.java | 69 ++--
.../cloud/TestLeaderElectionWithEmptyReplica.java | 4 +-
.../solr/cloud/TestMiniSolrCloudClusterSSL.java | 3 +
.../solr/cloud/TestRandomRequestDistribution.java | 5 +-
.../CollectionsAPIDistributedZkTest.java | 5 +-
.../solr/cloud/api/collections/ShardSplitTest.java | 5 +-
.../apache/solr/cluster/placement/Builders.java | 140 ++++++-
.../placement/ClusterAbstractionsForTest.java | 27 --
.../impl/PlacementPluginIntegrationTest.java | 51 ++-
.../plugins/AffinityPlacementFactoryTest.java | 440 +++++++++++++++++++--
.../org/apache/solr/core/TestMinimalConfig.java | 45 +++
.../core/snapshots/TestSolrCloudSnapshots.java | 13 +-
.../solr/core/snapshots/TestSolrCoreSnapshots.java | 6 +-
.../org/apache/solr/handler/TestBlobHandler.java | 3 +-
.../org/apache/solr/handler/TestConfigReload.java | 2 +-
.../solr/handler/TestHdfsBackupRestoreCore.java | 7 +-
.../org/apache/solr/handler/TestReqParamsAPI.java | 2 +-
.../solr/handler/TestSolrConfigHandlerCloud.java | 4 +-
.../handler/TestSolrConfigHandlerConcurrent.java | 2 +-
.../handler/component/CloudReplicaSourceTest.java | 1 +
.../apache/solr/index/hdfs/CheckHdfsIndexTest.java | 2 +
.../solr/uninverting/TestFieldCacheSort.java | 3 +-
.../apache/solr/update/SolrCmdDistributorTest.java | 25 +-
solr/docker/CHANGES.md | 28 ++
solr/docker/Dockerfile | 6 +-
solr/docker/include/scripts/docker-entrypoint.sh | 3 +
solr/docker/include/scripts/init-var-solr | 16 +-
solr/docker/include/scripts/solr-create | 3 -
solr/docker/include/scripts/solr-foreground | 3 -
solr/docker/include/scripts/solr-precreate | 3 -
.../cases/empty-varsolr-vol-solr-nocopy/test.sh | 1 +
.../conf/solrconfig.xml | 1 -
.../src/common-query-parameters.adoc | 1 -
solr/solr-ref-guide/src/config-api.adoc | 3 +-
solr/solr-ref-guide/src/css/navs.css | 2 +-
solr/solr-ref-guide/src/distributed-requests.adoc | 4 -
solr/solr-ref-guide/src/enabling-ssl.adoc | 2 +
.../velocity-search-ui/techproducts_browse.png | Bin 74854 -> 0 bytes
solr/solr-ref-guide/src/learning-to-rank.adoc | 104 ++++-
solr/solr-ref-guide/src/metrics-reporting.adoc | 82 ++--
.../client/solrj/impl/BaseCloudSolrClient.java | 8 +-
.../solr/client/solrj/impl/Http2SolrClient.java | 8 +
.../client/solrj/request/beans/PluginMeta.java | 6 +
.../RequestReplicaListTransformerGenerator.java | 15 +-
.../apache/solr/common/cloud/ClusterStateUtil.java | 2 +-
.../java/org/apache/solr/common/cloud/Replica.java | 22 +-
.../org/apache/solr/common/cloud/UrlScheme.java | 73 ++++
.../apache/solr/common/cloud/ZkCoreNodeProps.java | 27 +-
.../solr/common/cloud/ZkMaintenanceUtils.java | 2 +-
.../org/apache/solr/common/cloud/ZkNodeProps.java | 54 ++-
.../apache/solr/common/cloud/ZkStateReader.java | 16 +-
.../apache/solr/common/params/CommonParams.java | 7 -
.../solrj/impl/CloudHttp2SolrClientTest.java | 61 +--
.../client/solrj/impl/CloudSolrClientTest.java | 61 +--
.../client/solrj/impl/Http2SolrClientTest.java | 6 +
.../routing/NodePreferenceRulesComparatorTest.java | 45 ++-
...RequestReplicaListTransformerGeneratorTest.java | 64 +--
.../ShufflingReplicaListTransformerTest.java | 4 +-
.../solr/common/cloud/TestZkMaintenanceUtils.java | 20 +
.../apache/solr/common/cloud/UrlSchemeTest.java | 56 +++
.../solr/common/params/CommonParamsTest.java | 2 -
.../src/java/org/apache/solr/SolrTestCaseJ4.java | 10 +-
.../solr/cloud/AbstractFullDistribZkTestBase.java | 22 +-
.../apache/solr/cloud/MiniSolrCloudCluster.java | 26 +-
.../src/java/org/apache/solr/util/TestHarness.java | 15 +-
.../solr/cloud/MiniSolrCloudClusterTest.java | 74 ++++
196 files changed, 4732 insertions(+), 1229 deletions(-)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{AllGroupHeadsCollectorTest.java => TestAllGroupHeadsCollector.java} (99%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{AllGroupsCollectorTest.java => TestAllGroupsCollector.java} (98%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{BlockGroupingTest.java => TestBlockGrouping.java} (99%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{DistinctValuesCollectorTest.java => TestDistinctValuesCollector.java} (99%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{DoubleRangeGroupSelectorTest.java => TestDoubleRangeGroupSelector.java} (97%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{GroupFacetCollectorTest.java => TestGroupFacetCollector.java} (99%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{GroupingSearchTest.java => TestGroupingSearch.java} (99%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{LongRangeGroupSelectorTest.java => TestLongRangeGroupSelector.java} (97%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{TermGroupSelectorTest.java => TestTermGroupSelector.java} (97%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{TopGroupsTest.java => TestTopGroups.java} (99%)
rename lucene/grouping/src/test/org/apache/lucene/search/grouping/{ValueSourceGroupSelectorTest.java => TestValueSourceGroupSelector.java} (96%)
rename lucene/queries/src/test/org/apache/lucene/queries/{CommonTermsQueryTest.java => TestCommonTermsQuery.java} (99%)
rename lucene/replicator/src/test/org/apache/lucene/replicator/{IndexAndTaxonomyReplicationClientTest.java => TestIndexAndTaxonomyReplicationClient.java} (99%)
rename lucene/replicator/src/test/org/apache/lucene/replicator/{IndexAndTaxonomyRevisionTest.java => TestIndexAndTaxonomyRevision.java} (99%)
rename lucene/replicator/src/test/org/apache/lucene/replicator/{IndexReplicationClientTest.java => TestIndexReplicationClient.java} (99%)
rename lucene/replicator/src/test/org/apache/lucene/replicator/{IndexRevisionTest.java => TestIndexRevision.java} (98%)
rename lucene/replicator/src/test/org/apache/lucene/replicator/{LocalReplicatorTest.java => TestLocalReplicator.java} (99%)
rename lucene/replicator/src/test/org/apache/lucene/replicator/{SessionTokenTest.java => TestSessionToken.java} (97%)
rename lucene/replicator/src/test/org/apache/lucene/replicator/http/{HttpReplicatorTest.java => TestHttpReplicator.java} (98%)
rename lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/{FuzzyLikeThisQueryTest.java => TestFuzzyLikeThisQuery.java} (99%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/{DistanceStrategyTest.java => TestDistanceStrategy.java} (97%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/{PortedSolr3Test.java => TestPortedSolr3.java} (98%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/{SpatialArgsTest.java => TestSpatialArgs.java} (97%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/{CompositeStrategyTest.java => TestCompositeStrategy.java} (98%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/{DateNRStrategyTest.java => TestDateNRStrategy.java} (98%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/{HeatmapFacetCounterTest.java => TestHeatmapFacetCounter.java} (99%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/{JtsPolygonTest.java => TestJtsPolygon.java} (98%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/{NumberRangeFacetsTest.java => TestNumberRangeFacets.java} (99%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/{RandomSpatialOpFuzzyPrefixTreeTest.java => TestRandomSpatialOpFuzzyPrefixTree.java} (99%)
copy lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/{RandomSpatialOpFuzzyPrefixTree50Test.java => TestRandomSpatialOpFuzzyPrefixTree50.java} (92%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/{DateRangePrefixTreeTest.java => TestDateRangePrefixTree.java} (98%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/{S2PrefixTreeTest.java => TestS2PrefixTree.java} (98%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/{SpatialPrefixTreeTest.java => TestSpatialPrefixTree.java} (98%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/query/{SpatialArgsParserTest.java => TestSpatialArgsParser.java} (97%)
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/serialized/{SerializedStrategyTest.java => TestSerializedStrategy.java} (96%)
create mode 100644 solr/contrib/ltr/src/java/org/apache/solr/ltr/interleaving/Interleaving.java
rename lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTree50Test.java => solr/contrib/ltr/src/java/org/apache/solr/ltr/interleaving/InterleavingResult.java (55%)
create mode 100644 solr/contrib/ltr/src/java/org/apache/solr/ltr/interleaving/LTRInterleavingQuery.java
create mode 100644 solr/contrib/ltr/src/java/org/apache/solr/ltr/interleaving/LTRInterleavingRescorer.java
create mode 100644 solr/contrib/ltr/src/java/org/apache/solr/ltr/interleaving/LTRInterleavingScoringQuery.java
copy solr/{core/src/java/org/apache/solr/cluster/placement/plugins/package-info.java => contrib/ltr/src/java/org/apache/solr/ltr/interleaving/OriginalRankingLTRScoringQuery.java} (63%)
create mode 100644 solr/contrib/ltr/src/java/org/apache/solr/ltr/interleaving/algorithms/TeamDraftInterleaving.java
copy solr/{core/src/java/org/apache/solr/cluster/placement/plugins => contrib/ltr/src/java/org/apache/solr/ltr/interleaving/algorithms}/package-info.java (89%)
copy solr/{core/src/java/org/apache/solr/cluster/placement/plugins => contrib/ltr/src/java/org/apache/solr/ltr/interleaving}/package-info.java (89%)
create mode 100644 solr/contrib/ltr/src/java/org/apache/solr/ltr/response/transform/LTRInterleavingTransformerFactory.java
create mode 100644 solr/contrib/ltr/src/java/org/apache/solr/ltr/search/LTRQuery.java
create mode 100644 solr/contrib/ltr/src/test/org/apache/solr/ltr/interleaving/TestLTRQParserInterleaving.java
create mode 100644 solr/contrib/ltr/src/test/org/apache/solr/ltr/interleaving/algorithms/TeamDraftInterleavingTest.java
create mode 100644 solr/contrib/ltr/src/test/org/apache/solr/ltr/response/transform/TestFeatureLoggerTransformer.java
create mode 100644 solr/contrib/ltr/src/test/org/apache/solr/ltr/response/transform/TestInterleavingTransformer.java
create mode 100644 solr/contrib/prometheus-exporter/CHANGES.md
create mode 100644 solr/contrib/prometheus-exporter/conf/log4j2.xml
create mode 100644 solr/core/src/test/org/apache/solr/core/TestMinimalConfig.java
create mode 100644 solr/docker/CHANGES.md
delete mode 100644 solr/solr-ref-guide/src/images/velocity-search-ui/techproducts_browse.png
create mode 100644 solr/solrj/src/java/org/apache/solr/common/cloud/UrlScheme.java
create mode 100644 solr/solrj/src/test/org/apache/solr/common/cloud/UrlSchemeTest.java
[lucene-solr] 02/02: SOLR-15016: Use '.' prefix for predefined
plugins. Prevent errors when using unquoted JSON with string with a leading
dot :) Make sure to process only plugin configs with the predefined names.
Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ab pushed a commit to branch jira/solr-15016
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 88083a44f8ff6c3896404059662cd6a13191a68e
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Wed Dec 2 14:09:53 2020 +0100
SOLR-15016: Use '.' prefix for predefined plugins.
Prevent errors when using unquoted JSON with string with a leading dot :)
Make sure to process only plugin configs with the predefined names.
---
.../solr/cluster/events/ClusterEventProducer.java | 2 +-
.../events/impl/ClusterEventProducerFactory.java | 32 ++++++++++++++--------
.../cluster/placement/PlacementPluginFactory.java | 2 +-
.../impl/PlacementPluginFactoryLoader.java | 17 ++++++++++--
.../impl/PlacementPluginIntegrationTest.java | 30 +++++++++++++++-----
.../client/solrj/request/beans/PluginMeta.java | 6 ++++
6 files changed, 66 insertions(+), 23 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/cluster/events/ClusterEventProducer.java b/solr/core/src/java/org/apache/solr/cluster/events/ClusterEventProducer.java
index d3b0ee7..aa36fd7 100644
--- a/solr/core/src/java/org/apache/solr/cluster/events/ClusterEventProducer.java
+++ b/solr/core/src/java/org/apache/solr/cluster/events/ClusterEventProducer.java
@@ -26,7 +26,7 @@ import java.io.Closeable;
public interface ClusterEventProducer extends ClusterSingleton, Closeable {
/** Unique name for the registration of a plugin-based implementation. */
- String PLUGIN_NAME = "cluster-event-producer";
+ String PLUGIN_NAME = ".cluster-event-producer";
@Override
default String getName() {
diff --git a/solr/core/src/java/org/apache/solr/cluster/events/impl/ClusterEventProducerFactory.java b/solr/core/src/java/org/apache/solr/cluster/events/impl/ClusterEventProducerFactory.java
index 85f1410..609f65c 100644
--- a/solr/core/src/java/org/apache/solr/cluster/events/impl/ClusterEventProducerFactory.java
+++ b/solr/core/src/java/org/apache/solr/cluster/events/impl/ClusterEventProducerFactory.java
@@ -128,13 +128,17 @@ public class ClusterEventProducerFactory extends ClusterEventProducerBase {
ClusterEventListener listener = (ClusterEventListener) instance;
clusterEventProducer.registerListener(listener);
} else if (instance instanceof ClusterEventProducer) {
- // replace the existing impl
- if (cc.getClusterEventProducer() instanceof DelegatingClusterEventProducer) {
- ((DelegatingClusterEventProducer) cc.getClusterEventProducer())
- .setDelegate((ClusterEventProducer) instance);
+ if (ClusterEventProducer.PLUGIN_NAME.equals(plugin.getInfo().name)) {
+ // replace the existing impl
+ if (cc.getClusterEventProducer() instanceof DelegatingClusterEventProducer) {
+ ((DelegatingClusterEventProducer) cc.getClusterEventProducer())
+ .setDelegate((ClusterEventProducer) instance);
+ } else {
+ log.warn("Can't configure plugin-based ClusterEventProducer while CoreContainer is still loading - " +
+ " using existing implementation {}", cc.getClusterEventProducer().getClass().getName());
+ }
} else {
- log.warn("Can't configure plugin-based ClusterEventProducer while CoreContainer is still loading - " +
- " using existing implementation {}", cc.getClusterEventProducer().getClass().getName());
+ log.warn("Ignoring ClusterEventProducer config with non-standard name: " + plugin.getInfo());
}
}
}
@@ -149,13 +153,17 @@ public class ClusterEventProducerFactory extends ClusterEventProducerBase {
ClusterEventListener listener = (ClusterEventListener) instance;
clusterEventProducer.unregisterListener(listener);
} else if (instance instanceof ClusterEventProducer) {
- // replace the existing impl with NoOp
- if (cc.getClusterEventProducer() instanceof DelegatingClusterEventProducer) {
- ((DelegatingClusterEventProducer) cc.getClusterEventProducer())
- .setDelegate(new NoOpProducer(cc));
+ if (ClusterEventProducer.PLUGIN_NAME.equals(plugin.getInfo().name)) {
+ // replace the existing impl with NoOp
+ if (cc.getClusterEventProducer() instanceof DelegatingClusterEventProducer) {
+ ((DelegatingClusterEventProducer) cc.getClusterEventProducer())
+ .setDelegate(new NoOpProducer(cc));
+ } else {
+ log.warn("Can't configure plugin-based ClusterEventProducer while CoreContainer is still loading - " +
+ " using existing implementation {}", cc.getClusterEventProducer().getClass().getName());
+ }
} else {
- log.warn("Can't configure plugin-based ClusterEventProducer while CoreContainer is still loading - " +
- " using existing implementation {}", cc.getClusterEventProducer().getClass().getName());
+ log.warn("Ignoring ClusterEventProducer config with non-standard name: " + plugin.getInfo());
}
}
}
diff --git a/solr/core/src/java/org/apache/solr/cluster/placement/PlacementPluginFactory.java b/solr/core/src/java/org/apache/solr/cluster/placement/PlacementPluginFactory.java
index abdd7b9..fc537ca 100644
--- a/solr/core/src/java/org/apache/solr/cluster/placement/PlacementPluginFactory.java
+++ b/solr/core/src/java/org/apache/solr/cluster/placement/PlacementPluginFactory.java
@@ -28,7 +28,7 @@ public interface PlacementPluginFactory {
/**
* The key in the plugins registry under which this plugin and its configuration are defined.
*/
- String PLUGIN_NAME = "placement-plugin";
+ String PLUGIN_NAME = ".placement-plugin";
/**
* Returns an instance of the plugin that will be repeatedly (and concurrently) be called to compute placement. Multiple
diff --git a/solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementPluginFactoryLoader.java b/solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementPluginFactoryLoader.java
index 8207279..46e6435 100644
--- a/solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementPluginFactoryLoader.java
+++ b/solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementPluginFactoryLoader.java
@@ -3,12 +3,17 @@ package org.apache.solr.cluster.placement.impl;
import org.apache.solr.api.ContainerPluginsRegistry;
import org.apache.solr.cluster.placement.PlacementPlugin;
import org.apache.solr.cluster.placement.PlacementPluginFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.lang.invoke.MethodHandles;
/**
* Utility class to load the configured {@link PlacementPluginFactory} plugin and
* then keep it up to date as the plugin configuration changes.
*/
public class PlacementPluginFactoryLoader {
+ private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static PlacementPluginFactory load(ContainerPluginsRegistry plugins) {
final DelegatingPlacementPluginFactory pluginFactory = new DelegatingPlacementPluginFactory();
@@ -24,7 +29,11 @@ public class PlacementPluginFactoryLoader {
}
Object instance = plugin.getInstance();
if (instance instanceof PlacementPluginFactory) {
- pluginFactory.setDelegate((PlacementPluginFactory) instance);
+ if (PlacementPluginFactory.PLUGIN_NAME.equals(plugin.getInfo().name)) {
+ pluginFactory.setDelegate((PlacementPluginFactory) instance);
+ } else {
+ log.warn("Ignoring PlacementPluginFactory plugin with non-standard name: " + plugin.getInfo());
+ }
}
}
@@ -35,7 +44,11 @@ public class PlacementPluginFactoryLoader {
}
Object instance = plugin.getInstance();
if (instance instanceof PlacementPluginFactory) {
- pluginFactory.setDelegate(null);
+ if (PlacementPluginFactory.PLUGIN_NAME.equals(plugin.getInfo().name)) {
+ pluginFactory.setDelegate(null);
+ } else {
+ log.warn("Ignoring PlacementPluginFactory plugin with non-standard name: " + plugin.getInfo());
+ }
}
}
diff --git a/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java b/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
index e3c9a27..6159358 100644
--- a/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
@@ -84,7 +84,7 @@ public class PlacementPluginIntegrationTest extends SolrCloudTestCase {
req = new V2Request.Builder("/cluster/plugin")
.forceV2(true)
.POST()
- .withPayload("{remove: " + PlacementPluginFactory.PLUGIN_NAME + "}")
+ .withPayload("{remove: '" + PlacementPluginFactory.PLUGIN_NAME + "'}")
.build();
req.process(cluster.getSolrClient());
}
@@ -161,7 +161,7 @@ public class PlacementPluginIntegrationTest extends SolrCloudTestCase {
.build();
req.process(cluster.getSolrClient());
- version = waitForVersionChange(version, wrapper);
+ version = waitForVersionChange(version, wrapper, 10);
factory = wrapper.getDelegate();
assertTrue("wrong type " + factory.getClass().getName(), factory instanceof AffinityPlacementFactory);
@@ -178,27 +178,43 @@ public class PlacementPluginIntegrationTest extends SolrCloudTestCase {
.build();
req.process(cluster.getSolrClient());
- version = waitForVersionChange(version, wrapper);
+ version = waitForVersionChange(version, wrapper, 10);
factory = wrapper.getDelegate();
assertTrue("wrong type " + factory.getClass().getName(), factory instanceof AffinityPlacementFactory);
config = ((AffinityPlacementFactory) factory).getConfig();
assertEquals("minimalFreeDiskGB", 3, config.minimalFreeDiskGB);
assertEquals("prioritizedFreeDiskGB", 4, config.prioritizedFreeDiskGB);
+ // add plugin of the right type but with the wrong name
+ plugin.name = "myPlugin";
+ req = new V2Request.Builder("/cluster/plugin")
+ .forceV2(true)
+ .POST()
+ .withPayload(singletonMap("add", plugin))
+ .build();
+ req.process(cluster.getSolrClient());
+ try {
+ int newVersion = waitForVersionChange(version, wrapper, 5);
+ if (newVersion != version) {
+ fail("factory configuration updated but plugin name was wrong: " + plugin);
+ }
+ } catch (TimeoutException te) {
+ // expected
+ }
// remove plugin
req = new V2Request.Builder("/cluster/plugin")
.forceV2(true)
.POST()
- .withPayload("{remove: " + PlacementPluginFactory.PLUGIN_NAME + "}")
+ .withPayload("{remove: '" + PlacementPluginFactory.PLUGIN_NAME + "'}")
.build();
req.process(cluster.getSolrClient());
- version = waitForVersionChange(version, wrapper);
+ version = waitForVersionChange(version, wrapper, 10);
factory = wrapper.getDelegate();
assertNull("no factory should be present", factory);
}
- private int waitForVersionChange(int currentVersion, PlacementPluginFactoryLoader.DelegatingPlacementPluginFactory wrapper) throws Exception {
- TimeOut timeout = new TimeOut(60, TimeUnit.SECONDS, TimeSource.NANO_TIME);
+ private int waitForVersionChange(int currentVersion, PlacementPluginFactoryLoader.DelegatingPlacementPluginFactory wrapper, int timeoutSec) throws Exception {
+ TimeOut timeout = new TimeOut(timeoutSec, TimeUnit.SECONDS, TimeSource.NANO_TIME);
while (!timeout.hasTimedOut()) {
int newVersion = wrapper.getVersion();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/PluginMeta.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/PluginMeta.java
index 5bee19f..3586ffa 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/PluginMeta.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/PluginMeta.java
@@ -21,6 +21,7 @@ import java.util.Objects;
import org.apache.solr.common.annotation.JsonProperty;
import org.apache.solr.common.util.ReflectMapWriter;
+import org.apache.solr.common.util.Utils;
/**
* POJO for a plugin metadata used in container plugins
@@ -71,4 +72,9 @@ public class PluginMeta implements ReflectMapWriter {
public int hashCode() {
return Objects.hash(name, version, klass);
}
+
+ @Override
+ public String toString() {
+ return Utils.toJSONString(this);
+ }
}
[lucene-solr] 01/02: Merge branch 'master' into jira/solr-15016
Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ab pushed a commit to branch jira/solr-15016
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 0cdd738b25fcf1efbbf42e1c81d1bebff5363946
Merge: 6853640 d99c166
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Wed Dec 2 13:29:10 2020 +0100
Merge branch 'master' into jira/solr-15016
dev-tools/scripts/addVersion.py | 1 +
gradle/solr/packaging.gradle | 3 +-
lucene/CHANGES.txt | 17 +
.../lucene/analysis/ja/JapaneseTokenizer.java | 59 +--
.../lucene/analysis/ja/TestJapaneseAnalyzer.java | 14 +-
.../lucene/analysis/ja/TestJapaneseTokenizer.java | 6 +
.../apache/lucene/analysis/ja/TestSearchMode.java | 5 -
.../apache/lucene/codecs/lucene84/PForUtil.java | 2 +-
.../org/apache/lucene/document/LatLonShape.java | 3 +-
.../document/LatLonShapeBoundingBoxQuery.java | 3 +-
.../java/org/apache/lucene/document/XYShape.java | 3 +-
.../src/java/org/apache/lucene/geo/Circle2D.java | 2 +-
.../src/java/org/apache/lucene/geo/Line2D.java | 6 +-
.../src/java/org/apache/lucene/geo/Polygon2D.java | 2 +-
.../java/org/apache/lucene/geo/Rectangle2D.java | 4 +-
.../org/apache/lucene/index/DocumentsWriter.java | 20 +-
.../lucene/index/DocumentsWriterStallControl.java | 4 +
.../org/apache/lucene/util/hnsw/HnswGraph.java | 2 +-
.../apache/lucene/document/TestLatLonShape.java | 74 ++++
.../org/apache/lucene/document/TestXYShape.java | 73 ++++
.../org/apache/lucene/index/TestIndexWriter.java | 43 ++
.../org/apache/lucene/util/TestVectorUtil.java | 8 +-
...orTest.java => TestAllGroupHeadsCollector.java} | 2 +-
...lectorTest.java => TestAllGroupsCollector.java} | 2 +-
...ockGroupingTest.java => TestBlockGrouping.java} | 2 +-
...rTest.java => TestDistinctValuesCollector.java} | 2 +-
...Test.java => TestDoubleRangeGroupSelector.java} | 2 +-
...ectorTest.java => TestGroupFacetCollector.java} | 2 +-
...pingSearchTest.java => TestGroupingSearch.java} | 2 +-
...orTest.java => TestLongRangeGroupSelector.java} | 2 +-
...electorTest.java => TestTermGroupSelector.java} | 2 +-
.../{TopGroupsTest.java => TestTopGroups.java} | 2 +-
...Test.java => TestValueSourceGroupSelector.java} | 2 +-
...rmsQueryTest.java => TestCommonTermsQuery.java} | 6 +-
... => TestIndexAndTaxonomyReplicationClient.java} | 2 +-
...Test.java => TestIndexAndTaxonomyRevision.java} | 2 +-
...ntTest.java => TestIndexReplicationClient.java} | 2 +-
...dexRevisionTest.java => TestIndexRevision.java} | 2 +-
...eplicatorTest.java => TestLocalReplicator.java} | 2 +-
...SessionTokenTest.java => TestSessionToken.java} | 2 +-
...ReplicatorTest.java => TestHttpReplicator.java} | 2 +-
...sQueryTest.java => TestFuzzyLikeThisQuery.java} | 2 +-
...StrategyTest.java => TestDistanceStrategy.java} | 4 +-
.../{PortedSolr3Test.java => TestPortedSolr3.java} | 4 +-
.../{SpatialArgsTest.java => TestSpatialArgs.java} | 2 +-
...trategyTest.java => TestCompositeStrategy.java} | 2 +-
...NRStrategyTest.java => TestDateNRStrategy.java} | 2 +-
...unterTest.java => TestHeatmapFacetCounter.java} | 2 +-
.../{JtsPolygonTest.java => TestJtsPolygon.java} | 4 +-
...eFacetsTest.java => TestNumberRangeFacets.java} | 2 +-
...ava => TestRandomSpatialOpFuzzyPrefixTree.java} | 4 +-
...a => TestRandomSpatialOpFuzzyPrefixTree50.java} | 2 +-
...xTreeTest.java => TestDateRangePrefixTree.java} | 4 +-
...S2PrefixTreeTest.java => TestS2PrefixTree.java} | 2 +-
...fixTreeTest.java => TestSpatialPrefixTree.java} | 2 +-
...sParserTest.java => TestSpatialArgsParser.java} | 2 +-
...rategyTest.java => TestSerializedStrategy.java} | 2 +-
solr/CHANGES.txt | 26 +-
.../src/java/org/apache/solr/ltr/LTRRescorer.java | 153 ++++---
.../java/org/apache/solr/ltr/LTRScoringQuery.java | 4 +
.../solr/ltr/SolrQueryRequestContextUtils.java | 12 +-
.../apache/solr/ltr/interleaving/Interleaving.java | 46 +++
.../solr/ltr/interleaving/InterleavingResult.java | 35 +-
.../ltr/interleaving/LTRInterleavingQuery.java | 75 ++++
.../ltr/interleaving/LTRInterleavingRescorer.java | 162 ++++++++
.../interleaving/LTRInterleavingScoringQuery.java | 53 +++
.../OriginalRankingLTRScoringQuery.java} | 20 +-
.../algorithms/TeamDraftInterleaving.java | 127 ++++++
.../ltr/interleaving/algorithms}/package-info.java | 4 +-
.../solr/ltr/interleaving}/package-info.java | 4 +-
.../LTRFeatureLoggerTransformerFactory.java | 187 ++++++---
.../LTRInterleavingTransformerFactory.java | 114 ++++++
.../apache/solr/ltr/search/LTRQParserPlugin.java | 155 ++++----
.../java/org/apache/solr/ltr/search/LTRQuery.java | 80 ++++
solr/contrib/ltr/src/java/overview.html | 2 +-
.../solr/collection1/conf/solrconfig-ltr.xml | 9 +
.../org/apache/solr/ltr/TestLTRQParserExplain.java | 160 ++++++++
.../org/apache/solr/ltr/TestLTRQParserPlugin.java | 16 +-
.../test/org/apache/solr/ltr/TestLTRWithSort.java | 103 +++++
.../interleaving/TestLTRQParserInterleaving.java | 206 ++++++++++
.../algorithms/TeamDraftInterleavingTest.java | 170 ++++++++
.../transform/TestFeatureLoggerTransformer.java | 400 +++++++++++++++++++
.../transform/TestInterleavingTransformer.java | 277 +++++++++++++
solr/contrib/prometheus-exporter/CHANGES.md | 20 +
solr/contrib/prometheus-exporter/bin/solr-exporter | 15 -
.../prometheus-exporter/bin/solr-exporter.cmd | 5 +-
solr/contrib/prometheus-exporter/build.gradle | 51 ++-
solr/contrib/prometheus-exporter/conf/log4j2.xml | 40 ++
.../prometheus/exporter/MetricsConfiguration.java | 72 +++-
.../solr/prometheus/exporter/SolrExporter.java | 15 +-
.../solr/prometheus/scraper/SolrCloudScraper.java | 16 +-
.../org/apache/solr/prometheus/utils/Helpers.java | 13 +-
.../src/java/org/apache/solr/cloud/CloudUtil.java | 3 +-
.../org/apache/solr/cloud/RecoveryStrategy.java | 13 +-
.../solr/cloud/ShardLeaderElectionContextBase.java | 4 +-
.../java/org/apache/solr/cloud/ZkController.java | 23 +-
.../solr/cloud/api/collections/AddReplicaCmd.java | 1 -
.../cloud/api/collections/CreateCollectionCmd.java | 1 -
.../OverseerCollectionMessageHandler.java | 14 +-
.../solr/cloud/api/collections/SplitShardCmd.java | 1 -
.../apache/solr/cloud/overseer/SliceMutator.java | 18 +-
.../plugins/AffinityPlacementFactory.java | 166 +++++---
.../cluster/placement/plugins/package-info.java | 2 +-
.../java/org/apache/solr/core/BlobRepository.java | 3 +-
.../apache/solr/core/CachingDirectoryFactory.java | 15 +-
.../src/java/org/apache/solr/core/CloudConfig.java | 2 +-
.../src/java/org/apache/solr/core/NodeConfig.java | 36 +-
.../src/java/org/apache/solr/core/SolrConfig.java | 68 ++--
.../java/org/apache/solr/core/SolrXmlConfig.java | 49 ++-
.../apache/solr/core/StandardDirectoryFactory.java | 15 +-
.../src/java/org/apache/solr/core/ZkContainer.java | 19 +-
.../apache/solr/filestore/DistribPackageStore.java | 2 +-
.../solr/handler/ContentStreamHandlerBase.java | 65 +--
.../apache/solr/handler/admin/ClusterStatus.java | 26 +-
.../solr/handler/admin/MetricsHistoryHandler.java | 3 +-
.../solr/handler/admin/RebalanceLeaders.java | 2 +-
.../solr/handler/admin/RequestSyncShardOp.java | 1 -
.../solr/handler/admin/ZookeeperInfoHandler.java | 10 +-
.../java/org/apache/solr/servlet/HttpSolrCall.java | 82 ++--
.../apache/solr/servlet/SolrDispatchFilter.java | 103 ++---
.../src/java/org/apache/solr/util/SolrCLI.java | 2 +
.../test/org/apache/solr/TestRandomDVFaceting.java | 1 +
.../solr/cloud/ClusterStateMockUtilTest.java | 1 +
.../org/apache/solr/cloud/DeleteReplicaTest.java | 6 +-
.../org/apache/solr/cloud/LeaderElectionTest.java | 32 +-
.../org/apache/solr/cloud/NodeMutatorTest.java | 2 +
.../test/org/apache/solr/cloud/OverseerTest.java | 69 ++--
.../cloud/TestLeaderElectionWithEmptyReplica.java | 4 +-
.../solr/cloud/TestMiniSolrCloudClusterSSL.java | 3 +
.../solr/cloud/TestRandomRequestDistribution.java | 5 +-
.../CollectionsAPIDistributedZkTest.java | 5 +-
.../solr/cloud/api/collections/ShardSplitTest.java | 5 +-
.../apache/solr/cluster/placement/Builders.java | 140 ++++++-
.../placement/ClusterAbstractionsForTest.java | 27 --
.../impl/PlacementPluginIntegrationTest.java | 21 +-
.../plugins/AffinityPlacementFactoryTest.java | 440 +++++++++++++++++++--
.../org/apache/solr/core/TestMinimalConfig.java | 45 +++
.../core/snapshots/TestSolrCloudSnapshots.java | 13 +-
.../solr/core/snapshots/TestSolrCoreSnapshots.java | 6 +-
.../org/apache/solr/handler/TestBlobHandler.java | 3 +-
.../org/apache/solr/handler/TestConfigReload.java | 2 +-
.../solr/handler/TestHdfsBackupRestoreCore.java | 7 +-
.../org/apache/solr/handler/TestReqParamsAPI.java | 2 +-
.../solr/handler/TestSolrConfigHandlerCloud.java | 4 +-
.../handler/TestSolrConfigHandlerConcurrent.java | 2 +-
.../handler/component/CloudReplicaSourceTest.java | 1 +
.../apache/solr/index/hdfs/CheckHdfsIndexTest.java | 2 +
.../solr/uninverting/TestFieldCacheSort.java | 3 +-
.../apache/solr/update/SolrCmdDistributorTest.java | 25 +-
solr/docker/CHANGES.md | 28 ++
solr/docker/Dockerfile | 6 +-
solr/docker/include/scripts/docker-entrypoint.sh | 3 +
solr/docker/include/scripts/init-var-solr | 16 +-
solr/docker/include/scripts/solr-create | 3 -
solr/docker/include/scripts/solr-foreground | 3 -
solr/docker/include/scripts/solr-precreate | 3 -
.../cases/empty-varsolr-vol-solr-nocopy/test.sh | 1 +
.../conf/solrconfig.xml | 1 -
.../src/common-query-parameters.adoc | 1 -
solr/solr-ref-guide/src/config-api.adoc | 3 +-
solr/solr-ref-guide/src/css/navs.css | 2 +-
solr/solr-ref-guide/src/distributed-requests.adoc | 4 -
solr/solr-ref-guide/src/enabling-ssl.adoc | 2 +
.../velocity-search-ui/techproducts_browse.png | Bin 74854 -> 0 bytes
solr/solr-ref-guide/src/learning-to-rank.adoc | 104 ++++-
solr/solr-ref-guide/src/metrics-reporting.adoc | 82 ++--
.../client/solrj/impl/BaseCloudSolrClient.java | 8 +-
.../solr/client/solrj/impl/Http2SolrClient.java | 8 +
.../RequestReplicaListTransformerGenerator.java | 15 +-
.../apache/solr/common/cloud/ClusterStateUtil.java | 2 +-
.../java/org/apache/solr/common/cloud/Replica.java | 22 +-
.../org/apache/solr/common/cloud/UrlScheme.java | 73 ++++
.../apache/solr/common/cloud/ZkCoreNodeProps.java | 27 +-
.../solr/common/cloud/ZkMaintenanceUtils.java | 2 +-
.../org/apache/solr/common/cloud/ZkNodeProps.java | 54 ++-
.../apache/solr/common/cloud/ZkStateReader.java | 16 +-
.../apache/solr/common/params/CommonParams.java | 7 -
.../solrj/impl/CloudHttp2SolrClientTest.java | 61 +--
.../client/solrj/impl/CloudSolrClientTest.java | 61 +--
.../client/solrj/impl/Http2SolrClientTest.java | 6 +
.../routing/NodePreferenceRulesComparatorTest.java | 45 ++-
...RequestReplicaListTransformerGeneratorTest.java | 64 +--
.../ShufflingReplicaListTransformerTest.java | 4 +-
.../solr/common/cloud/TestZkMaintenanceUtils.java | 20 +
.../apache/solr/common/cloud/UrlSchemeTest.java | 56 +++
.../solr/common/params/CommonParamsTest.java | 2 -
.../src/java/org/apache/solr/SolrTestCaseJ4.java | 10 +-
.../solr/cloud/AbstractFullDistribZkTestBase.java | 22 +-
.../apache/solr/cloud/MiniSolrCloudCluster.java | 26 +-
.../src/java/org/apache/solr/util/TestHarness.java | 15 +-
.../solr/cloud/MiniSolrCloudClusterTest.java | 74 ++++
191 files changed, 4666 insertions(+), 1206 deletions(-)
diff --cc solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
index 8c218e7,ac325b1..e3c9a27
--- a/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cluster/placement/impl/PlacementPluginIntegrationTest.java
@@@ -3,20 -20,14 +20,22 @@@ package org.apache.solr.cluster.placeme
import org.apache.solr.client.solrj.cloud.SolrCloudManager;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.request.V2Request;
+import org.apache.solr.client.solrj.request.beans.PluginMeta;
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
-import org.apache.solr.cloud.MiniSolrCloudCluster;
+import org.apache.solr.client.solrj.response.V2Response;
import org.apache.solr.cloud.SolrCloudTestCase;
-import org.apache.solr.cluster.placement.PlacementPluginConfig;
+import org.apache.solr.cluster.placement.PlacementPluginFactory;
+import org.apache.solr.cluster.placement.plugins.AffinityPlacementConfig;
+import org.apache.solr.cluster.placement.plugins.AffinityPlacementFactory;
++import org.apache.solr.cloud.MiniSolrCloudCluster;
import org.apache.solr.cluster.placement.plugins.MinimizeCoresPlacementFactory;
import org.apache.solr.common.cloud.ClusterProperties;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.DocCollection;
+import org.apache.solr.common.util.TimeSource;
+import org.apache.solr.core.CoreContainer;
+import org.apache.solr.util.TimeOut;
++
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
diff --cc solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
index 61907be,7e240b6..9cbdc3d
--- a/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
+++ b/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
@@@ -26,7 -26,9 +26,9 @@@ import org.apache.solr.cluster.SolrColl
import org.apache.solr.cluster.placement.*;
import org.apache.solr.cluster.placement.Builders;
import org.apache.solr.cluster.placement.impl.PlacementPlanFactoryImpl;
-import org.apache.solr.cluster.placement.impl.PlacementPluginConfigImpl;
+import org.apache.solr.cluster.placement.impl.PlacementRequestImpl;
+ import org.apache.solr.cluster.placement.impl.PlacementRequestImpl;
+ import org.apache.solr.common.util.Pair;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
@@@ -47,13 -49,14 +49,15 @@@ public class AffinityPlacementFactoryTe
private static PlacementPlugin plugin;
+ private final static long MINIMAL_FREE_DISK_GB = 10L;
+ private final static long PRIORITIZED_FREE_DISK_GB = 50L;
+
@BeforeClass
public static void setupPlugin() {
- AffinityPlacementConfig config = new AffinityPlacementConfig(10L, 50L);
- PlacementPluginConfig config = PlacementPluginConfigImpl.createConfigFromProperties(
- Map.of("minimalFreeDiskGB", MINIMAL_FREE_DISK_GB, "prioritizedFreeDiskGB", PRIORITIZED_FREE_DISK_GB));
- plugin = new AffinityPlacementFactory().createPluginInstance(config);
++ AffinityPlacementConfig config = new AffinityPlacementConfig(MINIMAL_FREE_DISK_GB, PRIORITIZED_FREE_DISK_GB);
+ AffinityPlacementFactory factory = new AffinityPlacementFactory();
+ factory.configure(config);
+ plugin = factory.createPluginInstance();
- ((AffinityPlacementFactory.AffinityPlacementPlugin) plugin).setRandom(random());
}
@Test