You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/01/21 08:41:10 UTC

[GitHub] [druid] asdf2014 commented on a change in pull request #12111: add a new query laning metrics to visualize lane assignment

asdf2014 commented on a change in pull request #12111:
URL: https://github.com/apache/druid/pull/12111#discussion_r789456961



##########
File path: server/src/main/java/org/apache/druid/server/QueryScheduler.java
##########
@@ -137,6 +159,12 @@ public void registerQueryFuture(Query<?> query, ListenableFuture<?> future)
     Optional<Integer> priority = prioritizationStrategy.computePriority(queryPlus, segments);
     query = priority.map(query::withPriority).orElse(query);
     Optional<String> lane = laningStrategy.computeLane(queryPlus.withQuery(query), segments);
+    log.info("[%s] lane assigned to [%s] query with [%,d] priority", lane.orElse("default"), query.getType(), priority.orElse(Integer.valueOf(0)));

Review comment:
       ```suggestion
       LOGGER.info("[%s] lane assigned to [%s] query with [%,d] priority", lane.orElse("default"), query.getType(), priority.orElse(Integer.valueOf(0)));
   ```

##########
File path: server/src/main/java/org/apache/druid/server/QueryScheduler.java
##########
@@ -58,6 +62,7 @@
  */
 public class QueryScheduler implements QueryWatcher
 {
+  private static final Logger log = new Logger(QueryScheduler.class);

Review comment:
       ```suggestion
     private static final Logger LOGGER = new Logger(QueryScheduler.class);
   ```

##########
File path: docs/operations/metrics.md
##########
@@ -58,6 +58,7 @@ Available Metrics
 |`query/interrupted/count`|number of queries interrupted due to cancellation.|This metric is only available if the QueryCountStatsMonitor module is included.||
 |`query/timeout/count`|number of timed out queries.|This metric is only available if the QueryCountStatsMonitor module is included.||
 |`query/segments/count`|This metric is not enabled by default. See the `QueryMetrics` Interface for reference regarding enabling this metric. Number of segments that will be touched by the query. In the broker, it makes a plan to distribute the query to realtime tasks and historicals based on a snapshot of segment distribution state. If there are some segments moved after this snapshot is created, certain historicals and realtime tasks can report those segments as missing to the broker. The broker will re-send the query to the new servers that serve those segments after move. In this case, those segments can be counted more than once in this metric.|Varies.|
+|`query/priority`| Assigned lane and priority, only if Laning strategy is enabled. Refer to [Laning strategies](../configuration/index.md#laning-strategies)| lane, dataSource, type|0|

Review comment:
       ```suggestion
   |`query/priority`|Assigned lane and priority, only if Laning strategy is enabled. Refer to [Laning strategies](../configuration/index.md#laning-strategies)|lane, dataSource, type|0|
   ```




-- 
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: commits-unsubscribe@druid.apache.org

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



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