jon-wei commented on a change in pull request #8981: add query metrics for 
broker parallel merges, off by default
URL: https://github.com/apache/incubator-druid/pull/8981#discussion_r353492990
 
 

 ##########
 File path: 
core/src/main/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequence.java
 ##########
 @@ -575,21 +617,22 @@ protected void compute()
               adjustedNextYieldAfter,
               batchSize,
               targetTimeNanos,
-              recursionDepth + 1,
+              metricsAccumulator,
               cancellationGizmo
           ));
         } else if (cancellationGizmo.isCancelled()) {
           // if we got the cancellation signal, go ahead and write terminal 
value into output queue to help gracefully
           // allow downstream stuff to stop
-          LOG.debug("cancelled after %s tasks", recursionDepth);
+          LOG.debug("cancelled after %s tasks", 
metricsAccumulator.getTaskCount());
           outputQueue.offer(ResultBatch.TERMINAL);
         } else {
           // if priority queue is empty, push the final accumulated value into 
the output batch and push it out
           outputBatch.add(currentCombinedValue);
+          metricsAccumulator.incrementOutputRows(batchCounter + 1L);
 
 Review comment:
   Is the 1L here for the terminal value? Does that need to be counted towards 
the output rows, since it's not really a row?

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


With regards,
Apache Git Services

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

Reply via email to