You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2014/12/31 15:31:05 UTC

svn commit: r1648706 [2/9] - in /lucene/dev/branches/branch_5x/solr: ./ contrib/ contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/ contrib/map-reduce/src/java/o...

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Wed Dec 31 14:31:03 2014
@@ -34,7 +34,7 @@ import org.apache.http.HeaderIterator;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.HttpResponse;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrException.ErrorCode;
 import org.apache.solr.common.cloud.Aliases;
@@ -311,7 +311,7 @@ public class SolrDispatchFilter extends
             String coreUrl = getRemotCoreUrl(cores, corename, origCorename);
             // don't proxy for internal update requests
             SolrParams queryParams = SolrRequestParsers.parseQueryString(req.getQueryString());
-            checkStateIsValid(cores, queryParams.get(CloudSolrServer.STATE_VERSION));
+            checkStateIsValid(cores, queryParams.get(CloudSolrClient.STATE_VERSION));
             if (coreUrl != null
                 && queryParams
                     .get(DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM) == null) {
@@ -372,7 +372,7 @@ public class SolrDispatchFilter extends
               if( "/select".equals( path ) || "/select/".equals( path ) ) {
                 solrReq = parser.parse( core, path, req );
 
-                checkStateIsValid(cores,solrReq.getParams().get(CloudSolrServer.STATE_VERSION));
+                checkStateIsValid(cores,solrReq.getParams().get(CloudSolrClient.STATE_VERSION));
                 String qt = solrReq.getParams().get( CommonParams.QT );
                 handler = core.getRequestHandler( qt );
                 if( handler == null ) {

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java Wed Dec 31 14:31:03 2014
@@ -17,25 +17,11 @@ package org.apache.solr.update;
  * limitations under the License.
  */
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.ConnectException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CompletionService;
-import java.util.concurrent.ExecutorCompletionService;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-
 import org.apache.http.HttpResponse;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.impl.BinaryResponseParser;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.AbstractUpdateRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.common.SolrException;
@@ -49,12 +35,26 @@ import org.apache.solr.update.processor.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.ConnectException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CompletionService;
+import java.util.concurrent.ExecutorCompletionService;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
 
 public class SolrCmdDistributor {
   private static final int MAX_RETRIES_ON_FORWARD = 25;
   public static Logger log = LoggerFactory.getLogger(SolrCmdDistributor.class);
   
-  private StreamingSolrServers servers;
+  private StreamingSolrClients clients;
   
   private int retryPause = 500;
   private int maxRetriesOnForward = MAX_RETRIES_ON_FORWARD;
@@ -71,16 +71,16 @@ public class SolrCmdDistributor {
   }
   
   public SolrCmdDistributor(UpdateShardHandler updateShardHandler) {
-    this.servers = new StreamingSolrServers(updateShardHandler);
+    this.clients = new StreamingSolrClients(updateShardHandler);
     this.updateExecutor = updateShardHandler.getUpdateExecutor();
     this.completionService = new ExecutorCompletionService<>(updateExecutor);
   }
   
-  public SolrCmdDistributor(StreamingSolrServers servers, int maxRetriesOnForward, int retryPause) {
-    this.servers = servers;
+  public SolrCmdDistributor(StreamingSolrClients clients, int maxRetriesOnForward, int retryPause) {
+    this.clients = clients;
     this.maxRetriesOnForward = maxRetriesOnForward;
     this.retryPause = retryPause;
-    this.updateExecutor = servers.getUpdateExecutor();
+    this.updateExecutor = clients.getUpdateExecutor();
     completionService = new ExecutorCompletionService<>(updateExecutor);
   }
   
@@ -88,7 +88,7 @@ public class SolrCmdDistributor {
     try {
       blockAndDoRetries();
     } finally {
-      servers.shutdown();
+      clients.shutdown();
     }
   }
 
@@ -96,7 +96,7 @@ public class SolrCmdDistributor {
     // NOTE: retries will be forwards to a single url
     
     List<Error> errors = new ArrayList<>(this.errors);
-    errors.addAll(servers.getErrors());
+    errors.addAll(clients.getErrors());
     List<Error> resubmitList = new ArrayList<>();
 
     for (Error err : errors) {
@@ -156,7 +156,7 @@ public class SolrCmdDistributor {
       }
     }
     
-    servers.clearErrors();
+    clients.clearErrors();
     this.errors.clear();
     for (Error err : resubmitList) {
       submit(err.req, false);
@@ -225,7 +225,7 @@ public class SolrCmdDistributor {
   }
 
   private void blockAndDoRetries() {
-    servers.blockUntilFinished();
+    clients.blockUntilFinished();
     
     // wait for any async commits to complete
     while (pending != null && pending.size() > 0) {
@@ -253,14 +253,13 @@ public class SolrCmdDistributor {
     if (req.synchronous) {
       blockAndDoRetries();
       
-      HttpSolrServer server = new HttpSolrServer(req.node.getUrl(),
-          servers.getHttpClient());
+      HttpSolrClient client = new HttpSolrClient(req.node.getUrl(), clients.getHttpClient());
       try {
-        server.request(req.uReq);
+        client.request(req.uReq);
       } catch (Exception e) {
         throw new SolrException(ErrorCode.SERVER_ERROR, "Failed synchronous update on shard " + req.node + " update: " + req.uReq , e);
       } finally {
-        server.shutdown();
+        client.shutdown();
       }
       
       return;
@@ -292,8 +291,8 @@ public class SolrCmdDistributor {
   
   private void doRequest(final Req req) {
     try {
-      SolrServer solrServer = servers.getSolrServer(req);
-      solrServer.request(req.uReq);
+      SolrClient solrClient = clients.getSolrClient(req);
+      solrClient.request(req.uReq);
     } catch (Exception e) {
       SolrException.log(log, e);
       Error error = new Error();

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/util/SolrCLI.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/util/SolrCLI.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/util/SolrCLI.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/util/SolrCLI.java Wed Dec 31 14:31:03 2014
@@ -17,25 +17,6 @@ package org.apache.solr.util;
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.ConnectException;
-import java.net.SocketException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.GnuParser;
 import org.apache.commons.cli.HelpFormatter;
@@ -61,9 +42,9 @@ import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.client.solrj.impl.HttpClientUtil;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.cloud.ZkController;
 import org.apache.solr.common.SolrException;
@@ -78,6 +59,25 @@ import org.noggit.JSONParser;
 import org.noggit.JSONWriter;
 import org.noggit.ObjectBuilder;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.net.ConnectException;
+import java.net.SocketException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
 /**
  * Command-line utility for working with Solr.
  */
@@ -93,7 +93,7 @@ public class SolrCLI {
   }
   
   /**
-   * Helps build SolrCloud aware tools by initializing a CloudSolrServer
+   * Helps build SolrCloud aware tools by initializing a CloudSolrClient
    * instance before running the tool.
    */
   public static abstract class SolrCloudTool implements Tool {
@@ -112,16 +112,16 @@ public class SolrCLI {
       
       log.debug("Connecting to Solr cluster: " + zkHost);
       int exitStatus = 0;
-      CloudSolrServer cloudSolrServer = null;
+      CloudSolrClient cloudSolrClient = null;
       try {
-        cloudSolrServer = new CloudSolrServer(zkHost);
+        cloudSolrClient = new CloudSolrClient(zkHost);
         
         String collection = cli.getOptionValue("collection");
         if (collection != null)
-          cloudSolrServer.setDefaultCollection(collection);
+          cloudSolrClient.setDefaultCollection(collection);
         
-        cloudSolrServer.connect();
-        exitStatus = runCloudTool(cloudSolrServer, cli);
+        cloudSolrClient.connect();
+        exitStatus = runCloudTool(cloudSolrClient, cli);
       } catch (Exception exc) {
         // since this is a CLI, spare the user the stacktrace
         String excMsg = exc.getMessage();
@@ -132,9 +132,9 @@ public class SolrCLI {
           throw exc;
         }
       } finally {
-        if (cloudSolrServer != null) {
+        if (cloudSolrClient != null) {
           try {
-            cloudSolrServer.shutdown();
+            cloudSolrClient.shutdown();
           } catch (Exception ignore) {}
         }
       }
@@ -145,7 +145,7 @@ public class SolrCLI {
     /**
      * Runs a SolrCloud tool with CloudSolrServer initialized
      */
-    protected abstract int runCloudTool(CloudSolrServer cloudSolrServer, CommandLine cli)
+    protected abstract int runCloudTool(CloudSolrClient cloudSolrClient, CommandLine cli)
         throws Exception;
   }
   
@@ -872,7 +872,7 @@ public class SolrCLI {
     }
         
     @Override
-    protected int runCloudTool(CloudSolrServer cloudSolrServer, CommandLine cli) throws Exception {
+    protected int runCloudTool(CloudSolrClient cloudSolrClient, CommandLine cli) throws Exception {
       
       String collection = cli.getOptionValue("collection");
       if (collection == null)
@@ -880,7 +880,7 @@ public class SolrCLI {
       
       log.info("Running healthcheck for "+collection);
       
-      ZkStateReader zkStateReader = cloudSolrServer.getZkStateReader();
+      ZkStateReader zkStateReader = cloudSolrClient.getZkStateReader();
 
       ClusterState clusterState = zkStateReader.getClusterState();
       Set<String> liveNodes = clusterState.getLiveNodes();
@@ -890,7 +890,7 @@ public class SolrCLI {
       
       SolrQuery q = new SolrQuery("*:*");
       q.setRows(0);      
-      QueryResponse qr = cloudSolrServer.query(q);
+      QueryResponse qr = cloudSolrClient.query(q);
       String collErr = null;
       long docCount = -1;
       try {
@@ -930,7 +930,7 @@ public class SolrCLI {
             replicaStatus = ZkStateReader.DOWN;
           } else {
             // query this replica directly to get doc count and assess health
-            HttpSolrServer solr = new HttpSolrServer(coreUrl);
+            HttpSolrClient solr = new HttpSolrClient(coreUrl);
             String solrUrl = solr.getBaseURL();
             q = new SolrQuery("*:*");
             q.setRows(0);
@@ -1103,9 +1103,9 @@ public class SolrCLI {
       }
 
       int toolExitStatus = 0;
-      CloudSolrServer cloudSolrServer = null;
+      CloudSolrClient cloudSolrServer = null;
       try {
-        cloudSolrServer = new CloudSolrServer(zkHost);
+        cloudSolrServer = new CloudSolrClient(zkHost);
         System.out.println("Connecting to ZooKeeper at " + zkHost);
         cloudSolrServer.connect();
         toolExitStatus = runCloudTool(cloudSolrServer, cli);
@@ -1129,8 +1129,8 @@ public class SolrCLI {
       return toolExitStatus;
     }
 
-    protected int runCloudTool(CloudSolrServer cloudSolrServer, CommandLine cli) throws Exception {
-      Set<String> liveNodes = cloudSolrServer.getZkStateReader().getClusterState().getLiveNodes();
+    protected int runCloudTool(CloudSolrClient cloudSolrClient, CommandLine cli) throws Exception {
+      Set<String> liveNodes = cloudSolrClient.getZkStateReader().getClusterState().getLiveNodes();
       if (liveNodes.isEmpty())
         throw new IllegalStateException("No live nodes found! Cannot create a collection until " +
             "there is at least 1 live node in the cluster.");
@@ -1183,13 +1183,13 @@ public class SolrCLI {
       }
 
       // test to see if that config exists in ZK
-      if (!cloudSolrServer.getZkStateReader().getZkClient().exists("/configs/"+configSetNameInZk, true)) {
+      if (!cloudSolrClient.getZkStateReader().getZkClient().exists("/configs/"+configSetNameInZk, true)) {
         System.out.println("Uploading "+confDir.getAbsolutePath()+
-            " for config "+configSetNameInZk+" to ZooKeeper at "+cloudSolrServer.getZkHost());
-        ZkController.uploadConfigDir(cloudSolrServer.getZkStateReader().getZkClient(), confDir, configSetNameInZk);
+            " for config "+configSetNameInZk+" to ZooKeeper at "+cloudSolrClient.getZkHost());
+        ZkController.uploadConfigDir(cloudSolrClient.getZkStateReader().getZkClient(), confDir, configSetNameInZk);
       }
 
-      String baseUrl = cloudSolrServer.getZkStateReader().getBaseUrlForNodeName(firstLiveNode);
+      String baseUrl = cloudSolrClient.getZkStateReader().getBaseUrlForNodeName(firstLiveNode);
       String collectionName = cli.getOptionValue("name");
 
       // since creating a collection is a heavy-weight operation, check for existence first

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java Wed Dec 31 14:31:03 2014
@@ -22,7 +22,7 @@ import java.io.IOException;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.solr.client.solrj.SolrQuery;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
 import org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION;
 import org.apache.solr.client.solrj.request.QueryRequest;
@@ -137,7 +137,7 @@ public class AnalysisAfterCoreReloadTest
     }
   }
 
-  protected SolrServer getSolrCore() {
+  protected SolrClient getSolrCore() {
     return new EmbeddedSolrServer(h.getCore());
   }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java Wed Dec 31 14:31:03 2014
@@ -18,7 +18,7 @@ package org.apache.solr;
  */
 
 import org.apache.lucene.util.LuceneTestCase.Slow;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.params.CommonParams;
@@ -243,7 +243,7 @@ public class TestDistributedGrouping ext
     setDistributedParams(params);
 
     int which = r.nextInt(clients.size());
-    SolrServer client = clients.get(which);
+    SolrClient client = clients.get(which);
     QueryResponse rsp = client.query(params);
     NamedList nl = (NamedList<?>) rsp.getResponse().get("grouped");
     nl = (NamedList<?>) nl.getVal(0);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestDistributedSearch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestDistributedSearch.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestDistributedSearch.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestDistributedSearch.java Wed Dec 31 14:31:03 2014
@@ -17,7 +17,6 @@
 
 package org.apache.solr;
 
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -25,10 +24,10 @@ import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.lucene.util.LuceneTestCase.Slow;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 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.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.response.FacetField;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.client.solrj.response.RangeFacet;
@@ -471,7 +470,7 @@ public class TestDistributedSearch exten
     for(int numDownServers = 0; numDownServers < jettys.size()-1; numDownServers++)
     {
       List<JettySolrRunner> upJettys = new ArrayList<>(jettys);
-      List<SolrServer> upClients = new ArrayList<>(clients);
+      List<SolrClient> upClients = new ArrayList<>(clients);
       List<JettySolrRunner> downJettys = new ArrayList<>();
       List<String> upShards = new ArrayList<>(Arrays.asList(shardsArr));
       for(int i=0; i<numDownServers; i++)
@@ -554,7 +553,7 @@ public class TestDistributedSearch exten
             "stats.field", tdate_a, 
             "stats.field", tdate_b,
             "stats.calcdistinct", "true");
-    } catch (HttpSolrServer.RemoteSolrException e) {
+    } catch (HttpSolrClient.RemoteSolrException e) {
       if (e.getMessage().startsWith("java.lang.NullPointerException"))  {
         fail("NullPointerException with stats request on empty index");
       } else  {
@@ -590,7 +589,7 @@ public class TestDistributedSearch exten
   }
 
   protected void queryPartialResults(final List<String> upShards,
-                                     final List<SolrServer> upClients, 
+                                     final List<SolrClient> upClients,
                                      Object... q) throws Exception {
     
     final ModifiableSolrParams params = new ModifiableSolrParams();
@@ -622,7 +621,7 @@ public class TestDistributedSearch exten
           public void run() {
             for (int j = 0; j < stress; j++) {
               int which = r.nextInt(upClients.size());
-              SolrServer client = upClients.get(which);
+              SolrClient client = upClients.get(which);
               try {
                 QueryResponse rsp = client.query(new ModifiableSolrParams(params));
                 if (verifyStress) {
@@ -643,10 +642,10 @@ public class TestDistributedSearch exten
     }
   }
 
-  protected QueryResponse queryRandomUpServer(ModifiableSolrParams params, List<SolrServer> upClients) throws SolrServerException {
+  protected QueryResponse queryRandomUpServer(ModifiableSolrParams params, List<SolrClient> upClients) throws SolrServerException {
     // query a random "up" server
     int which = r.nextInt(upClients.size());
-    SolrServer client = upClients.get(which);
+    SolrClient client = upClients.get(which);
     QueryResponse rsp = client.query(params);
     return rsp;
   }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java Wed Dec 31 14:31:03 2014
@@ -74,7 +74,7 @@ public class TestSolrCoreProperties exte
   public void testSimple() throws Exception {
     SolrParams params = params("q", "*:*", 
                                "echoParams", "all");
-    QueryResponse res = getSolrServer().query(params);
+    QueryResponse res = getSolrClient().query(params);
     assertEquals(0, res.getResults().getNumFound());
 
     NamedList echoedParams = (NamedList) res.getHeader().get("params");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestTolerantSearch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestTolerantSearch.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestTolerantSearch.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/TestTolerantSearch.java Wed Dec 31 14:31:03 2014
@@ -6,9 +6,9 @@ import java.io.OutputStream;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.solr.client.solrj.SolrQuery;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.CoreAdminRequest;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrException;
@@ -40,8 +40,8 @@ import org.junit.BeforeClass;
 
 public class TestTolerantSearch extends SolrJettyTestBase {
   
-  private static SolrServer collection1;
-  private static SolrServer collection2;
+  private static SolrClient collection1;
+  private static SolrClient collection2;
   private static String shard1;
   private static String shard2;
   private static File solrHome;
@@ -60,8 +60,8 @@ public class TestTolerantSearch extends
     solrHome = createSolrHome();
     createJetty(solrHome.getAbsolutePath(), null, null);
     String url = jetty.getBaseUrl().toString();
-    collection1 = new HttpSolrServer(url);
-    collection2 = new HttpSolrServer(url + "/collection2");
+    collection1 = new HttpSolrClient(url);
+    collection2 = new HttpSolrClient(url + "/collection2");
     
     String urlCollection1 = jetty.getBaseUrl().toString() + "/" + "collection1";
     String urlCollection2 = jetty.getBaseUrl().toString() + "/" + "collection2";

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java Wed Dec 31 14:31:03 2014
@@ -17,18 +17,13 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
-import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
-import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest.CreateAlias;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest.DeleteAlias;
 import org.apache.solr.client.solrj.request.QueryRequest;
@@ -43,6 +38,10 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Test sync phase that occurs when Leader goes down and a new Leader is
  * elected.
@@ -138,38 +137,38 @@ public class AliasIntegrationTest extend
     query.set("collection", "testalias");
     JettySolrRunner jetty = jettys.get(random().nextInt(jettys.size()));
     int port = jetty.getLocalPort();
-    HttpSolrServer server = new HttpSolrServer(buildUrl(port) + "/testalias");
-    res = server.query(query);
+    HttpSolrClient client = new HttpSolrClient(buildUrl(port) + "/testalias");
+    res = client.query(query);
     assertEquals(3, res.getResults().getNumFound());
-    server.shutdown();
-    server = null;
+    client.shutdown();
+    client = null;
     
     // now without collections param
     query = new SolrQuery("*:*");
     jetty = jettys.get(random().nextInt(jettys.size()));
     port = jetty.getLocalPort();
-    server = new HttpSolrServer(buildUrl(port) + "/testalias");
-    res = server.query(query);
+    client = new HttpSolrClient(buildUrl(port) + "/testalias");
+    res = client.query(query);
     assertEquals(3, res.getResults().getNumFound());
-    server.shutdown();
-    server = null;
+    client.shutdown();
+    client = null;
     
     // create alias, collection2 first because it's not on every node
     createAlias("testalias", "collection2,collection1");
     
     // search with new cloud client
-    CloudSolrServer cloudSolrServer = new CloudSolrServer(zkServer.getZkAddress(), random().nextBoolean());
-    cloudSolrServer.setParallelUpdates(random().nextBoolean());
+    CloudSolrClient cloudSolrClient = new CloudSolrClient(zkServer.getZkAddress(), random().nextBoolean());
+    cloudSolrClient.setParallelUpdates(random().nextBoolean());
     query = new SolrQuery("*:*");
     query.set("collection", "testalias");
-    res = cloudSolrServer.query(query);
+    res = cloudSolrClient.query(query);
     assertEquals(5, res.getResults().getNumFound());
     
     // Try with setDefaultCollection
     query = new SolrQuery("*:*");
-    cloudSolrServer.setDefaultCollection("testalias");
-    res = cloudSolrServer.query(query);
-    cloudSolrServer.shutdown();
+    cloudSolrClient.setDefaultCollection("testalias");
+    res = cloudSolrClient.query(query);
+    cloudSolrClient.shutdown();
     assertEquals(5, res.getResults().getNumFound());
     
     // search for alias with random non cloud client
@@ -177,8 +176,8 @@ public class AliasIntegrationTest extend
     query.set("collection", "testalias");
     jetty = jettys.get(random().nextInt(jettys.size()));
     port = jetty.getLocalPort();
-    server = new HttpSolrServer(buildUrl(port) + "/testalias");
-    res = server.query(query);
+    client = new HttpSolrClient(buildUrl(port) + "/testalias");
+    res = client.query(query);
     assertEquals(5, res.getResults().getNumFound());
     
     
@@ -186,11 +185,11 @@ public class AliasIntegrationTest extend
     query = new SolrQuery("*:*");
     jetty = jettys.get(random().nextInt(jettys.size()));
     port = jetty.getLocalPort();
-    server = new HttpSolrServer(buildUrl(port) + "/testalias");
-    res = server.query(query);
+    client = new HttpSolrClient(buildUrl(port) + "/testalias");
+    res = client.query(query);
     assertEquals(5, res.getResults().getNumFound());
-    server.shutdown();
-    server = null;
+    client.shutdown();
+    client = null;
     
     // update alias
     createAlias("testalias", "collection2");
@@ -214,26 +213,26 @@ public class AliasIntegrationTest extend
     // try a std client
     // search 1 and 2, but have no collections param
     query = new SolrQuery("*:*");
-    HttpSolrServer client = new HttpSolrServer(getBaseUrl((HttpSolrServer) clients.get(0)) + "/testalias");
-    res = client.query(query);
+    HttpSolrClient httpclient = new HttpSolrClient(getBaseUrl((HttpSolrClient) clients.get(0)) + "/testalias");
+    res = httpclient.query(query);
     assertEquals(5, res.getResults().getNumFound());
-    client.shutdown();
-    client = null;
+    httpclient.shutdown();
+    httpclient = null;
     
     createAlias("testalias", "collection2");
     
     // a second alias
     createAlias("testalias2", "collection2");
     
-    client = new HttpSolrServer(getBaseUrl((HttpSolrServer) clients.get(0)) + "/testalias");
+    httpclient = new HttpSolrClient(getBaseUrl((HttpSolrClient) clients.get(0)) + "/testalias");
     SolrInputDocument doc8 = getDoc(id, 11, i1, -600, tlong, 600, t1,
         "humpty dumpy4 sat on a walls");
-    client.add(doc8);
-    client.commit();
+    httpclient.add(doc8);
+    httpclient.commit();
     res = client.query(query);
     assertEquals(3, res.getResults().getNumFound());
-    client.shutdown();
-    client = null;
+    httpclient.shutdown();
+    httpclient = null;
     
     createAlias("testalias", "collection2,collection1");
     
@@ -256,8 +255,8 @@ public class AliasIntegrationTest extend
 
   private void createAlias(String alias, String collections)
       throws SolrServerException, IOException {
-    SolrServer server = createNewSolrServer("",
-        getBaseUrl((HttpSolrServer) clients.get(0)));
+    SolrClient client = createNewSolrClient("",
+        getBaseUrl((HttpSolrClient) clients.get(0)));
     if (random().nextBoolean()) {
       ModifiableSolrParams params = new ModifiableSolrParams();
       params.set("collections", collections);
@@ -265,33 +264,33 @@ public class AliasIntegrationTest extend
       params.set("action", CollectionAction.CREATEALIAS.toString());
       QueryRequest request = new QueryRequest(params);
       request.setPath("/admin/collections");
-      server.request(request);
+      client.request(request);
     } else {
       CreateAlias request = new CreateAlias();
       request.setAliasName(alias);
       request.setAliasedCollections(collections);
-      request.process(server);
+      request.process(client);
     }
-    server.shutdown();
+    client.shutdown();
   }
   
   private void deleteAlias(String alias) throws SolrServerException,
       IOException {
-    SolrServer server = createNewSolrServer("",
-        getBaseUrl((HttpSolrServer) clients.get(0)));
+    SolrClient client = createNewSolrClient("",
+        getBaseUrl((HttpSolrClient) clients.get(0)));
     if (random().nextBoolean()) {
       ModifiableSolrParams params = new ModifiableSolrParams();
       params.set("name", alias);
       params.set("action", CollectionAction.DELETEALIAS.toString());
       QueryRequest request = new QueryRequest(params);
       request.setPath("/admin/collections");
-      server.request(request);
+      client.request(request);
     } else {
       DeleteAlias request = new DeleteAlias();
       request.setAliasName(alias);
-      request.process(server);
+      request.process(client);
     }
-    server.shutdown();
+    client.shutdown();
   }
   
   protected void indexDoc(List<CloudJettyRunner> skipServers, Object... fields) throws IOException,

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/AsyncMigrateRouteKeyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/AsyncMigrateRouteKeyTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/AsyncMigrateRouteKeyTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/AsyncMigrateRouteKeyTest.java Wed Dec 31 14:31:03 2014
@@ -19,7 +19,7 @@ package org.apache.solr.cloud;
 
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.common.params.CollectionParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
@@ -113,14 +113,14 @@ public class AsyncMigrateRouteKeyTest ex
     SolrRequest request = new QueryRequest(params);
     request.setPath("/admin/collections");
 
-    String baseUrl = ((HttpSolrServer) shardToJetty.get(SHARD1).get(0).client.solrClient)
+    String baseUrl = ((HttpSolrClient) shardToJetty.get(SHARD1).get(0).client.solrClient)
         .getBaseURL();
     baseUrl = baseUrl.substring(0, baseUrl.length() - "collection1".length());
 
-    HttpSolrServer baseServer = null;
+    HttpSolrClient baseServer = null;
 
     try {
-      baseServer = new HttpSolrServer(baseUrl);
+      baseServer = new HttpSolrClient(baseUrl);
       baseServer.setConnectionTimeout(15000);
       return baseServer.request(request);
     } finally {

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java Wed Dec 31 14:31:03 2014
@@ -17,23 +17,15 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.BasicResponseHandler;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
-import org.apache.solr.client.solrj.SolrServer;
 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.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.CoreAdminRequest.Create;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
@@ -46,7 +38,13 @@ import org.apache.solr.common.params.Com
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.handler.ReplicationHandler;
-import org.apache.solr.util.AbstractSolrTestCase;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * This test simply does a bunch of basic things in solrcloud mode and asserts things
@@ -134,7 +132,7 @@ public class BasicDistributedZk2Test ext
       String nodeName = leaderProps.getStr(ZkStateReader.NODE_NAME_PROP);
       chaosMonkey.stopShardExcept(SHARD2, nodeName);
       
-      SolrServer client = getClient(nodeName);
+      SolrClient client = getClient(nodeName);
       
       index_specific(client, "id", docId + 1, t1, "what happens here?");
       
@@ -161,17 +159,17 @@ public class BasicDistributedZk2Test ext
   private void testNodeWithoutCollectionForwarding() throws Exception,
       SolrServerException, IOException {
     try {
-      final String baseUrl = getBaseUrl((HttpSolrServer) clients.get(0));
-      HttpSolrServer server = new HttpSolrServer(baseUrl);
-      server.setConnectionTimeout(30000);
+      final String baseUrl = getBaseUrl((HttpSolrClient) clients.get(0));
+      HttpSolrClient client = new HttpSolrClient(baseUrl);
+      client.setConnectionTimeout(30000);
       Create createCmd = new Create();
       createCmd.setRoles("none");
       createCmd.setCoreName(ONE_NODE_COLLECTION + "core");
       createCmd.setCollection(ONE_NODE_COLLECTION);
       createCmd.setNumShards(1);
       createCmd.setDataDir(getDataDir(createTempDir(ONE_NODE_COLLECTION).toFile().getAbsolutePath()));
-      server.request(createCmd);
-      server.shutdown();
+      client.request(createCmd);
+      client.shutdown();
     } catch (Exception e) {
       e.printStackTrace();
       fail(e.getMessage());
@@ -183,8 +181,8 @@ public class BasicDistributedZk2Test ext
     cloudClient.getZkStateReader().getLeaderRetry(ONE_NODE_COLLECTION, SHARD1, 30000);
     
     int docs = 2;
-    for (SolrServer client : clients) {
-      final String baseUrl = getBaseUrl((HttpSolrServer) client);
+    for (SolrClient client : clients) {
+      final String baseUrl = getBaseUrl((HttpSolrClient) client);
       addAndQueryDocs(baseUrl, docs);
       docs += 2;
     }
@@ -193,7 +191,7 @@ public class BasicDistributedZk2Test ext
   // 2 docs added every call
   private void addAndQueryDocs(final String baseUrl, int docs)
       throws Exception {
-    HttpSolrServer qclient = new HttpSolrServer(baseUrl + "/onenodecollection" + "core");
+    HttpSolrClient qclient = new HttpSolrClient(baseUrl + "/onenodecollection" + "core");
     
     // it might take a moment for the proxy node to see us in their cloud state
     waitForNon403or404or503(qclient);
@@ -209,7 +207,7 @@ public class BasicDistributedZk2Test ext
     assertEquals(docs - 1, results.getResults().getNumFound());
     qclient.shutdown();
     
-    qclient = new HttpSolrServer(baseUrl + "/onenodecollection");
+    qclient = new HttpSolrClient(baseUrl + "/onenodecollection");
     results = qclient.query(query);
     assertEquals(docs - 1, results.getResults().getNumFound());
     
@@ -351,7 +349,7 @@ public class BasicDistributedZk2Test ext
       System.err.println(controlClient.query(new SolrQuery("*:*")).getResults()
           .getNumFound());
       
-      for (SolrServer client : clients) {
+      for (SolrClient client : clients) {
         try {
           SolrQuery q = new SolrQuery("*:*");
           q.set("distrib", false);
@@ -411,7 +409,7 @@ public class BasicDistributedZk2Test ext
     checkShardConsistency(true, false);
     
     // try a backup command
-    final HttpSolrServer client = (HttpSolrServer) shardToJetty.get(SHARD2).get(0).client.solrClient;
+    final HttpSolrClient client = (HttpSolrClient) shardToJetty.get(SHARD2).get(0).client.solrClient;
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set("qt", "/replication");
     params.set("command", "backup");
@@ -424,7 +422,7 @@ public class BasicDistributedZk2Test ext
     checkForBackupSuccess(client, location);
   }
 
-  private void checkForBackupSuccess(final HttpSolrServer client, File location)
+  private void checkForBackupSuccess(final HttpSolrClient client, File location)
       throws InterruptedException, IOException {
     class CheckStatus extends Thread {
       volatile String fail = null;

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java Wed Dec 31 14:31:03 2014
@@ -17,33 +17,16 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CompletionService;
-import java.util.concurrent.ExecutorCompletionService;
-import java.util.concurrent.Future;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.commons.lang.StringUtils;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.JSONTestUtil;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrRequest;
-import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.AbstractUpdateRequest;
 import org.apache.solr.client.solrj.request.ContentStreamUpdateRequest;
 import org.apache.solr.client.solrj.request.CoreAdminRequest.Create;
@@ -70,6 +53,23 @@ import org.apache.solr.util.DefaultSolrT
 import org.junit.Before;
 import org.junit.BeforeClass;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CompletionService;
+import java.util.concurrent.ExecutorCompletionService;
+import java.util.concurrent.Future;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
 
 /**
  * This test simply does a bunch of basic things in solrcloud mode and asserts things
@@ -88,7 +88,7 @@ public class BasicDistributedZkTest exte
   String oddField="oddField_s";
   String missingField="ignore_exception__missing_but_valid_field_t";
 
-  private Map<String,List<SolrServer>> otherCollectionClients = new HashMap<>();
+  private Map<String,List<SolrClient>> otherCollectionClients = new HashMap<>();
 
   private String oneInstanceCollection = "oneInstanceCollection";
   private String oneInstanceCollection2 = "oneInstanceCollection2";
@@ -163,9 +163,9 @@ public class BasicDistributedZkTest exte
     // ask every individual replica of every shard to update+commit the same doc id
     // with an incrementing counter on each update+commit
     int foo_i_counter = 0;
-    for (SolrServer server : clients) {
+    for (SolrClient client : clients) {
       foo_i_counter++;
-      indexDoc(server, params("commit", "true"), // SOLR-4923
+      indexDoc(client, params("commit", "true"), // SOLR-4923
                sdoc(id,1, i1,100, tlong,100, "foo_i", foo_i_counter));
       // after every update+commit, check all the shards consistency
       queryAndCompareShards(params("q", "id:1", "distrib", "false", 
@@ -341,8 +341,8 @@ public class BasicDistributedZkTest exte
       Thread.sleep(100);
     }
     
-    for (SolrServer client : clients) {
-      assertEquals("commitWithin did not work on node: " + ((HttpSolrServer)client).getBaseURL(), before + 1, client.query(new SolrQuery("*:*")).getResults().getNumFound());
+    for (SolrClient client : clients) {
+      assertEquals("commitWithin did not work on node: " + ((HttpSolrClient)client).getBaseURL(), before + 1, client.query(new SolrQuery("*:*")).getResults().getNumFound());
     }
     
     // TODO: This test currently fails because debug info is obtained only
@@ -381,14 +381,14 @@ public class BasicDistributedZkTest exte
     createCmd.setSchemaName("nonexistent_schema.xml");
     
     String url = getBaseUrl(clients.get(0));
-    final HttpSolrServer server = new HttpSolrServer(url);
+    final HttpSolrClient client = new HttpSolrClient(url);
     try {
-      server.request(createCmd);
+      client.request(createCmd);
       fail("Expected SolrCore create to fail");
     } catch (Exception e) {
       
     } finally {
-      server.shutdown();
+      client.shutdown();
     }
     
     long timeout = System.currentTimeMillis() + 15000;
@@ -410,9 +410,9 @@ public class BasicDistributedZkTest exte
     for (String shard : shardToJetty.keySet()) {
       // every client should give the same numDocs for this shard
       // shffle the clients in a diff order for each shard
-      List<SolrServer> solrclients = new ArrayList<>(this.clients);
+      List<SolrClient> solrclients = new ArrayList<>(this.clients);
       Collections.shuffle(solrclients, random());
-      for (SolrServer client : solrclients) {
+      for (SolrClient client : solrclients) {
         query.set("shards", shard);
         long numDocs = client.query(query).getResults().getNumFound();
         assertTrue("numDocs < 0 for shard "+shard+" via "+client,
@@ -484,7 +484,7 @@ public class BasicDistributedZkTest exte
     }
     String randShards = StringUtils.join(randomShards, ",");
     query.set("shards", randShards);
-    for (SolrServer client : this.clients) {
+    for (SolrClient client : this.clients) {
       assertEquals("numDocs for "+randShards+" via "+client,
                    randomShardCountsExpected, 
                    client.query(query).getResults().getNumFound());
@@ -496,7 +496,7 @@ public class BasicDistributedZkTest exte
     for (Long c : shardCounts.values()) {
       totalShardNumDocs += c;
     }
-    for (SolrServer client : clients) {
+    for (SolrClient client : clients) {
       assertEquals("sum of shard numDocs on client: " + client, 
                    totalShardNumDocs,
                    client.query(query).getResults().getNumFound());
@@ -507,22 +507,22 @@ public class BasicDistributedZkTest exte
   }
 
   private void testStopAndStartCoresInOneInstance() throws Exception {
-    SolrServer client = clients.get(0);
+    SolrClient client = clients.get(0);
     String url3 = getBaseUrl(client);
-    final HttpSolrServer server = new HttpSolrServer(url3);
-    server.setConnectionTimeout(15000);
-    server.setSoTimeout(60000);
+    final HttpSolrClient httpSolrClient = new HttpSolrClient(url3);
+    httpSolrClient.setConnectionTimeout(15000);
+    httpSolrClient.setSoTimeout(60000);
     ThreadPoolExecutor executor = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
         5, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
         new DefaultSolrThreadFactory("testExecutor"));
     int cnt = 3;
     
     // create the cores
-    createCores(server, executor, "multiunload2", 1, cnt);
+    createCores(httpSolrClient, executor, "multiunload2", 1, cnt);
     
     executor.shutdown();
     executor.awaitTermination(120, TimeUnit.SECONDS);
-    server.shutdown();
+    httpSolrClient.shutdown();
     
     ChaosMonkey.stop(cloudJettys.get(0).jetty);
     printLayout();
@@ -541,7 +541,7 @@ public class BasicDistributedZkTest exte
 
   }
 
-  protected void createCores(final HttpSolrServer server,
+  protected void createCores(final HttpSolrClient client,
       ThreadPoolExecutor executor, final String collection, final int numShards, int cnt) {
     for (int i = 0; i < cnt; i++) {
       final int freezeI = i;
@@ -558,7 +558,7 @@ public class BasicDistributedZkTest exte
             String core3dataDir = createTempDir(collection).toFile().getAbsolutePath();
             createCmd.setDataDir(getDataDir(core3dataDir));
 
-            server.request(createCmd);
+            client.request(createCmd);
           } catch (SolrServerException e) {
             throw new RuntimeException(e);
           } catch (IOException e) {
@@ -570,17 +570,17 @@ public class BasicDistributedZkTest exte
     }
   }
 
-  protected String getBaseUrl(SolrServer client) {
-    String url2 = ((HttpSolrServer) client).getBaseURL()
+  protected String getBaseUrl(SolrClient client) {
+    String url2 = ((HttpSolrClient) client).getBaseURL()
         .substring(
             0,
-            ((HttpSolrServer) client).getBaseURL().length()
+            ((HttpSolrClient) client).getBaseURL().length()
                 - DEFAULT_COLLECTION.length() -1);
     return url2;
   }
 
   protected CollectionAdminResponse createCollection(Map<String, List<Integer>> collectionInfos,
-                                                     String collectionName, int numShards, int numReplicas, int maxShardsPerNode, SolrServer client, String createNodeSetStr) throws SolrServerException, IOException {
+                                                     String collectionName, int numShards, int numReplicas, int maxShardsPerNode, SolrClient client, String createNodeSetStr) throws SolrServerException, IOException {
     // TODO: Use CollectionAdminRequest for this test
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set("action", CollectionAction.CREATE.toString());
@@ -603,12 +603,12 @@ public class BasicDistributedZkTest exte
 
     CollectionAdminResponse res = new CollectionAdminResponse();
     if (client == null) {
-      final String baseUrl = ((HttpSolrServer) clients.get(clientIndex)).getBaseURL().substring(
+      final String baseUrl = ((HttpSolrClient) clients.get(clientIndex)).getBaseURL().substring(
           0,
-          ((HttpSolrServer) clients.get(clientIndex)).getBaseURL().length()
+          ((HttpSolrClient) clients.get(clientIndex)).getBaseURL().length()
               - DEFAULT_COLLECTION.length() - 1);
       
-      SolrServer aClient = createNewSolrServer("", baseUrl);
+      SolrClient aClient = createNewSolrClient("", baseUrl);
       res.setResponse(aClient.request(request));
       aClient.shutdown();
     } else {
@@ -618,7 +618,7 @@ public class BasicDistributedZkTest exte
   }
   
   protected ZkCoreNodeProps getLeaderUrlFromZk(String collection, String slice) {
-    ClusterState clusterState = getCommonCloudSolrServer().getZkStateReader().getClusterState();
+    ClusterState clusterState = getCommonCloudSolrClient().getZkStateReader().getClusterState();
     ZkNodeProps leader = clusterState.getLeader(collection, slice);
     if (leader == null) {
       throw new RuntimeException("Could not find leader:" + collection + " " + slice);
@@ -647,7 +647,7 @@ public class BasicDistributedZkTest exte
     
     for (int i = 1; i < numLoops; i++) {
       // add doc to random client
-      SolrServer updateClient = clients.get(random().nextInt(clients.size()));
+      SolrClient updateClient = clients.get(random().nextInt(clients.size()));
       SolrInputDocument doc = new SolrInputDocument();
       addFields(doc, id, i, fieldA, val, fieldB, val);
       UpdateResponse ures = add(updateClient, updateParams, doc);
@@ -683,7 +683,7 @@ public class BasicDistributedZkTest exte
     indexDoc(sd);
 
     ignoreException("version conflict");
-    for (SolrServer client : clients) {
+    for (SolrClient client : clients) {
       try {
         client.add(sd);
         fail();
@@ -700,14 +700,14 @@ public class BasicDistributedZkTest exte
 
     List<Integer> expected = new ArrayList<>();
     int val = 0;
-    for (SolrServer client : clients) {
+    for (SolrClient client : clients) {
       val += 10;
       client.add(sdoc("id", 1000, "val_i", map("add",val), "foo_i",val));
       expected.add(val);
     }
 
     QueryRequest qr = new QueryRequest(params("qt", "/get", "id","1000"));
-    for (SolrServer client : clients) {
+    for (SolrClient client : clients) {
       val += 10;
       NamedList rsp = client.request(qr);
       String match = JSONTestUtil.matchObj("/val_i", rsp.get("doc"), expected);
@@ -718,7 +718,7 @@ public class BasicDistributedZkTest exte
   private void testNumberOfCommitsWithCommitAfterAdd()
       throws SolrServerException, IOException {
     log.info("### STARTING testNumberOfCommitsWithCommitAfterAdd");
-    long startCommits = getNumCommits((HttpSolrServer) clients.get(0));
+    long startCommits = getNumCommits((HttpSolrClient) clients.get(0));
     
     ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update");
     up.addFile(getFile("books_numeric_ids.csv"), "application/csv");
@@ -726,38 +726,38 @@ public class BasicDistributedZkTest exte
     up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
     NamedList<Object> result = clients.get(0).request(up);
     
-    long endCommits = getNumCommits((HttpSolrServer) clients.get(0));
+    long endCommits = getNumCommits((HttpSolrClient) clients.get(0));
 
     assertEquals(startCommits + 1L, endCommits);
   }
 
-  private Long getNumCommits(HttpSolrServer solrServer) throws
+  private Long getNumCommits(HttpSolrClient sourceClient) throws
       SolrServerException, IOException {
-    HttpSolrServer server = new HttpSolrServer(solrServer.getBaseURL());
-    server.setConnectionTimeout(15000);
-    server.setSoTimeout(60000);
+    HttpSolrClient client = new HttpSolrClient(sourceClient.getBaseURL());
+    client.setConnectionTimeout(15000);
+    client.setSoTimeout(60000);
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set("qt", "/admin/mbeans?key=updateHandler&stats=true");
     // use generic request to avoid extra processing of queries
     QueryRequest req = new QueryRequest(params);
-    NamedList<Object> resp = server.request(req);
+    NamedList<Object> resp = client.request(req);
     NamedList mbeans = (NamedList) resp.get("solr-mbeans");
     NamedList uhandlerCat = (NamedList) mbeans.get("UPDATEHANDLER");
     NamedList uhandler = (NamedList) uhandlerCat.get("updateHandler");
     NamedList stats = (NamedList) uhandler.get("stats");
     Long commits = (Long) stats.get("commits");
-    server.shutdown();
+    client.shutdown();
     return commits;
   }
 
   private void testANewCollectionInOneInstanceWithManualShardAssignement() throws Exception {
     log.info("### STARTING testANewCollectionInOneInstanceWithManualShardAssignement");
     System.clearProperty("numShards");
-    List<SolrServer> collectionClients = new ArrayList<>();
-    SolrServer client = clients.get(0);
-    final String baseUrl = ((HttpSolrServer) client).getBaseURL().substring(
+    List<SolrClient> collectionClients = new ArrayList<>();
+    SolrClient client = clients.get(0);
+    final String baseUrl = ((HttpSolrClient) client).getBaseURL().substring(
         0,
-        ((HttpSolrServer) client).getBaseURL().length()
+        ((HttpSolrClient) client).getBaseURL().length()
             - DEFAULT_COLLECTION.length() - 1);
     createSolrCore(oneInstanceCollection2, collectionClients, baseUrl, 1, "slice1");
     createSolrCore(oneInstanceCollection2, collectionClients, baseUrl, 2, "slice2");
@@ -770,16 +770,16 @@ public class BasicDistributedZkTest exte
       pending.remove(future);
     }
     
-    SolrServer client1 = collectionClients.get(0);
-    SolrServer client2 = collectionClients.get(1);
-    SolrServer client3 = collectionClients.get(2);
-    SolrServer client4 = collectionClients.get(3);
+    SolrClient client1 = collectionClients.get(0);
+    SolrClient client2 = collectionClients.get(1);
+    SolrClient client3 = collectionClients.get(2);
+    SolrClient client4 = collectionClients.get(3);
     
 
     // no one should be recovering
-    waitForRecoveriesToFinish(oneInstanceCollection2, getCommonCloudSolrServer().getZkStateReader(), false, true);
+    waitForRecoveriesToFinish(oneInstanceCollection2, getCommonCloudSolrClient().getZkStateReader(), false, true);
     
-    assertAllActive(oneInstanceCollection2, getCommonCloudSolrServer().getZkStateReader());
+    assertAllActive(oneInstanceCollection2, getCommonCloudSolrClient().getZkStateReader());
     
     //printLayout();
     
@@ -800,7 +800,7 @@ public class BasicDistributedZkTest exte
     
     query.set("collection", oneInstanceCollection2);
     query.set("distrib", true);
-    long allDocs = getCommonCloudSolrServer().query(query).getResults().getNumFound();
+    long allDocs = getCommonCloudSolrClient().query(query).getResults().getNumFound();
     
 //    System.out.println("1:" + oneDocs);
 //    System.out.println("2:" + twoDocs);
@@ -814,7 +814,7 @@ public class BasicDistributedZkTest exte
     assertEquals(3, allDocs);
     
     // we added a role of none on these creates - check for it
-    ZkStateReader zkStateReader = getCommonCloudSolrServer().getZkStateReader();
+    ZkStateReader zkStateReader = getCommonCloudSolrClient().getZkStateReader();
     zkStateReader.updateClusterState(true);
     Map<String,Slice> slices = zkStateReader.getClusterState().getSlicesMap(oneInstanceCollection2);
     assertNotNull(slices);
@@ -822,19 +822,19 @@ public class BasicDistributedZkTest exte
     assertEquals("none", roles);
     
     
-    ZkCoreNodeProps props = new ZkCoreNodeProps(getCommonCloudSolrServer().getZkStateReader().getClusterState().getLeader(oneInstanceCollection2, "slice1"));
+    ZkCoreNodeProps props = new ZkCoreNodeProps(getCommonCloudSolrClient().getZkStateReader().getClusterState().getLeader(oneInstanceCollection2, "slice1"));
     
     // now test that unloading a core gets us a new leader
-    HttpSolrServer server = new HttpSolrServer(baseUrl);
-    server.setConnectionTimeout(15000);
-    server.setSoTimeout(60000);
+    HttpSolrClient unloadClient = new HttpSolrClient(baseUrl);
+    unloadClient.setConnectionTimeout(15000);
+    unloadClient.setSoTimeout(60000);
     Unload unloadCmd = new Unload(true);
     unloadCmd.setCoreName(props.getCoreName());
     
     String leader = props.getCoreUrl();
     
-    server.request(unloadCmd);
-    server.shutdown();
+    unloadClient.request(unloadCmd);
+    unloadClient.shutdown();
     
     int tries = 50;
     while (leader.equals(zkStateReader.getLeaderUrl(oneInstanceCollection2, "slice1", 10000))) {
@@ -844,7 +844,7 @@ public class BasicDistributedZkTest exte
       }
     }
 
-    for (SolrServer aClient : collectionClients) {
+    for (SolrClient aClient : collectionClients) {
       aClient.shutdown();
     }
 
@@ -852,15 +852,15 @@ public class BasicDistributedZkTest exte
 
   private void testSearchByCollectionName() throws SolrServerException {
     log.info("### STARTING testSearchByCollectionName");
-    SolrServer client = clients.get(0);
-    final String baseUrl = ((HttpSolrServer) client).getBaseURL().substring(
+    SolrClient client = clients.get(0);
+    final String baseUrl = ((HttpSolrClient) client).getBaseURL().substring(
         0,
-        ((HttpSolrServer) client).getBaseURL().length()
+        ((HttpSolrClient) client).getBaseURL().length()
             - DEFAULT_COLLECTION.length() - 1);
     
     // the cores each have different names, but if we add the collection name to the url
     // we should get mapped to the right core
-    SolrServer client1 = createNewSolrServer(oneInstanceCollection, baseUrl);
+    SolrClient client1 = createNewSolrClient(oneInstanceCollection, baseUrl);
     SolrQuery query = new SolrQuery("*:*");
     long oneDocs = client1.query(query).getResults().getNumFound();
     assertEquals(3, oneDocs);
@@ -869,27 +869,27 @@ public class BasicDistributedZkTest exte
   
   private void testUpdateByCollectionName() throws SolrServerException, IOException {
     log.info("### STARTING testUpdateByCollectionName");
-    SolrServer client = clients.get(0);
-    final String baseUrl = ((HttpSolrServer) client).getBaseURL().substring(
+    SolrClient client = clients.get(0);
+    final String baseUrl = ((HttpSolrClient) client).getBaseURL().substring(
         0,
-        ((HttpSolrServer) client).getBaseURL().length()
+        ((HttpSolrClient) client).getBaseURL().length()
             - DEFAULT_COLLECTION.length() - 1);
     
     // the cores each have different names, but if we add the collection name to the url
     // we should get mapped to the right core
     // test hitting an update url
-    SolrServer client1 = createNewSolrServer(oneInstanceCollection, baseUrl);
+    SolrClient client1 = createNewSolrClient(oneInstanceCollection, baseUrl);
     client1.commit();
     client1.shutdown();
   }
 
   private void testANewCollectionInOneInstance() throws Exception {
     log.info("### STARTING testANewCollectionInOneInstance");
-    List<SolrServer> collectionClients = new ArrayList<>();
-    SolrServer client = clients.get(0);
-    final String baseUrl = ((HttpSolrServer) client).getBaseURL().substring(
+    List<SolrClient> collectionClients = new ArrayList<>();
+    SolrClient client = clients.get(0);
+    final String baseUrl = ((HttpSolrClient) client).getBaseURL().substring(
         0,
-        ((HttpSolrServer) client).getBaseURL().length()
+        ((HttpSolrClient) client).getBaseURL().length()
             - DEFAULT_COLLECTION.length() - 1);
     createCollection(oneInstanceCollection, collectionClients, baseUrl, 1);
     createCollection(oneInstanceCollection, collectionClients, baseUrl, 2);
@@ -903,13 +903,13 @@ public class BasicDistributedZkTest exte
       pending.remove(future);
     }
    
-    SolrServer client1 = collectionClients.get(0);
-    SolrServer client2 = collectionClients.get(1);
-    SolrServer client3 = collectionClients.get(2);
-    SolrServer client4 = collectionClients.get(3);
+    SolrClient client1 = collectionClients.get(0);
+    SolrClient client2 = collectionClients.get(1);
+    SolrClient client3 = collectionClients.get(2);
+    SolrClient client4 = collectionClients.get(3);
  
-    waitForRecoveriesToFinish(oneInstanceCollection, getCommonCloudSolrServer().getZkStateReader(), false);
-    assertAllActive(oneInstanceCollection, getCommonCloudSolrServer().getZkStateReader());
+    waitForRecoveriesToFinish(oneInstanceCollection, getCommonCloudSolrClient().getZkStateReader(), false);
+    assertAllActive(oneInstanceCollection, getCommonCloudSolrClient().getZkStateReader());
     
     client2.add(getDoc(id, "1")); 
     client3.add(getDoc(id, "2")); 
@@ -925,7 +925,7 @@ public class BasicDistributedZkTest exte
     
     query.set("collection", oneInstanceCollection);
     query.set("distrib", true);
-    long allDocs = getCommonCloudSolrServer().query(query).getResults().getNumFound();
+    long allDocs = getCommonCloudSolrClient().query(query).getResults().getNumFound();
     
 //    System.out.println("1:" + oneDocs);
 //    System.out.println("2:" + twoDocs);
@@ -934,26 +934,26 @@ public class BasicDistributedZkTest exte
 //    System.out.println("All Docs:" + allDocs);
     
     assertEquals(3, allDocs);
-    for(SolrServer newCollectionClient:collectionClients) {
+    for(SolrClient newCollectionClient:collectionClients) {
       newCollectionClient.shutdown();
     }
   }
 
   private void createCollection(String collection,
-      List<SolrServer> collectionClients, String baseUrl, int num) {
+      List<SolrClient> collectionClients, String baseUrl, int num) {
     createSolrCore(collection, collectionClients, baseUrl, num, null);
   }
   
   private void createSolrCore(final String collection,
-      List<SolrServer> collectionClients, final String baseUrl, final int num,
+      List<SolrClient> collectionClients, final String baseUrl, final int num,
       final String shardId) {
     Callable call = new Callable() {
       @Override
       public Object call() {
-        HttpSolrServer server = null;
+        HttpSolrClient client = null;
         try {
-          server = new HttpSolrServer(baseUrl);
-          server.setConnectionTimeout(15000);
+          client = new HttpSolrClient(baseUrl);
+          client.setConnectionTimeout(15000);
           Create createCmd = new Create();
           createCmd.setRoles("none");
           createCmd.setCoreName(collection + num);
@@ -971,13 +971,13 @@ public class BasicDistributedZkTest exte
           if (shardId != null) {
             createCmd.setShardId(shardId);
           }
-          server.request(createCmd);
+          client.request(createCmd);
         } catch (Exception e) {
           e.printStackTrace();
           //fail
         } finally {
-          if (server != null) {
-            server.shutdown();
+          if (client != null) {
+            client.shutdown();
           }
         }
         return null;
@@ -987,7 +987,7 @@ public class BasicDistributedZkTest exte
     pending.add(completionService.submit(call));
  
     
-    collectionClients.add(createNewSolrServer(collection + num, baseUrl));
+    collectionClients.add(createNewSolrClient(collection + num, baseUrl));
   }
 
   private void testMultipleCollections() throws Exception {
@@ -1006,21 +1006,21 @@ public class BasicDistributedZkTest exte
     indexDoc("collection2", getDoc(id, "10000000")); 
     indexDoc("collection2", getDoc(id, "10000001")); 
     indexDoc("collection2", getDoc(id, "10000003"));
-    getCommonCloudSolrServer().setDefaultCollection("collection2");
-    getCommonCloudSolrServer().add(getDoc(id, "10000004"));
-    getCommonCloudSolrServer().setDefaultCollection(null);
+    getCommonCloudSolrClient().setDefaultCollection("collection2");
+    getCommonCloudSolrClient().add(getDoc(id, "10000004"));
+    getCommonCloudSolrClient().setDefaultCollection(null);
     
     indexDoc("collection3", getDoc(id, "20000000"));
     indexDoc("collection3", getDoc(id, "20000001")); 
-    getCommonCloudSolrServer().setDefaultCollection("collection3");
-    getCommonCloudSolrServer().add(getDoc(id, "10000005"));
-    getCommonCloudSolrServer().setDefaultCollection(null);
+    getCommonCloudSolrClient().setDefaultCollection("collection3");
+    getCommonCloudSolrClient().add(getDoc(id, "10000005"));
+    getCommonCloudSolrClient().setDefaultCollection(null);
     
     otherCollectionClients.get("collection2").get(0).commit();
     otherCollectionClients.get("collection3").get(0).commit();
     
-    getCommonCloudSolrServer().setDefaultCollection("collection1");
-    long collection1Docs = getCommonCloudSolrServer().query(new SolrQuery("*:*")).getResults()
+    getCommonCloudSolrClient().setDefaultCollection("collection1");
+    long collection1Docs = getCommonCloudSolrClient().query(new SolrQuery("*:*")).getResults()
         .getNumFound();
 
     long collection2Docs = otherCollectionClients.get("collection2").get(0)
@@ -1041,19 +1041,19 @@ public class BasicDistributedZkTest exte
     assertEquals(collection1Docs + collection2Docs + collection3Docs, found);
     
     // try to search multiple with cloud client
-    found = getCommonCloudSolrServer().query(query).getResults().getNumFound();
+    found = getCommonCloudSolrClient().query(query).getResults().getNumFound();
     assertEquals(collection1Docs + collection2Docs + collection3Docs, found);
     
     query.set("collection", "collection2,collection3");
-    found = getCommonCloudSolrServer().query(query).getResults().getNumFound();
+    found = getCommonCloudSolrClient().query(query).getResults().getNumFound();
     assertEquals(collection2Docs + collection3Docs, found);
     
     query.set("collection", "collection3");
-    found = getCommonCloudSolrServer().query(query).getResults().getNumFound();
+    found = getCommonCloudSolrClient().query(query).getResults().getNumFound();
     assertEquals(collection3Docs, found);
     
     query.remove("collection");
-    found = getCommonCloudSolrServer().query(query).getResults().getNumFound();
+    found = getCommonCloudSolrClient().query(query).getResults().getNumFound();
     assertEquals(collection1Docs, found);
     
     assertEquals(collection3Docs, collection2Docs - 1);
@@ -1066,49 +1066,49 @@ public class BasicDistributedZkTest exte
   }
   
   protected void indexDoc(String collection, SolrInputDocument doc) throws IOException, SolrServerException {
-    List<SolrServer> clients = otherCollectionClients.get(collection);
+    List<SolrClient> clients = otherCollectionClients.get(collection);
     int which = (doc.getField(id).toString().hashCode() & 0x7fffffff) % clients.size();
-    SolrServer client = clients.get(which);
+    SolrClient client = clients.get(which);
     client.add(doc);
   }
   
   private void createNewCollection(final String collection) throws InterruptedException {
-    final List<SolrServer> collectionClients = new ArrayList<>();
+    final List<SolrClient> collectionClients = new ArrayList<>();
     otherCollectionClients.put(collection, collectionClients);
     int unique = 0;
-    for (final SolrServer client : clients) {
+    for (final SolrClient client : clients) {
       unique++;
-      final String baseUrl = ((HttpSolrServer) client).getBaseURL()
+      final String baseUrl = ((HttpSolrClient) client).getBaseURL()
           .substring(
               0,
-              ((HttpSolrServer) client).getBaseURL().length()
+              ((HttpSolrClient) client).getBaseURL().length()
                   - DEFAULT_COLLECTION.length() -1);
       final int frozeUnique = unique;
       Callable call = new Callable() {
         @Override
         public Object call() {
-          HttpSolrServer server = null;
+          HttpSolrClient client = null;
           try {
-            server = new HttpSolrServer(baseUrl);
-            server.setConnectionTimeout(15000);
-            server.setSoTimeout(60000);
+            client = new HttpSolrClient(baseUrl);
+            client.setConnectionTimeout(15000);
+            client.setSoTimeout(60000);
             Create createCmd = new Create();
             createCmd.setCoreName(collection);
             createCmd.setDataDir(getDataDir(createTempDir(collection).toFile().getAbsolutePath()));
-            server.request(createCmd);
+            client.request(createCmd);
           } catch (Exception e) {
             e.printStackTrace();
             //fails
           } finally {
-            if (server != null) {
-              server.shutdown();
+            if (client != null) {
+              client.shutdown();
             }
           }
           return null;
         }
       };
      
-      collectionClients.add(createNewSolrServer(collection, baseUrl));
+      collectionClients.add(createNewSolrClient(collection, baseUrl));
       pending.add(completionService.submit(call));
       while (pending != null && pending.size() > 0) {
         
@@ -1119,33 +1119,33 @@ public class BasicDistributedZkTest exte
     }
   }
   
-  protected SolrServer createNewSolrServer(String collection, String baseUrl) {
+  protected SolrClient createNewSolrClient(String collection, String baseUrl) {
     try {
       // setup the server...
-      HttpSolrServer s = new HttpSolrServer(baseUrl + "/" + collection);
-      s.setSoTimeout(120000);
-      s.setDefaultMaxConnectionsPerHost(100);
-      s.setMaxTotalConnections(100);
-      return s;
+      HttpSolrClient client = new HttpSolrClient(baseUrl + "/" + collection);
+      client.setSoTimeout(120000);
+      client.setDefaultMaxConnectionsPerHost(100);
+      client.setMaxTotalConnections(100);
+      return client;
     }
     catch (Exception ex) {
       throw new RuntimeException(ex);
     }
   }
 
-  volatile CloudSolrServer commondCloudSolrServer;
-  protected CloudSolrServer getCommonCloudSolrServer() {
-    if (commondCloudSolrServer == null) {
+  volatile CloudSolrClient commondCloudSolrClient;
+  protected CloudSolrClient getCommonCloudSolrClient() {
+    if (commondCloudSolrClient == null) {
       synchronized(this) {
-        commondCloudSolrServer = new CloudSolrServer(zkServer.getZkAddress(), random().nextBoolean());
-        commondCloudSolrServer.setParallelUpdates(random().nextBoolean());
-        commondCloudSolrServer.setDefaultCollection(DEFAULT_COLLECTION);
-        commondCloudSolrServer.getLbServer().setConnectionTimeout(15000);
-        commondCloudSolrServer.getLbServer().setSoTimeout(30000);
-        commondCloudSolrServer.connect();
+        commondCloudSolrClient = new CloudSolrClient(zkServer.getZkAddress(), random().nextBoolean());
+        commondCloudSolrClient.setParallelUpdates(random().nextBoolean());
+        commondCloudSolrClient.setDefaultCollection(DEFAULT_COLLECTION);
+        commondCloudSolrClient.getLbClient().setConnectionTimeout(15000);
+        commondCloudSolrClient.getLbClient().setSoTimeout(30000);
+        commondCloudSolrClient.connect();
       }
     }
-    return commondCloudSolrServer;
+    return commondCloudSolrClient;
   }
 
   @Override
@@ -1157,19 +1157,19 @@ public class BasicDistributedZkTest exte
     if (r.nextBoolean())
       params.set("collection",DEFAULT_COLLECTION);
 
-    QueryResponse rsp = getCommonCloudSolrServer().query(params);
+    QueryResponse rsp = getCommonCloudSolrClient().query(params);
     return rsp;
   }
   
   @Override
   public void tearDown() throws Exception {
     super.tearDown();
-    if (commondCloudSolrServer != null) {
-      commondCloudSolrServer.shutdown();
+    if (commondCloudSolrClient != null) {
+      commondCloudSolrClient.shutdown();
     }
     if (otherCollectionClients != null) {
-      for (List<SolrServer> clientList : otherCollectionClients.values()) {
-        for (SolrServer client : clientList) {
+      for (List<SolrClient> clientList : otherCollectionClients.values()) {
+        for (SolrClient client : clientList) {
           client.shutdown();
         }
       }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java Wed Dec 31 14:31:03 2014
@@ -17,22 +17,16 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import java.net.ConnectException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-
+import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering;
 import org.apache.http.client.HttpClient;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
-import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
-import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
+import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient;
 import org.apache.solr.client.solrj.impl.HttpClientUtil;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.core.Diagnostics;
@@ -44,7 +38,12 @@ import org.junit.BeforeClass;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering;
+import java.net.ConnectException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
 
 @Slow
 @SuppressSSL
@@ -253,7 +252,7 @@ public class ChaosMonkeyNothingIsSafeTes
         zkServer.run();
       }
       
-      CloudSolrServer client = createCloudClient("collection1");
+      CloudSolrClient client = createCloudClient("collection1");
       try {
           createCollection(null, "testcollection",
               1, 1, 1, client, null, "conf1");
@@ -294,11 +293,11 @@ public class ChaosMonkeyNothingIsSafeTes
     private HttpClient httpClient = HttpClientUtil.createClient(null);
     private volatile boolean stop = false;
     int clientIndex = 0;
-    private ConcurrentUpdateSolrServer suss;
-    private List<SolrServer> clients;  
+    private ConcurrentUpdateSolrClient cusc;
+    private List<SolrClient> clients;
     private AtomicInteger fails = new AtomicInteger();
     
-    public FullThrottleStopableIndexingThread(List<SolrServer> clients,
+    public FullThrottleStopableIndexingThread(List<SolrClient> clients,
         String id, boolean doDeletes) {
       super(controlClient, cloudClient, id, doDeletes);
       setName("FullThrottleStopableIndexingThread");
@@ -306,12 +305,12 @@ public class ChaosMonkeyNothingIsSafeTes
       this.clients = clients;
       HttpClientUtil.setConnectionTimeout(httpClient, 15000);
       HttpClientUtil.setSoTimeout(httpClient, 15000);
-      suss = new ConcurrentUpdateSolrServer(
-          ((HttpSolrServer) clients.get(0)).getBaseURL(), httpClient, 8,
+      cusc = new ConcurrentUpdateSolrClient(
+          ((HttpSolrClient) clients.get(0)).getBaseURL(), httpClient, 8,
           2) {
         @Override
         public void handleError(Throwable ex) {
-          log.warn("suss error", ex);
+          log.warn("cusc error", ex);
         }
       };
     }
@@ -330,7 +329,7 @@ public class ChaosMonkeyNothingIsSafeTes
           String delete = deletes.remove(0);
           try {
             numDeletes++;
-            suss.deleteById(delete);
+            cusc.deleteById(delete);
           } catch (Exception e) {
             changeUrlOnError(e);
             //System.err.println("REQUEST FAILED:");
@@ -350,7 +349,7 @@ public class ChaosMonkeyNothingIsSafeTes
               50,
               t1,
               "Saxon heptarchies that used to rip around so in old times and raise Cain.  My, you ought to seen old Henry the Eight when he was in bloom.  He WAS a blossom.  He used to marry a new wife every day, and chop off her head next morning.  And he would do it just as indifferent as if ");
-          suss.add(doc);
+          cusc.add(doc);
         } catch (Exception e) {
           changeUrlOnError(e);
           //System.err.println("REQUEST FAILED:");
@@ -373,13 +372,13 @@ public class ChaosMonkeyNothingIsSafeTes
         if (clientIndex > clients.size() - 1) {
           clientIndex = 0;
         }
-        suss.shutdownNow();
-        suss = new ConcurrentUpdateSolrServer(
-            ((HttpSolrServer) clients.get(clientIndex)).getBaseURL(),
+        cusc.shutdownNow();
+        cusc = new ConcurrentUpdateSolrClient(
+            ((HttpSolrClient) clients.get(clientIndex)).getBaseURL(),
             httpClient, 30, 3) {
           @Override
           public void handleError(Throwable ex) {
-            log.warn("suss error", ex);
+            log.warn("cusc error", ex);
           }
         };
       }
@@ -388,8 +387,8 @@ public class ChaosMonkeyNothingIsSafeTes
     @Override
     public void safeStop() {
       stop = true;
-      suss.blockUntilFinished();
-      suss.shutdownNow();
+      cusc.blockUntilFinished();
+      cusc.shutdownNow();
       httpClient.getConnectionManager().shutdown();
     }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java Wed Dec 31 14:31:03 2014
@@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.core.Diagnostics;
 import org.apache.solr.update.SolrCmdDistributor;
@@ -172,7 +172,7 @@ public class ChaosMonkeySafeLeaderTest e
       zkServer.run();
     }
     
-    CloudSolrServer client = createCloudClient("collection1");
+    CloudSolrClient client = createCloudClient("collection1");
     try {
         createCollection(null, "testcollection",
             1, 1, 1, client, null, "conf1");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java Wed Dec 31 14:31:03 2014
@@ -18,7 +18,7 @@ package org.apache.solr.cloud;
  */
 
 import org.apache.lucene.util.LuceneTestCase.Slow;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.cloud.ClusterState;
 import org.apache.solr.common.cloud.DocCollection;
@@ -77,7 +77,7 @@ public class ChaosMonkeyShardSplitTest e
     Thread indexThread = null;
     OverseerRestarter killer = null;
     Thread killerThread = null;
-    final SolrServer solrServer = clients.get(0);
+    final SolrClient solrClient = clients.get(0);
 
     try {
       del("*:*");
@@ -146,8 +146,8 @@ public class ChaosMonkeyShardSplitTest e
     } finally {
       if (indexThread != null)
         indexThread.join();
-      if (solrServer != null)
-        solrServer.commit();
+      if (solrClient != null)
+        solrClient.commit();
       if (killer != null) {
         killer.run = false;
         if (killerThread != null) {