lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
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 GMT
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> 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);



Mime
View raw message