thelabdude commented on a change in pull request #2132:
URL: https://github.com/apache/lucene-solr/pull/2132#discussion_r554052572



##########
File path: 
solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DrillStream.java
##########
@@ -252,29 +253,27 @@ public void setStreamContext(StreamContext streamContext) 
{
   }
 
   protected void constructStreams() throws IOException {
-
     try {
-
       Object pushStream = ((Expressible) 
tupleStream).toExpression(streamFactory);
-
-      List<String> shardUrls = getShards(this.zkHost, this.collection, 
this.streamContext);
-
-      for(int w=0; w<shardUrls.size(); w++) {
-        ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
-        paramsLoc.set(DISTRIB,"false"); // We are the aggregator.
-        paramsLoc.set("expr", pushStream.toString());
-        paramsLoc.set("qt","/export");
-        paramsLoc.set("fl", fl);
-        paramsLoc.set("sort", sort);
-        paramsLoc.set("q", q);
-        String url = shardUrls.get(w);
-        SolrStream solrStream = new SolrStream(url, paramsLoc);
+      final ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
+      paramsLoc.set(DISTRIB,"false"); // We are the aggregator.
+      paramsLoc.set("expr", pushStream.toString());
+      paramsLoc.set("qt","/export");
+      paramsLoc.set("fl", fl);
+      paramsLoc.set("sort", sort);
+      paramsLoc.set("q", q);
+      getReplicas(this.zkHost, this.collection, this.streamContext, 
paramsLoc).forEach(r -> {

Review comment:
       This refactor makes use of the enhancement provided by SOLR-14987 to 
reuse HttpSolrClients per host vs. one per replica




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to