markrmiller commented on a change in pull request #197:
URL: https://github.com/apache/solr/pull/197#discussion_r663154203



##########
File path: 
solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/StatsStream.java
##########
@@ -352,4 +378,31 @@ public int getCost() {
   public StreamComparator getStreamSort() {
     return null;
   }
+
+  @Override
+  public TupleStream[] parallelize(List<String> partitions) throws IOException 
{
+    final ModifiableSolrParams withoutTieredParam = new 
ModifiableSolrParams(params);
+    withoutTieredParam.remove(TIERED_PARAM); // each individual request is not 
tiered
+
+    TupleStream[] streams = new TupleStream[partitions.size()];
+    for (int p = 0; p < streams.length; p++) {
+      streams[p] = new StatsStream(zkHost, partitions.get(p), 
withoutTieredParam, metrics);
+    }
+    return streams;
+  }
+
+  @Override
+  public TupleStream getSortedRollupStream(ParallelListStream plist, Metric[] 
rollupMetrics) throws IOException {
+    return new SelectStream(new HashRollupStream(plist, STATS_BUCKET, 
rollupMetrics), getRollupSelectFields(rollupMetrics));
+  }
+
+  // Map the rollup metric to the original metric name so that we can project 
out the correct field names in the tuple
+  protected Map<String, String> getRollupSelectFields(Metric[] rollupMetrics) {
+    Map<String, String> map = new HashMap<>();

Review comment:
       set the initial size for this?




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