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


##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/Facet2DStream.java:
##########
@@ -184,26 +177,9 @@ public Facet2DStream(StreamExpression expression, 
StreamFactory factory) throws
       }
     }
 
-    String zkHost = null;
-    if (zkHostExpression == null) {
-      zkHost = factory.getCollectionZkHost(collectionName);
-      if (zkHost == null) {
-        zkHost = factory.getDefaultZkHost();
-      }
-    } else if (zkHostExpression.getParameter() instanceof 
StreamExpressionValue) {
-      zkHost = ((StreamExpressionValue) 
zkHostExpression.getParameter()).getValue();
-    }
-
-    if (zkHost == null) {
-      throw new IOException(
-          String.format(
-              Locale.ROOT,
-              "invalid expression %s - zkHost not found for collection '%s'",
-              expression,
-              collectionName));
-    }
+    String solrCloud = getSolrCloud(factory, expression, collectionName);
 
-    init(collectionName, params, x, y, bucketSort, dimensionX, dimensionY, 
metric, zkHost);
+    init(collectionName, params, x, y, bucketSort, dimensionX, dimensionY, 
metric, solrCloud);

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