vyatkinv commented on code in PR #4320:
URL: https://github.com/apache/solr/pull/4320#discussion_r3176906585


##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/RandomFacadeStream.java:
##########
@@ -80,39 +70,23 @@ public RandomFacadeStream(StreamExpression expression, 
StreamFactory factory) th
       params.put("rows", "500");
     }
 
-    // zkHost, optional - if not provided then will look into factory list to 
get
-    String zkHost = null;
-    if (null == zkHostExpression) {
-      zkHost = factory.getCollectionZkHost(collectionName);
-      if (zkHost == null) {
-        zkHost = factory.getDefaultZkHost();
-      }
-    } else if (zkHostExpression.getParameter() instanceof 
StreamExpressionValue) {
-      zkHost = ((StreamExpressionValue) 
zkHostExpression.getParameter()).getValue();
-    }
-    if (null == zkHost) {
-      throw new IOException(
-          String.format(
-              Locale.ROOT,
-              "invalid expression %s - zkHost not found for collection '%s'",
-              expression,
-              collectionName));
-    }
+    // solrCloud, optional - if not provided then will look into factory list 
to get
+    String solrCloud = getSolrCloud(factory, expression, collectionName);
 
     if (params.get(ROWS) != null) {
       int rows = Integer.parseInt(params.get(ROWS));
       if (rows >= 5000) {
         DeepRandomStream deepRandomStream = new DeepRandomStream();
-        deepRandomStream.init(collectionName, zkHost, toSolrParams(params));
+        deepRandomStream.init(collectionName, solrCloud, toSolrParams(params));

Review Comment:
   done



##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/RandomStream.java:
##########
@@ -58,7 +56,8 @@
  */
 public class RandomStream extends TupleStream implements Expressible {
 
-  private String zkHost;
+  private String solrCloud;
+  // TODO: replace all Map<String, String> in stream handlers by 
ModifiableSolrParams ?

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to