You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2014/02/15 22:40:04 UTC
Re: svn commit: r1568340 [1/2] - in /lucene/dev/branches/branch_4x:
./ solr/ solr/contrib/ solr/contrib/clustering/src/test-files/clustering/solr/
solr/contrib/dataimporthandler/src/test-files/dih/solr/
solr/contrib/dataimporthandler/src/test/org/apache/so...
Mark: I haven't audited this commit in depth, but it seems ot have had at
least one stray unintentional change: reverting r1567231 (which i just
re-fixed in r1568689)
: Date: Fri, 14 Feb 2014 16:02:11 -0000
: From: markrmiller@apache.org
: Reply-To: dev@lucene.apache.org
: To: commits@lucene.apache.org
: Subject: svn commit: r1568340 [1/2] - in /lucene/dev/branches/branch_4x: ./
: solr/ solr/contrib/
: solr/contrib/clustering/src/test-files/clustering/solr/
: solr/contrib/dataimporthandler/src/test-files/dih/solr/
: solr/contrib/dataimporthandler/src/test/org/apache/so...
:
: Author: markrmiller
: Date: Fri Feb 14 16:02:09 2014
: New Revision: 1568340
:
: URL: http://svn.apache.org/r1568340
: Log:
: SOLR-3854: SSL support for SolrCloud.
:
: Added:
: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java
: - copied, changed from r1566456, lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java
: lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/common/util/URLUtilTest.java
: - copied, changed from r1566456, lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/URLUtilTest.java
: Modified:
: lucene/dev/branches/branch_4x/ (props changed)
: lucene/dev/branches/branch_4x/solr/ (props changed)
: lucene/dev/branches/branch_4x/solr/CHANGES.txt (contents, props changed)
: lucene/dev/branches/branch_4x/solr/contrib/ (props changed)
: lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/solr.xml
: lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test-files/dih/solr/solr.xml
: lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
: lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java
: lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/minimr/solr.xml
: lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/mrunit/solr.xml
: lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/solr.xml
: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-no-core.xml
: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-new.xml
: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-old.xml
: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr.xml
: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
: lucene/dev/branches/branch_4x/solr/core/ (props changed)
: lucene/dev/branches/branch_4x/solr/core/ivy.xml
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ZkController.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java
: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/PeerSync.java
: lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-multicore.xml
: lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-no-core.xml
: lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr.xml
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerRolesTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java
: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java
: lucene/dev/branches/branch_4x/solr/example/ (props changed)
: lucene/dev/branches/branch_4x/solr/example/multicore/solr.xml
: lucene/dev/branches/branch_4x/solr/solrj/ (props changed)
: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
: lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java
: lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java
: lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
: lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java
: lucene/dev/branches/branch_4x/solr/test-framework/ (props changed)
: lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
: lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
: lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
: lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
: lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/util/RestTestBase.java
: lucene/dev/branches/branch_4x/solr/test-framework/src/java/org/apache/solr/util/RestTestHarness.java
:
: Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
: +++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Fri Feb 14 16:02:09 2014
: @@ -157,6 +157,9 @@ New Features
: * SOLR-5672: Add logParamsList parameter to support reduced logging.
: (Christine Poerschke via Mark Miller)
:
: +* SOLR-3854: SSL support for SolrCloud. (Sami Siren, hossman, Steve Davids,
: + Alexey Serba, Mark Miller)
: +
: Bug Fixes
: ----------------------
:
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/solr.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/solr.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/solr.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/clustering/src/test-files/clustering/solr/solr.xml Fri Feb 14 16:02:09 2014
: @@ -25,5 +25,9 @@
: host="${host:}" hostPort="${hostPort:}" hostContext="${hostContext:}"
: zkClientTimeout="${zkClientTimeout:15000}">
: <core name="collection1" shard="${shard:}" collection="${collection:collection1}" instanceDir="collection1"/>
: +
: + <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: + </shardHandlerFactory>
: </cores>
: </solr>
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test-files/dih/solr/solr.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test-files/dih/solr/solr.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test-files/dih/solr/solr.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test-files/dih/solr/solr.xml Fri Feb 14 16:02:09 2014
: @@ -25,5 +25,8 @@
: host="${host:}" hostPort="${hostPort:}" hostContext="${hostContext:}"
: zkClientTimeout="${zkClientTimeout:15000}">
: <core name="collection1" shard="${shard:}" collection="${collection:collection1}" instanceDir="collection1"/>
: + <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: + </shardHandlerFactory>
: </cores>
: </solr>
: \ No newline at end of file
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java Fri Feb 14 16:02:09 2014
: @@ -69,7 +69,7 @@ public class TestContentStreamDataSource
: params.set("command", "full-import");
: params.set("clean", "false");
: req.setParams(params);
: - String url = "http://127.0.0.1:" + jetty.getLocalPort() + "/solr";
: + String url = "http" + (isSSLMode() ? "s" : "") + "://127.0.0.1:" + jetty.getLocalPort() + "/solr";
: HttpSolrServer solrServer = new HttpSolrServer(url);
: solrServer.request(req);
: ModifiableSolrParams qparams = new ModifiableSolrParams();
: @@ -89,7 +89,7 @@ public class TestContentStreamDataSource
: "clean", "false", UpdateParams.COMMIT, "false",
: UpdateParams.COMMIT_WITHIN, "1000");
: req.setParams(params);
: - String url = "http://127.0.0.1:" + jetty.getLocalPort() + "/solr";
: + String url = "http" + (isSSLMode() ? "s" : "") + "://127.0.0.1:" + jetty.getLocalPort() + "/solr";
: HttpSolrServer solrServer = new HttpSolrServer(url);
: solrServer.request(req);
: Thread.sleep(100);
: @@ -181,7 +181,7 @@ public class TestContentStreamDataSource
:
: private JettySolrRunner createJetty(SolrInstance instance) throws Exception {
: System.setProperty("solr.data.dir", instance.getDataDir());
: - JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), "/solr", 0);
: + JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), "/solr", 0, null, null, true, null, sslConfig);
: jetty.start();
: return jetty;
: }
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java Fri Feb 14 16:02:09 2014
: @@ -95,7 +95,7 @@ public class TestSolrEntityProcessorEndT
: }
:
: private String getSourceUrl() {
: - return "http://127.0.0.1:" + jetty.getLocalPort() + "/solr";
: + return "http" + (isSSLMode() ? "s" : "") +"://127.0.0.1:" + jetty.getLocalPort() + "/solr";
: }
:
: //TODO: fix this test to close its directories
: @@ -348,7 +348,7 @@ public class TestSolrEntityProcessorEndT
:
: private JettySolrRunner createJetty(SolrInstance instance) throws Exception {
: System.setProperty("solr.data.dir", instance.getDataDir());
: - JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), "/solr", 0);
: + JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), "/solr", 0, null, null, true, null, sslConfig);
: jetty.start();
: return jetty;
: }
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/minimr/solr.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/minimr/solr.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/minimr/solr.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/minimr/solr.xml Fri Feb 14 16:02:09 2014
: @@ -35,6 +35,7 @@
: <core name="collection1" instanceDir="." shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"
: coreNodeName="${coreNodeName:}"/>
: <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:120000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/mrunit/solr.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/mrunit/solr.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/mrunit/solr.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/mrunit/solr.xml Fri Feb 14 16:02:09 2014
: @@ -35,6 +35,7 @@
: <core name="collection1" instanceDir="." shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"
: coreNodeName="${coreNodeName:}"/>
: <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:120000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/solr.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/solr.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/solr.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/map-reduce/src/test-files/solr/solr.xml Fri Feb 14 16:02:09 2014
: @@ -35,6 +35,7 @@
: <core name="collection1" instanceDir="collection1" shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"
: coreNodeName="${coreNodeName:}"/>
: <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:120000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-no-core.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-no-core.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-no-core.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-no-core.xml Fri Feb 14 16:02:09 2014
: @@ -32,6 +32,7 @@
:
: <shardHandlerFactory name="shardHandlerFactory"
: class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:120000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-new.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-new.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-new.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-new.xml Fri Feb 14 16:02:09 2014
: @@ -28,6 +28,7 @@
: </solrcloud>
:
: <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:120000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-old.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-old.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-old.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr-stress-old.xml Fri Feb 14 16:02:09 2014
: @@ -51,6 +51,7 @@
: <core name="00018_core" instanceDir="00018_core" schema="schema-tiny.xml" config="solrconfig-minimal.xml" transient="true" loadOnStartup="false" />
: <core name="00019_core" instanceDir="00019_core" schema="schema-tiny.xml" config="solrconfig-minimal.xml" transient="true" loadOnStartup="false" />
: <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:120000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test-files/solr/solr.xml Fri Feb 14 16:02:09 2014
: @@ -35,6 +35,7 @@
: <core name="collection1" instanceDir="collection1" shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"
: coreNodeName="${coreNodeName:}"/>
: <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:120000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java (original)
: +++ lucene/dev/branches/branch_4x/solr/contrib/morphlines-core/src/test/org/apache/solr/morphlines/solr/AbstractSolrMorphlineZkTestBase.java Fri Feb 14 16:02:09 2014
: @@ -155,7 +155,7 @@ public abstract class AbstractSolrMorphl
: throws Exception {
:
: JettySolrRunner jetty = new JettySolrRunner(solrHome.getAbsolutePath(),
: - context, 0, solrConfigOverride, schemaOverride);
: + context, 0, solrConfigOverride, schemaOverride, true, null, sslConfig);
:
: jetty.setShards(shardList);
:
:
: Modified: lucene/dev/branches/branch_4x/solr/core/ivy.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/ivy.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/ivy.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/core/ivy.xml Fri Feb 14 16:02:09 2014
: @@ -48,6 +48,7 @@
: <dependency org="org.easymock" name="easymock" rev="${/org.easymock/easymock}" conf="test->*"/>
: <dependency org="cglib" name="cglib-nodep" rev="${/cglib/cglib-nodep}" conf="test->*"/>
: <dependency org="org.objenesis" name="objenesis" rev="${/org.objenesis/objenesis}" conf="test->*"/>
: + <dependency org="org.apache.httpcomponents" name="httpclient" rev="${/org.apache.httpcomponents/httpclient}" conf="test->*"/>
:
: <dependency org="org.apache.hadoop" name="hadoop-common" rev="${/org.apache.hadoop/hadoop-common}" conf="compile.hadoop->*"/>
: <!--
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java Fri Feb 14 16:02:09 2014
: @@ -193,10 +193,11 @@ public class JettySolrRunner {
: this.extraRequestFilters = new TreeMap<Class,String>(extraRequestFilters.comparator());
: this.extraRequestFilters.putAll(extraRequestFilters);
: }
: - this.init(solrHome, context, port, stopAtShutdown);
: this.solrConfigFilename = solrConfigFilename;
: this.schemaFilename = schemaFileName;
: this.sslConfig = sslConfig;
: +
: + this.init(solrHome, context, port, stopAtShutdown);
: }
:
: public static class SSLConfig {
: @@ -359,19 +360,18 @@ public class JettySolrRunner {
: sslcontext.setKeyStorePath(sslConfig.keyStore);
: }
: if (null != sslConfig.keyStorePassword) {
: - sslcontext.setKeyStorePassword(System
: - .getProperty("solr.javax.net.ssl.keyStorePassword"));
: + sslcontext.setKeyStorePassword(sslConfig.keyStorePassword);
: }
: if (null != sslConfig.trustStore) {
: sslcontext.setTrustStore(System
: - .getProperty("solr.javax.net.ssl.trustStore"));
: + .getProperty(sslConfig.trustStore));
: }
: if (null != sslConfig.trustStorePassword) {
: sslcontext.setTrustStorePassword(sslConfig.trustStorePassword);
: }
: sslcontext.setNeedClientAuth(sslConfig.clientAuth);
: } else {
: - boolean jettySsl = Boolean.getBoolean("tests.jettySsl");
: + boolean jettySsl = Boolean.getBoolean(System.getProperty("tests.jettySsl"));
:
: if (jettySsl) {
: if (null != System.getProperty("javax.net.ssl.keyStore")) {
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java Fri Feb 14 16:02:09 2014
: @@ -141,7 +141,7 @@ final class ShardLeaderElectionContext e
: zkController.getZkStateReader());
: this.zkController = zkController;
: this.cc = cc;
: - syncStrategy = new SyncStrategy(cc.getUpdateShardHandler());
: + syncStrategy = new SyncStrategy(cc);
: }
:
: @Override
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java Fri Feb 14 16:02:09 2014
: @@ -511,7 +511,6 @@ public class OverseerCollectionProcessor
:
: ShardRequest sreq = new ShardRequest();
: sreq.purpose = 1;
: - if (baseUrl.startsWith("http://")) baseUrl = baseUrl.substring(7);
: sreq.shards = new String[] {baseUrl};
: sreq.actualShards = sreq.shards;
: sreq.params = new ModifiableSolrParams(new MapSolrParams(m));
: @@ -765,9 +764,7 @@ public class OverseerCollectionProcessor
: ShardRequest sreq = new ShardRequest();
: params.set("qt", adminPath);
: sreq.purpose = 1;
: - String replica = zkStateReader.getZkClient()
: - .getBaseUrlForNodeName(nodeName);
: - if (replica.startsWith("http://")) replica = replica.substring(7);
: + String replica = zkStateReader.getBaseUrlForNodeName(nodeName);
: sreq.shards = new String[]{replica};
: sreq.actualShards = sreq.shards;
: sreq.params = params;
: @@ -971,7 +968,7 @@ public class OverseerCollectionProcessor
: for (String subShardName : subShardNames) {
: // wait for parent leader to acknowledge the sub-shard core
: log.info("Asking parent leader to wait for: " + subShardName + " to be alive on: " + nodeName);
: - String coreNodeName = waitForCoreNodeName(collection, zkStateReader.getZkClient().getBaseUrlForNodeName(nodeName), subShardName);
: + String coreNodeName = waitForCoreNodeName(collection, zkStateReader.getBaseUrlForNodeName(nodeName), subShardName);
: CoreAdminRequest.WaitForState cmd = new CoreAdminRequest.WaitForState();
: cmd.setCoreName(subShardName);
: cmd.setNodeName(nodeName);
: @@ -1080,7 +1077,7 @@ public class OverseerCollectionProcessor
:
: sendShardRequest(subShardNodeName, params);
:
: - String coreNodeName = waitForCoreNodeName(collection, zkStateReader.getZkClient().getBaseUrlForNodeName(subShardNodeName), shardName);
: + String coreNodeName = waitForCoreNodeName(collection, zkStateReader.getBaseUrlForNodeName(subShardNodeName), shardName);
: // wait for the replicas to be seen as active on sub shard leader
: log.info("Asking sub shard leader to wait for: " + shardName + " to be alive on: " + subShardNodeName);
: CoreAdminRequest.WaitForState cmd = new CoreAdminRequest.WaitForState();
: @@ -1417,7 +1414,7 @@ public class OverseerCollectionProcessor
:
: String tempCollectionReplica1 = tempSourceCollectionName + "_" + tempSourceSlice.getName() + "_replica1";
: String coreNodeName = waitForCoreNodeName(clusterState.getCollection(tempSourceCollectionName),
: - zkStateReader.getZkClient().getBaseUrlForNodeName(sourceLeader.getNodeName()), tempCollectionReplica1);
: + zkStateReader.getBaseUrlForNodeName(sourceLeader.getNodeName()), tempCollectionReplica1);
: // wait for the replicas to be seen as active on temp source leader
: log.info("Asking source leader to wait for: " + tempCollectionReplica1 + " to be alive on: " + sourceLeader.getNodeName());
: CoreAdminRequest.WaitForState cmd = new CoreAdminRequest.WaitForState();
: @@ -1454,7 +1451,7 @@ public class OverseerCollectionProcessor
: sendShardRequest(targetLeader.getNodeName(), params);
:
: coreNodeName = waitForCoreNodeName(clusterState.getCollection(tempSourceCollectionName),
: - zkStateReader.getZkClient().getBaseUrlForNodeName(targetLeader.getNodeName()), tempCollectionReplica2);
: + zkStateReader.getBaseUrlForNodeName(targetLeader.getNodeName()), tempCollectionReplica2);
: // wait for the replicas to be seen as active on temp source leader
: log.info("Asking temp source leader to wait for: " + tempCollectionReplica2 + " to be alive on: " + targetLeader.getNodeName());
: cmd = new CoreAdminRequest.WaitForState();
: @@ -1518,8 +1515,7 @@ public class OverseerCollectionProcessor
: ShardRequest sreq = new ShardRequest();
: params.set("qt", adminPath);
: sreq.purpose = 1;
: - String replica = zkStateReader.getZkClient().getBaseUrlForNodeName(nodeName);
: - if (replica.startsWith("http://")) replica = replica.substring(7);
: + String replica = zkStateReader.getBaseUrlForNodeName(nodeName);
: sreq.shards = new String[]{replica};
: sreq.actualShards = sreq.shards;
: sreq.params = params;
: @@ -1653,9 +1649,7 @@ public class OverseerCollectionProcessor
: ShardRequest sreq = new ShardRequest();
: params.set("qt", adminPath);
: sreq.purpose = 1;
: - String replica = zkStateReader.getZkClient()
: - .getBaseUrlForNodeName(nodeName);
: - if (replica.startsWith("http://")) replica = replica.substring(7);
: + String replica = zkStateReader.getBaseUrlForNodeName(nodeName);
: sreq.shards = new String[] {replica};
: sreq.actualShards = sreq.shards;
: sreq.params = params;
: @@ -1753,8 +1747,6 @@ public class OverseerCollectionProcessor
: // yes, they must use same admin handler path everywhere...
: cloneParams.set("qt", adminPath);
: sreq.purpose = 1;
: - // TODO: this sucks
: - if (replica.startsWith("http://")) replica = replica.substring(7);
: sreq.shards = new String[] {replica};
: sreq.actualShards = sreq.shards;
: sreq.params = cloneParams;
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java Fri Feb 14 16:02:09 2014
: @@ -34,9 +34,9 @@ import org.apache.solr.common.cloud.ZkSt
: import org.apache.solr.common.params.CoreAdminParams.CoreAdminAction;
: import org.apache.solr.common.params.ModifiableSolrParams;
: import org.apache.solr.common.util.NamedList;
: +import org.apache.solr.core.CoreContainer;
: import org.apache.solr.core.CoreDescriptor;
: import org.apache.solr.core.SolrCore;
: -import org.apache.solr.handler.component.HttpShardHandlerFactory;
: import org.apache.solr.handler.component.ShardHandler;
: import org.apache.solr.handler.component.ShardRequest;
: import org.apache.solr.handler.component.ShardResponse;
: @@ -62,10 +62,10 @@ public class SyncStrategy {
:
: private final ExecutorService updateExecutor;
:
: - public SyncStrategy(UpdateShardHandler updateShardHandler) {
: + public SyncStrategy(CoreContainer cc) {
: + UpdateShardHandler updateShardHandler = cc.getUpdateShardHandler();
: client = updateShardHandler.getHttpClient();
: -
: - shardHandler = new HttpShardHandlerFactory().getShardHandler(client);
: + shardHandler = cc.getShardHandlerFactory().getShardHandler();
: updateExecutor = updateShardHandler.getUpdateExecutor();
: }
:
: @@ -245,9 +245,6 @@ public class SyncStrategy {
: sreq.coreName = coreName;
: sreq.baseUrl = baseUrl;
: sreq.purpose = 1;
: - // TODO: this sucks
: - if (replica.startsWith("http://"))
: - replica = replica.substring(7);
: sreq.shards = new String[]{replica};
: sreq.actualShards = sreq.shards;
: sreq.params = new ModifiableSolrParams();
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ZkController.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ZkController.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ZkController.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ZkController.java Fri Feb 14 16:02:09 2014
: @@ -59,6 +59,7 @@ import org.apache.solr.common.cloud.ZkNo
: import org.apache.solr.common.cloud.ZkStateReader;
: import org.apache.solr.common.cloud.ZooKeeperException;
: import org.apache.solr.common.params.SolrParams;
: +import org.apache.solr.common.util.URLUtil;
: import org.apache.solr.core.CoreContainer;
: import org.apache.solr.core.CoreDescriptor;
: import org.apache.solr.core.SolrCore;
: @@ -87,10 +88,6 @@ public final class ZkController {
:
: static final String NEWL = System.getProperty("line.separator");
:
: -
: - private final static Pattern URL_POST = Pattern.compile("https?://(.*)");
: - private final static Pattern URL_PREFIX = Pattern.compile("(https?://).*");
: -
: private final boolean SKIP_AUTO_RECOVERY = Boolean.getBoolean("solrcloud.skip.autorecovery");
:
: private final DistributedQueue overseerJobQueue;
: @@ -149,7 +146,6 @@ public final class ZkController {
:
: private final String localHostPort; // example: 54065
: private final String localHostContext; // example: solr
: - private final String localHost; // example: http://127.0.0.1
: private final String hostName; // example: 127.0.0.1
: private final String nodeName; // example: 127.0.0.1:54065_solr
: private final String baseURL; // example: http://127.0.0.1:54065/solr
: @@ -187,11 +183,7 @@ public final class ZkController {
: this.zkServerAddress = zkServerAddress;
: this.localHostPort = locaHostPort;
: this.localHostContext = localHostContext;
: - this.localHost = getHostAddress(localHost);
: - this.baseURL = this.localHost + ":" + this.localHostPort +
: - (this.localHostContext.isEmpty() ? "" : ("/" + this.localHostContext));
: -
: - this.hostName = getHostNameFromAddress(this.localHost);
: + this.hostName = normalizeHostName(localHost);
: this.nodeName = generateNodeName(this.hostName,
: this.localHostPort,
: this.localHostContext);
: @@ -286,6 +278,8 @@ public final class ZkController {
: leaderElector = new LeaderElector(zkClient);
: zkStateReader = new ZkStateReader(zkClient);
:
: + this.baseURL = zkStateReader.getBaseUrlForNodeName(this.nodeName);
: +
: init(registerOnReconnect);
: }
:
: @@ -464,9 +458,9 @@ public final class ZkController {
: return bytes;
: }
:
: - // normalize host to url_prefix://host
: + // normalize host removing any url scheme.
: // input can be null, host, or url_prefix://host
: - private String getHostAddress(String host) throws IOException {
: + private String normalizeHostName(String host) throws IOException {
:
: if (host == null || host.length() == 0) {
: String hostaddress;
: @@ -496,30 +490,15 @@ public final class ZkController {
: "Error while looking for a better host name than 127.0.0.1", e);
: }
: }
: - host = "http://" + hostaddress;
: + host = hostaddress;
: } else {
: - Matcher m = URL_PREFIX.matcher(host);
: - if (!m.matches()) {
: - host = "http://" + host;
: + if(URLUtil.hasScheme(host)) {
: + host = URLUtil.removeScheme(host);
: }
: }
:
: return host;
: }
: -
: - // extract host from url_prefix://host
: - private String getHostNameFromAddress(String addr) {
: - Matcher m = URL_POST.matcher(addr);
: - if (m.matches()) {
: - return m.group(1);
: - } else {
: - log.error("Unrecognized host:" + addr);
: - throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
: - "Unrecognized host:" + addr);
: - }
: - }
: -
: -
:
: public String getHostName() {
: return hostName;
: @@ -1585,7 +1564,7 @@ public final class ZkController {
: * @param hostPort - must consist only of digits, must not be null or the empty string
: * @param hostContext - should not begin or end with a slash (leading/trailin slashes will be ignored), must not be null, may be the empty string to denote the root context
: * @lucene.experimental
: - * @see SolrZkClient#getBaseUrlForNodeName
: + * @see ZkStateReader#getBaseUrlForNodeName
: */
: static String generateNodeName(final String hostName,
: final String hostPort,
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java Fri Feb 14 16:02:09 2014
: @@ -824,7 +824,7 @@ public class CoreAdminHandler extends Re
: try {
: core = coreContainer.getCore(cname);
: if (core != null) {
: - syncStrategy = new SyncStrategy(core.getCoreDescriptor().getCoreContainer().getUpdateShardHandler());
: + syncStrategy = new SyncStrategy(core.getCoreDescriptor().getCoreContainer());
:
: Map<String,Object> props = new HashMap<String,Object>();
: props.put(ZkStateReader.BASE_URL_PROP, zkController.getBaseUrl());
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java Fri Feb 14 16:02:09 2014
: @@ -378,8 +378,6 @@ public class HttpShardHandler extends Sh
: sliceShardsStr.append('|');
: }
: String url = ZkCoreNodeProps.getCoreUrl(replica);
: - if (url.startsWith("http://"))
: - url = url.substring(7);
: sliceShardsStr.append(url);
: }
:
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java Fri Feb 14 16:02:09 2014
: @@ -16,16 +16,17 @@ package org.apache.solr.handler.componen
: * limitations under the License.
: */
:
: +import org.apache.commons.lang.StringUtils;
: import org.apache.http.client.HttpClient;
: import org.apache.solr.client.solrj.SolrServerException;
: import org.apache.solr.client.solrj.impl.HttpClientUtil;
: import org.apache.solr.client.solrj.impl.LBHttpSolrServer;
: import org.apache.solr.client.solrj.request.QueryRequest;
: -import org.apache.solr.common.SolrException;
: import org.apache.solr.common.params.ModifiableSolrParams;
: import org.apache.solr.common.util.ExecutorUtil;
: import org.apache.solr.common.util.NamedList;
: import org.apache.solr.common.util.StrUtils;
: +import org.apache.solr.common.util.URLUtil;
: import org.apache.solr.core.PluginInfo;
: import org.apache.solr.util.DefaultSolrThreadFactory;
: import org.slf4j.Logger;
: @@ -46,7 +47,8 @@ import java.util.concurrent.TimeUnit;
:
: public class HttpShardHandlerFactory extends ShardHandlerFactory implements org.apache.solr.util.plugin.PluginInfoInitialized {
: protected static Logger log = LoggerFactory.getLogger(HttpShardHandlerFactory.class);
: -
: + private static final String DEFAULT_SCHEME = "http";
: +
: // We want an executor that doesn't take up any resources if
: // it's not used, so it could be created statically for
: // the distributed search component if desired.
: @@ -73,7 +75,7 @@ public class HttpShardHandlerFactory ext
: int queueSize = -1;
: boolean accessPolicy = false;
:
: - private String scheme = "http://"; //current default values
: + private String scheme = null;
:
: private final Random r = new Random();
:
: @@ -114,8 +116,10 @@ public class HttpShardHandlerFactory ext
: public void init(PluginInfo info) {
: NamedList args = info.initArgs;
: this.soTimeout = getParameter(args, HttpClientUtil.PROP_SO_TIMEOUT, soTimeout);
: - this.scheme = getParameter(args, INIT_URL_SCHEME, "http://");
: - this.scheme = (this.scheme.endsWith("://")) ? this.scheme : this.scheme + "://";
: + this.scheme = getParameter(args, INIT_URL_SCHEME, null);
: + if(StringUtils.endsWith(this.scheme, "://")) {
: + this.scheme = StringUtils.removeEnd(this.scheme, "://");
: + }
: this.connectionTimeout = getParameter(args, HttpClientUtil.PROP_CONNECTION_TIMEOUT, connectionTimeout);
: this.maxConnectionsPerHost = getParameter(args, HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, maxConnectionsPerHost);
: this.corePoolSize = getParameter(args, INIT_CORE_POOL_SIZE, corePoolSize);
: @@ -204,7 +208,7 @@ public class HttpShardHandlerFactory ext
: /**
: * Creates a randomized list of urls for the given shard.
: *
: - * @param shard the urls for the shard (minus "http://"), separated by '|'
: + * @param shard the urls for the shard, separated by '|'
: * @return A list of valid urls (including protocol) that are replicas for the shard
: */
: public List<String> makeURLList(String shard) {
: @@ -212,7 +216,7 @@ public class HttpShardHandlerFactory ext
:
: // convert shard to URL
: for (int i=0; i<urls.size(); i++) {
: - urls.set(i, scheme + urls.get(i));
: + urls.set(i, buildUrl(urls.get(i)));
: }
:
: //
: @@ -232,4 +236,19 @@ public class HttpShardHandlerFactory ext
: public CompletionService newCompletionService() {
: return new ExecutorCompletionService<ShardResponse>(commExecutor);
: }
: +
: + /**
: + * Rebuilds the URL replacing the URL scheme of the passed URL with the
: + * configured scheme replacement.If no scheme was configured, the passed URL's
: + * scheme is left alone.
: + */
: + private String buildUrl(String url) {
: + if(!URLUtil.hasScheme(url)) {
: + return StringUtils.defaultIfEmpty(scheme, DEFAULT_SCHEME) + "://" + url;
: + } else if(StringUtils.isNotEmpty(scheme)) {
: + return scheme + "://" + URLUtil.removeScheme(url);
: + }
: +
: + return url;
: + }
: }
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/ShardHandlerFactory.java Fri Feb 14 16:02:09 2014
: @@ -40,7 +40,6 @@ public abstract class ShardHandlerFactor
: * @return a new, initialized ShardHandlerFactory instance
: */
: public static ShardHandlerFactory newInstance(PluginInfo info, SolrResourceLoader loader) {
: -
: if (info == null)
: info = DEFAULT_SHARDHANDLER_INFO;
:
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/PeerSync.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/PeerSync.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/PeerSync.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/PeerSync.java Fri Feb 14 16:02:09 2014
: @@ -139,7 +139,7 @@ public class PeerSync {
: uhandler = core.getUpdateHandler();
: ulog = uhandler.getUpdateLog();
: // TODO: shutdown
: - shardHandlerFactory = new HttpShardHandlerFactory();
: + shardHandlerFactory = (HttpShardHandlerFactory) core.getCoreDescriptor().getCoreContainer().getShardHandlerFactory();
: shardHandler = shardHandlerFactory.getShardHandler(client);
: }
:
: @@ -269,9 +269,6 @@ public class PeerSync {
: private void requestVersions(String replica) {
: SyncShardRequest sreq = new SyncShardRequest();
: sreq.purpose = 1;
: - // TODO: this sucks
: - if (replica.startsWith("http://"))
: - replica = replica.substring(7);
: sreq.shards = new String[]{replica};
: sreq.actualShards = sreq.shards;
: sreq.params = new ModifiableSolrParams();
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-multicore.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-multicore.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-multicore.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-multicore.xml Fri Feb 14 16:02:09 2014
: @@ -67,4 +67,7 @@
: <core name="core0" instanceDir="core0" />
: <core name="core1" instanceDir="core1" />
: </cores>
: + <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: + </shardHandlerFactory>
: </solr>
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-no-core.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-no-core.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-no-core.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr-no-core.xml Fri Feb 14 16:02:09 2014
: @@ -32,6 +32,7 @@
:
: <shardHandlerFactory name="shardHandlerFactory"
: class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:90000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/solr.xml Fri Feb 14 16:02:09 2014
: @@ -35,6 +35,7 @@
: <core name="collection1" instanceDir="collection1" shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"
: coreNodeName="${coreNodeName:}"/>
: <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: <int name="socketTimeout">${socketTimeout:90000}</int>
: <int name="connTimeout">${connTimeout:15000}</int>
: </shardHandlerFactory>
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java Fri Feb 14 16:02:09 2014
: @@ -138,7 +138,7 @@ public class AliasIntegrationTest extend
: query.set("collection", "testalias");
: JettySolrRunner jetty = jettys.get(random().nextInt(jettys.size()));
: int port = jetty.getLocalPort();
: - HttpSolrServer server = new HttpSolrServer("http://127.0.0.1:" + port + context + "/testalias");
: + HttpSolrServer server = new HttpSolrServer(getBaseUrl() + port + context + "/testalias");
: res = server.query(query);
: assertEquals(3, res.getResults().getNumFound());
:
: @@ -146,7 +146,7 @@ public class AliasIntegrationTest extend
: query = new SolrQuery("*:*");
: jetty = jettys.get(random().nextInt(jettys.size()));
: port = jetty.getLocalPort();
: - server = new HttpSolrServer("http://127.0.0.1:" + port + context + "/testalias");
: + server = new HttpSolrServer(getBaseUrl() + port + context + "/testalias");
: res = server.query(query);
: assertEquals(3, res.getResults().getNumFound());
:
: @@ -173,7 +173,7 @@ public class AliasIntegrationTest extend
: query.set("collection", "testalias");
: jetty = jettys.get(random().nextInt(jettys.size()));
: port = jetty.getLocalPort();
: - server = new HttpSolrServer("http://127.0.0.1:" + port + context + "/testalias");
: + server = new HttpSolrServer(getBaseUrl() + port + context + "/testalias");
: res = server.query(query);
: assertEquals(5, res.getResults().getNumFound());
:
: @@ -181,7 +181,7 @@ public class AliasIntegrationTest extend
: query = new SolrQuery("*:*");
: jetty = jettys.get(random().nextInt(jettys.size()));
: port = jetty.getLocalPort();
: - server = new HttpSolrServer("http://127.0.0.1:" + port + context + "/testalias");
: + server = new HttpSolrServer(getBaseUrl() + port + context + "/testalias");
: res = server.query(query);
: assertEquals(5, res.getResults().getNumFound());
:
: @@ -243,6 +243,10 @@ public class AliasIntegrationTest extend
: assertTrue(sawException);
: }
:
: + private String getBaseUrl() {
: + return (isSSLMode() ? "https" : "http") + "://127.0.0.1:";
: + }
: +
: private void createAlias(String alias, String collections)
: throws SolrServerException, IOException {
: if (random().nextBoolean()) {
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java Fri Feb 14 16:02:09 2014
: @@ -20,13 +20,12 @@ package org.apache.solr.cloud;
: import java.io.File;
: import java.io.FilenameFilter;
: import java.io.IOException;
: -import java.io.InputStream;
: -import java.net.URL;
: import java.util.Arrays;
: import java.util.regex.Matcher;
: import java.util.regex.Pattern;
:
: -import org.apache.commons.io.IOUtils;
: +import org.apache.http.client.methods.HttpGet;
: +import org.apache.http.impl.client.BasicResponseHandler;
: import org.apache.solr.client.solrj.SolrQuery;
: import org.apache.solr.client.solrj.SolrServer;
: import org.apache.solr.client.solrj.SolrServerException;
: @@ -444,12 +443,9 @@ public class BasicDistributedZk2Test ext
: public void run() {
: String masterUrl = client.getBaseURL() + "/replication?command="
: + ReplicationHandler.CMD_DETAILS;
: - URL url;
: - InputStream stream = null;
: +
: try {
: - url = new URL(masterUrl);
: - stream = url.openStream();
: - response = IOUtils.toString(stream, "UTF-8");
: + response = client.getHttpClient().execute(new HttpGet(masterUrl), new BasicResponseHandler());
: if (response.contains("<str name=\"status\">success</str>")) {
: Matcher m = p.matcher(response);
: if (!m.find()) {
: @@ -458,12 +454,9 @@ public class BasicDistributedZk2Test ext
:
: success = true;
: }
: - stream.close();
: } catch (Exception e) {
: e.printStackTrace();
: fail = e.getMessage();
: - } finally {
: - IOUtils.closeQuietly(stream);
: }
:
: };
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java Fri Feb 14 16:02:09 2014
: @@ -440,7 +440,7 @@ public class BasicDistributedZkTest exte
: // each replica should also give the same numDocs
: ArrayList<String> replicaAlts = new ArrayList<String>(replicaJetties.size() * 2);
: for (CloudJettyRunner replicaJetty : shardToJetty.get(shard)) {
: - String replica = removeProtocol(replicaJetty.url);
: + String replica = replicaJetty.url;
: query.set("shards", replica);
:
: // replicas already shuffled, use this in the alternative check below
: @@ -484,7 +484,7 @@ public class BasicDistributedZkTest exte
: ArrayList<String> replicas = new ArrayList<String>(7);
: for (CloudJettyRunner replicaJetty : shardToJetty.get(shard)) {
: if (0 == random().nextInt(3) || 0 == replicas.size()) {
: - replicas.add(removeProtocol(replicaJetty.url));
: + replicas.add(replicaJetty.url);
: }
: }
: Collections.shuffle(replicas, random());
: @@ -1201,11 +1201,4 @@ public class BasicDistributedZkTest exte
: // insurance
: DirectUpdateHandler2.commitOnClose = true;
: }
: -
: - /**
: - * Given a URL as a string, removes the leading protocol from that string
: - */
: - private static String removeProtocol(String url) {
: - return url.replaceFirst("^[^:/]{1,20}:/+","");
: - }
: }
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java Fri Feb 14 16:02:09 2014
: @@ -438,7 +438,7 @@ public class FullSolrCloudDistribCmdsTes
: long beforeCount = results.getResults().getNumFound();
: int cnt = TEST_NIGHTLY ? 2933 : 313;
: try {
: - suss.setConnectionTimeout(15000);
: + suss.setConnectionTimeout(30000);
: for (int i = 0; i < cnt; i++) {
: index_specific(suss, id, docId++, "text_t", "some text so that it not's negligent work to parse this doc, even though it's still a pretty short doc");
: }
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java Fri Feb 14 16:02:09 2014
: @@ -207,7 +207,7 @@ public class OverseerCollectionProcessor
: final String address = "localhost:" + (8963 + i) + "_solr";
: liveNodes.add(address);
:
: - solrZkClientMock.getBaseUrlForNodeName(address);
: + zkStateReaderMock.getBaseUrlForNodeName(address);
: expectLastCall().andAnswer(new IAnswer<Object>() {
: @Override
: public Object answer() throws Throwable {
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerRolesTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerRolesTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerRolesTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/OverseerRolesTest.java Fri Feb 14 16:02:09 2014
: @@ -17,6 +17,7 @@ package org.apache.solr.cloud;
: * limitations under the License.
: */
:
: +
: import static org.apache.solr.cloud.OverseerCollectionProcessor.MAX_SHARDS_PER_NODE;
: import static org.apache.solr.cloud.OverseerCollectionProcessor.NUM_SLICES;
: import static org.apache.solr.cloud.OverseerCollectionProcessor.REPLICATION_FACTOR;
: @@ -38,36 +39,20 @@ import org.apache.solr.client.solrj.Solr
: import org.apache.solr.client.solrj.embedded.JettySolrRunner;
: import org.apache.solr.client.solrj.impl.CloudSolrServer;
: import org.apache.solr.client.solrj.request.QueryRequest;
: -import org.apache.solr.common.cloud.SolrZkClient;
: -import org.apache.solr.common.cloud.ZkStateReader;
: +import org.apache.solr.common.params.CollectionParams.CollectionAction;
: import org.apache.solr.common.params.MapSolrParams;
: import org.apache.solr.common.params.SolrParams;
: -import org.apache.zookeeper.KeeperException;
: -import org.apache.zookeeper.data.Stat;
: import org.junit.After;
: import org.junit.Before;
: import org.junit.BeforeClass;
: -import org.junit.Ignore;
: -
: -import java.io.IOException;
: -import java.util.ArrayList;
: -import java.util.Collections;
: -import java.util.HashMap;
: -import java.util.List;
: -import java.util.Locale;
: -import java.util.Map;
: -import java.util.Set;
: -
: -import static org.apache.solr.cloud.OverseerCollectionProcessor.MAX_SHARDS_PER_NODE;
: -import static org.apache.solr.cloud.OverseerCollectionProcessor.NUM_SLICES;
: -import static org.apache.solr.cloud.OverseerCollectionProcessor.REPLICATION_FACTOR;
: -import static org.apache.solr.cloud.OverseerCollectionProcessor.getSortedNodeNames;
: -import static org.apache.solr.common.cloud.ZkNodeProps.makeMap;
: -import static org.apache.solr.common.params.CollectionParams.CollectionAction;
: @LuceneTestCase.Slow
: public class OverseerRolesTest extends AbstractFullDistribZkTestBase{
: private CloudSolrServer client;
:
: + static {
: + sslConfig = null;
: + }
: +
: @BeforeClass
: public static void beforeThisClass2() throws Exception {
:
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java Fri Feb 14 16:02:09 2014
: @@ -32,11 +32,10 @@ import org.junit.BeforeClass;
: import org.junit.Test;
:
: import java.io.File;
: -import java.io.IOException;
: +import java.util.Collections;
: import java.util.HashMap;
: import java.util.List;
: import java.util.Map;
: -import java.util.concurrent.TimeoutException;
:
: @Slow
: public class ZkControllerTest extends SolrTestCaseJ4 {
: @@ -99,49 +98,59 @@ public class ZkControllerTest extends So
: AbstractZkTestCase.tryCleanSolrZkNode(server.getZkHost());
: AbstractZkTestCase.makeSolrZkNode(server.getZkHost());
:
: - SolrZkClient zkClient = new SolrZkClient(server.getZkAddress(), TIMEOUT);
: + ZkStateReader zkStateReader = new ZkStateReader(server.getZkAddress(), TIMEOUT, TIMEOUT);
: try {
: -
: // getBaseUrlForNodeName
: assertEquals("http://zzz.xxx:1234/solr",
: - zkClient.getBaseUrlForNodeName("zzz.xxx:1234_solr"));
: + zkStateReader.getBaseUrlForNodeName("zzz.xxx:1234_solr"));
: assertEquals("http://xxx:99",
: - zkClient.getBaseUrlForNodeName("xxx:99_"));
: + zkStateReader.getBaseUrlForNodeName("xxx:99_"));
: assertEquals("http://foo-bar.baz.org:9999/some_dir",
: - zkClient.getBaseUrlForNodeName("foo-bar.baz.org:9999_some_dir"));
: + zkStateReader.getBaseUrlForNodeName("foo-bar.baz.org:9999_some_dir"));
: assertEquals("http://foo-bar.baz.org:9999/solr/sub_dir",
: - zkClient.getBaseUrlForNodeName("foo-bar.baz.org:9999_solr%2Fsub_dir"));
: + zkStateReader.getBaseUrlForNodeName("foo-bar.baz.org:9999_solr%2Fsub_dir"));
:
: // generateNodeName + getBaseUrlForNodeName
: assertEquals("http://foo:9876/solr",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo","9876","solr")));
: assertEquals("http://foo:9876/solr",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo","9876","/solr")));
: assertEquals("http://foo:9876/solr",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo","9876","/solr/")));
: assertEquals("http://foo.bar.com:9876/solr/sub_dir",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo.bar.com","9876","solr/sub_dir")));
: assertEquals("http://foo.bar.com:9876/solr/sub_dir",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo.bar.com","9876","/solr/sub_dir/")));
: assertEquals("http://foo-bar:9876",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo-bar","9876","")));
: assertEquals("http://foo-bar:9876",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo-bar","9876","/")));
: assertEquals("http://foo-bar.com:80/some_dir",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo-bar.com","80","some_dir")));
: assertEquals("http://foo-bar.com:80/some_dir",
: - zkClient.getBaseUrlForNodeName
: + zkStateReader.getBaseUrlForNodeName
: (ZkController.generateNodeName("foo-bar.com","80","/some_dir")));
: +
: + //Verify the URL Scheme is taken into account
: + zkStateReader.getZkClient().create(ZkStateReader.CLUSTER_PROPS,
: + ZkStateReader.toJSON(Collections.singletonMap("urlScheme", "https")), CreateMode.PERSISTENT, true);
: +
: + assertEquals("https://zzz.xxx:1234/solr",
: + zkStateReader.getBaseUrlForNodeName("zzz.xxx:1234_solr"));
: +
: + assertEquals("https://foo-bar.com:80/some_dir",
: + zkStateReader.getBaseUrlForNodeName
: + (ZkController.generateNodeName("foo-bar.com","80","/some_dir")));
: } finally {
: - zkClient.close();
: + zkStateReader.close();
: }
: } finally {
: server.shutdown();
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java Fri Feb 14 16:02:09 2014
: @@ -17,9 +17,20 @@ package org.apache.solr.core;
: * limitations under the License.
: */
:
: +import java.io.File;
: +import java.io.IOException;
: +import java.util.ArrayList;
: +import java.util.List;
: +import java.util.Locale;
: +import java.util.Map;
: +import java.util.Random;
: +import java.util.TreeMap;
: +import java.util.concurrent.atomic.AtomicBoolean;
: +import java.util.concurrent.atomic.AtomicInteger;
: +import java.util.concurrent.atomic.AtomicLong;
: +
: import org.apache.commons.io.FileUtils;
: import org.apache.solr.SolrTestCaseJ4;
: -import org.apache.solr.client.solrj.SolrServerException;
: import org.apache.solr.client.solrj.embedded.JettySolrRunner;
: import org.apache.solr.client.solrj.impl.HttpSolrServer;
: import org.apache.solr.client.solrj.request.UpdateRequest;
: @@ -28,23 +39,10 @@ import org.apache.solr.client.solrj.resp
: import org.apache.solr.common.SolrInputDocument;
: import org.apache.solr.common.params.ModifiableSolrParams;
: import org.junit.After;
: -import org.junit.AfterClass;
: import org.junit.Before;
: import org.junit.BeforeClass;
: import org.junit.Test;
:
: -import java.io.File;
: -import java.io.IOException;
: -import java.util.ArrayList;
: -import java.util.List;
: -import java.util.Locale;
: -import java.util.Map;
: -import java.util.Random;
: -import java.util.TreeMap;
: -import java.util.concurrent.atomic.AtomicBoolean;
: -import java.util.concurrent.atomic.AtomicInteger;
: -import java.util.concurrent.atomic.AtomicLong;
: -
: /**
: * Incorporate the open/close stress tests into unit tests.
: */
: @@ -74,7 +72,12 @@ public class OpenCloseCoreStressTest ext
: List<HttpSolrServer> queryServers = new ArrayList<HttpSolrServer>(queryThreads);
:
: static String savedFactory;
: +
: + @BeforeClass
: + public static void beforeClass() {
:
: + }
: +
: @Before
: public void setupServer() throws Exception {
: coreCounts = new TreeMap<String, Long>();
: @@ -84,7 +87,7 @@ public class OpenCloseCoreStressTest ext
: solrHomeDirectory = new File(TEMP_DIR, "OpenCloseCoreStressTest_");
: FileUtils.deleteDirectory(solrHomeDirectory); // Ensure that a failed test didn't leave something lying around.
:
: - jetty = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), "/solr", 0);
: + jetty = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), "/solr", 0, null, null, true, null, sslConfig);
: }
:
: @After
: @@ -132,7 +135,7 @@ public class OpenCloseCoreStressTest ext
:
: private void getServers() throws Exception {
: jetty.start();
: - url = "http://127.0.0.1:" + jetty.getLocalPort() + "/solr/";
: + url = "http" + (isSSLMode() ? "s" : "") + "://127.0.0.1:" + jetty.getLocalPort() + "/solr/";
:
: // Mostly to keep annoying logging messages from being sent out all the time.
:
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java Fri Feb 14 16:02:09 2014
: @@ -72,6 +72,7 @@ import org.apache.solr.util.AbstractSolr
: import org.apache.solr.util.FileUtils;
: import org.junit.After;
: import org.junit.Before;
: +import org.junit.BeforeClass;
: import org.junit.Ignore;
: import org.junit.Test;
:
: @@ -99,7 +100,16 @@ public class TestReplicationHandler exte
: // index from previous test method
: static int nDocs = 500;
:
: + static {
: + // does not yet work with ssl
: + sslConfig = null;
: + }
: +
: + @BeforeClass
: + public static void beforeClass() {
:
: + }
: +
: @Before
: public void setUp() throws Exception {
: super.setUp();
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java Fri Feb 14 16:02:09 2014
: @@ -11,6 +11,7 @@ import org.apache.solr.client.solrj.requ
: import org.apache.solr.client.solrj.response.QueryResponse;
: import org.apache.solr.common.SolrInputDocument;
: import org.apache.solr.common.util.NamedList;
: +import org.junit.After;
: import org.junit.AfterClass;
: import org.junit.Before;
: import org.junit.BeforeClass;
: @@ -44,21 +45,6 @@ public class DistributedDebugComponentTe
: @BeforeClass
: public static void beforeTest() throws Exception {
: solrHome = createSolrHome();
: - createJetty(solrHome.getAbsolutePath(), null, null);
: -
: - String url = jetty.getBaseUrl().toString();
: - collection1 = new HttpSolrServer(url);
: - collection2 = new HttpSolrServer(url + "/collection2");
: -
: - String urlCollection1 = jetty.getBaseUrl().toString() + "/" + "collection1";
: - String urlCollection2 = jetty.getBaseUrl().toString() + "/" + "collection2";
: - shard1 = urlCollection1.replaceAll("http://", "");
: - shard2 = urlCollection2.replaceAll("http://", "");
: -
: - //create second core
: - CoreAdminRequest.Create req = new CoreAdminRequest.Create();
: - req.setCoreName("collection2");
: - collection1.request(req);
: }
:
: private static File createSolrHome() throws Exception {
: @@ -70,12 +56,6 @@ public class DistributedDebugComponentTe
:
: @AfterClass
: public static void afterTest() throws Exception {
: - collection1.shutdown();
: - collection2.shutdown();
: - collection1 = null;
: - collection2 = null;
: - jetty.stop();
: - jetty=null;
: cleanUpJettyHome(solrHome);
: }
:
: @@ -83,6 +63,20 @@ public class DistributedDebugComponentTe
: @Override
: public void setUp() throws Exception {
: super.setUp();
: + createJetty(solrHome.getAbsolutePath(), null, null);
: + String url = jetty.getBaseUrl().toString();
: + collection1 = new HttpSolrServer(url);
: + collection2 = new HttpSolrServer(url + "/collection2");
: +
: + String urlCollection1 = jetty.getBaseUrl().toString() + "/" + "collection1";
: + String urlCollection2 = jetty.getBaseUrl().toString() + "/" + "collection2";
: + shard1 = urlCollection1.replaceAll("http" + (sslConfig == null || !sslConfig.useSsl ? "" : "s") + "://", "");
: + shard2 = urlCollection2.replaceAll("http" + (sslConfig == null || !sslConfig.useSsl ? "" : "s") + "://", "");
: +
: + //create second core
: + CoreAdminRequest.Create req = new CoreAdminRequest.Create();
: + req.setCoreName("collection2");
: + collection1.request(req);
:
: SolrInputDocument doc = new SolrInputDocument();
: doc.setField("id", "1");
: @@ -97,6 +91,17 @@ public class DistributedDebugComponentTe
:
: }
:
: + @After
: + public void tearDown() throws Exception {
: + super.tearDown();
: + collection1.shutdown();
: + collection2.shutdown();
: + collection1 = null;
: + collection2 = null;
: + jetty.stop();
: + jetty=null;
: + }
: +
: @Test
: @SuppressWarnings("unchecked")
: public void testSimpleSearch() throws Exception {
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java Fri Feb 14 16:02:09 2014
: @@ -49,6 +49,11 @@ public class TestRemoteStreaming extends
:
: private static final File solrHomeDirectory = new File(TEMP_DIR, "TestRemoteStreaming");
:
: + static {
: + // does not yet work with ssl
: + sslConfig = null;
: + }
: +
: @BeforeClass
: public static void beforeTest() throws Exception {
: //this one has handleSelect=true which a test here needs
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTest.java Fri Feb 14 16:02:09 2014
: @@ -23,17 +23,17 @@ import java.io.Writer;
: import java.util.Arrays;
: import java.util.Date;
:
: -import com.google.common.base.Charsets;
: import org.apache.http.Header;
: import org.apache.http.HttpResponse;
: import org.apache.http.client.methods.HttpRequestBase;
: import org.apache.http.impl.cookie.DateUtils;
: +import org.apache.lucene.util._TestUtil;
: import org.apache.solr.common.params.CommonParams;
: import org.junit.AfterClass;
: import org.junit.BeforeClass;
: import org.junit.Test;
:
: -import org.apache.lucene.util._TestUtil;
: +import com.google.common.base.Charsets;
:
: /**
: * A test case for the several HTTP cache headers emitted by Solr
: @@ -41,6 +41,11 @@ import org.apache.lucene.util._TestUtil;
: public class CacheHeaderTest extends CacheHeaderTestBase {
: private static final File solrHomeDirectory = new File(TEMP_DIR, "CacheHeaderTest");
:
: + static {
: + // does not yet work with ssl
: + sslConfig = null;
: + }
: +
: @BeforeClass
: public static void beforeTest() throws Exception {
: setupJettyTestHome(solrHomeDirectory, "collection1");
:
: Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java Fri Feb 14 16:02:09 2014
: @@ -60,9 +60,13 @@ public class SolrCmdDistributorTest exte
:
: private AtomicInteger id = new AtomicInteger();
:
: + static {
: + // no ssl currently because distrib updates read scheme from zk and no zk in this test
: + sslConfig = null;
: + }
: +
: @BeforeClass
: public static void beforeClass() throws Exception {
: -
: // we can't use the Randomized merge policy because the test depends on
: // being able to call optimize to have all deletes expunged.
: System.setProperty("solr.tests.mergePolicy", LogDocMergePolicy.class.getName());
:
: Modified: lucene/dev/branches/branch_4x/solr/example/multicore/solr.xml
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/multicore/solr.xml?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/example/multicore/solr.xml (original)
: +++ lucene/dev/branches/branch_4x/solr/example/multicore/solr.xml Fri Feb 14 16:02:09 2014
: @@ -31,5 +31,10 @@
: <cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}">
: <core name="core0" instanceDir="core0" />
: <core name="core1" instanceDir="core1" />
: +
: + <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
: + <str name="urlScheme">${urlScheme:}</str>
: + </shardHandlerFactory>
: </cores>
: +
: </solr>
:
: Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java (original)
: +++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java Fri Feb 14 16:02:09 2014
: @@ -526,12 +526,7 @@ public class CloudSolrServer extends Sol
: || request.getPath().equals("/admin/cores")) {
: Set<String> liveNodes = clusterState.getLiveNodes();
: for (String liveNode : liveNodes) {
: - int splitPointBetweenHostPortAndContext = liveNode.indexOf("_");
: - theUrlList.add("http://"
: - + liveNode.substring(0, splitPointBetweenHostPortAndContext)
: - + "/"
: - + URLDecoder.decode(liveNode, "UTF-8").substring(
: - splitPointBetweenHostPortAndContext + 1));
: + theUrlList.add(zkStateReader.getBaseUrlForNodeName(liveNode));
: }
: } else {
: String collection = reqParams.get("collection", defaultCollection);
:
: Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java (original)
: +++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java Fri Feb 14 16:02:09 2014
: @@ -93,6 +93,10 @@ public class HttpClientUtil {
: configurer = newConfigurer;
: }
:
: + public static HttpClientConfigurer getConfigurer() {
: + return configurer;
: + }
: +
: /**
: * Creates new http client by using the provided configuration.
: *
:
: Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java (original)
: +++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java Fri Feb 14 16:02:09 2014
: @@ -491,28 +491,6 @@ public class SolrZkClient {
: }
:
: /**
: - * Returns the baseURL corrisponding to a given node's nodeName --
: - * NOTE: does not (currently) imply that the nodeName (or resulting
: - * baseURL) exists in the cluster.
: - * @lucene.experimental
: - */
: - public String getBaseUrlForNodeName(final String nodeName) {
: - final int _offset = nodeName.indexOf("_");
: - if (_offset < 0) {
: - throw new IllegalArgumentException("nodeName does not contain expected '_' seperator: " + nodeName);
: - }
: - final String hostAndPort = nodeName.substring(0,_offset);
: - try {
: - final String path = URLDecoder.decode(nodeName.substring(1+_offset),
: - "UTF-8");
: - return "http://" + hostAndPort + (path.isEmpty() ? "" : ("/" + path));
: - } catch (UnsupportedEncodingException e) {
: - throw new IllegalStateException("JVM Does not seem to support UTF-8", e);
: - }
: - }
: -
: -
: - /**
: * Fills string with printout of current ZooKeeper layout.
: */
: public void printLayout(String path, int indent, StringBuilder string)
:
: Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java (original)
: +++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java Fri Feb 14 16:02:09 2014
: @@ -18,6 +18,8 @@ package org.apache.solr.common.cloud;
: */
:
: import java.io.IOException;
: +import java.io.UnsupportedEncodingException;
: +import java.net.URLDecoder;
: import java.util.ArrayList;
: import java.util.Arrays;
: import java.util.HashSet;
: @@ -619,4 +621,28 @@ public class ZkStateReader {
: }
: }
:
: + /**
: + * Returns the baseURL corrisponding to a given node's nodeName --
: + * NOTE: does not (currently) imply that the nodeName (or resulting
: + * baseURL) exists in the cluster.
: + * @lucene.experimental
: + */
: + public String getBaseUrlForNodeName(final String nodeName) {
: + final int _offset = nodeName.indexOf("_");
: + if (_offset < 0) {
: + throw new IllegalArgumentException("nodeName does not contain expected '_' seperator: " + nodeName);
: + }
: + final String hostAndPort = nodeName.substring(0,_offset);
: + try {
: + final String path = URLDecoder.decode(nodeName.substring(1+_offset), "UTF-8");
: + String urlScheme = (String) getClusterProps().get("urlScheme");
: + if(urlScheme == null) {
: + urlScheme = "http";
: + }
: + return urlScheme + "://" + hostAndPort + (path.isEmpty() ? "" : ("/" + path));
: + } catch (UnsupportedEncodingException e) {
: + throw new IllegalStateException("JVM Does not seem to support UTF-8", e);
: + }
: + }
: +
: }
:
: Copied: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java (from r1566456, lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java)
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java?p2=lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java&p1=lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java&r1=1566456&r2=1568340&rev=1568340&view=diff
: ==============================================================================
: (empty)
:
: Modified: lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java (original)
: +++ lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java Fri Feb 14 16:02:09 2014
: @@ -259,7 +259,7 @@ public class TestLBHttpSolrServer extend
: }
:
: public String getUrl() {
: - return "http://127.0.0.1:" + port + "/solr";
: + return "http" + (isSSLMode() ? "s" : "") + "://127.0.0.1:" + port + "/solr";
: }
:
: public String getSchemaFile() {
: @@ -314,7 +314,7 @@ public class TestLBHttpSolrServer extend
: }
:
: public void startJetty() throws Exception {
: - jetty = new JettySolrRunner(getHomeDir(), "/solr", port, "bad_solrconfig.xml", null);
: + jetty = new JettySolrRunner(getHomeDir(), "/solr", port, "bad_solrconfig.xml", null, true, null, sslConfig);
: System.setProperty("solr.data.dir", getDataDir());
: jetty.start();
: int newPort = jetty.getLocalPort();
:
: Modified: lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java
: URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java?rev=1568340&r1=1568339&r2=1568340&view=diff
: ==============================================================================
: --- lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java (original)
: +++ lucene/dev/branches/branch_4x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java Fri Feb 14 16:02:09 2014
: @@ -52,7 +52,7 @@ public class MultiCoreExampleJettyTest e
: System.clearProperty("solr.directoryFactory");
: super.setUp();
:
: - jetty = new JettySolrRunner(getSolrHome(), context, 0 );
: + jetty = new JettySolrRunner(getSolrHome(), context, 0, null, null, true, null, sslConfig);
: jetty.start(false);
: port = jetty.getLocalPort();
:
: @@ -93,7 +93,7 @@ public class MultiCoreExampleJettyTest e
: {
: try {
: // setup the server...
: - String url = "http://127.0.0.1:"+port+context+"/"+name;
: + String url = "http" + (isSSLMode() ? "s" : "") + "://127.0.0.1:"+port+context+"/"+name;
: HttpSolrServer s = new HttpSolrServer( url );
: s.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
: s.setDefaultMaxConnectionsPerHost(100);
:
:
:
-Hoss
http://www.lucidworks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org