Return-Path: X-Original-To: apmail-lucene-commits-archive@www.apache.org Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19FFC10270 for ; Fri, 13 Dec 2013 19:51:00 +0000 (UTC) Received: (qmail 53546 invoked by uid 500); 13 Dec 2013 19:51:00 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 53539 invoked by uid 99); 13 Dec 2013 19:50:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 19:50:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 19:50:58 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 47FE4238890D; Fri, 13 Dec 2013 19:50:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1550826 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/contrib/ solr/core/ solr/core/src/java/org/apache/solr/handler/component/ solr/solrj/ solr/solrj/src/java/org/apache/solr/client/solrj/impl/ Date: Fri, 13 Dec 2013 19:50:38 -0000 To: commits@lucene.apache.org From: romseygeek@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131213195038.47FE4238890D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: romseygeek Date: Fri Dec 13 19:50:37 2013 New Revision: 1550826 URL: http://svn.apache.org/r1550826 Log: SOLR-5555: CloudSolrServer and LBHttpSolrServer shouldn't throw MUE from constructors 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/core/ (props changed) lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java 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/LBHttpSolrServer.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=1550826&r1=1550825&r2=1550826&view=diff ============================================================================== --- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original) +++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Fri Dec 13 19:50:37 2013 @@ -32,7 +32,9 @@ Apache ZooKeeper 3.4.5 Upgrading from Solr 4.6.0 ---------------------- - + +* CloudSolrServer and LBHttpSolrServer no longer declare MalfurmedURLException + as thrown from their constructors. Detailed Change List ---------------------- @@ -212,6 +214,9 @@ Other Changes * SOLR-5548: Give DistributedSearchTestCase / JettySolrRunner the ability to specify extra filters. (Greg Chanan via Mark Miller) +* SOLR-5555: LBHttpSolrServer and CloudSolrServer constructors don't need to + declare MalformedURLExceptions (Sushil Bajracharya, Alan Woodward) + ================== 4.6.0 ================== Versions of Major Components 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=1550826&r1=1550825&r2=1550826&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 Dec 13 19:50:37 2013 @@ -16,19 +16,6 @@ package org.apache.solr.handler.componen * limitations under the License. */ -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Collections; -import java.util.List; -import java.util.Random; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.CompletionService; -import java.util.concurrent.ExecutorCompletionService; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - import org.apache.http.client.HttpClient; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.impl.HttpClientUtil; @@ -44,6 +31,18 @@ import org.apache.solr.util.DefaultSolrT import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Random; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.CompletionService; +import java.util.concurrent.ExecutorCompletionService; +import java.util.concurrent.SynchronousQueue; +import java.util.concurrent.ThreadPoolExecutor; +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); @@ -158,12 +157,7 @@ public class HttpShardHandlerFactory ext } protected LBHttpSolrServer createLoadbalancer(HttpClient httpClient){ - try { - return new LBHttpSolrServer(httpClient); - } catch (MalformedURLException e) { - // should be impossible since we're not passing any URLs here - throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e); - } + return new LBHttpSolrServer(httpClient); } protected T getParameter(NamedList initArgs, String configKey, T defaultValue) { 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=1550826&r1=1550825&r2=1550826&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 Dec 13 19:50:37 2013 @@ -119,7 +119,7 @@ public class CloudSolrServer extends Sol * @param zkHost The client endpoint of the zookeeper quorum containing the cloud state, * in the form HOST:PORT. */ - public CloudSolrServer(String zkHost) throws MalformedURLException { + public CloudSolrServer(String zkHost) { this.zkHost = zkHost; this.myClient = HttpClientUtil.createClient(null); this.lbServer = new LBHttpSolrServer(myClient); Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java?rev=1550826&r1=1550825&r2=1550826&view=diff ============================================================================== --- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java (original) +++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java Fri Dec 13 19:50:37 2013 @@ -192,14 +192,12 @@ public class LBHttpSolrServer extends So } /** The provided httpClient should use a multi-threaded connection manager */ - public LBHttpSolrServer(HttpClient httpClient, String... solrServerUrl) - throws MalformedURLException { + public LBHttpSolrServer(HttpClient httpClient, String... solrServerUrl) { this(httpClient, new BinaryResponseParser(), solrServerUrl); } /** The provided httpClient should use a multi-threaded connection manager */ - public LBHttpSolrServer(HttpClient httpClient, ResponseParser parser, String... solrServerUrl) - throws MalformedURLException { + public LBHttpSolrServer(HttpClient httpClient, ResponseParser parser, String... solrServerUrl) { clientIsInternal = (httpClient == null); this.parser = parser; if (httpClient == null) { @@ -234,7 +232,7 @@ public class LBHttpSolrServer extends So return server; } - protected HttpSolrServer makeServer(String server) throws MalformedURLException { + protected HttpSolrServer makeServer(String server) { HttpSolrServer s = new HttpSolrServer(server, httpClient, parser); if (requestWriter != null) { s.setRequestWriter(requestWriter);