kfaraz commented on code in PR #17488:
URL: https://github.com/apache/druid/pull/17488#discussion_r1870667956


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTask.java:
##########
@@ -179,6 +179,12 @@ public <T> QueryRunner<T> getQueryRunner(Query<T> query)
     return (queryPlus, responseContext) -> 
queryPlus.run(getRunner().getAppenderator(), responseContext);
   }
 
+  @Nullable
+  public String getStatus()

Review Comment:
   Nit: Please add a javadoc to clarify that this is the status is not the same 
as the final `TaskStatus`.
   You may even rename this method to `getCurrentRunnerStatus()` to avoid 
ambiguity.



##########
services/src/main/java/org/apache/druid/cli/CliPeon.java:
##########
@@ -303,19 +304,7 @@ public void configure(Binder binder)
           @Named(ServiceStatusMonitor.HEARTBEAT_TAGS_BINDING)
           public Supplier<Map<String, Object>> heartbeatDimensions(Task task)
           {
-            ImmutableMap.Builder<String, Object> builder = 
ImmutableMap.builder();
-            builder.put(DruidMetrics.TASK_ID, task.getId());
-            builder.put(DruidMetrics.DATASOURCE, task.getDataSource());
-            builder.put(DruidMetrics.TASK_TYPE, task.getType());
-            builder.put(DruidMetrics.GROUP_ID, task.getGroupId());
-            Map<String, Object> tags = task.getContextValue(DruidMetrics.TAGS);
-            if (tags != null && !tags.isEmpty()) {
-              builder.put(DruidMetrics.TAGS, tags);
-            }
-
-            return Suppliers.ofInstance(
-                builder.build()
-            );
+            return Suppliers.ofInstance(CliPeon.heartbeatDimensions(task));

Review Comment:
   Does this mean that the method `heartbeatDimensions` method would be called 
just once when initializing?
   Don't we want the `status` and the `heartbeatDimensions` to be freshly 
computed each time the metric is emitted?



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