arunramani commented on code in PR #16041:
URL: https://github.com/apache/druid/pull/16041#discussion_r1514902100


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/Task.java:
##########
@@ -134,6 +134,23 @@ default int getPriority()
    */
   String getType();
 
+  /**
+   * Provides a default implementation for obtaining a task's label. This 
label is intended
+   * to serve as a descriptive identifier for the task's purpose or type, 
which can be utilized
+   * for more nuanced task management, monitoring, and logging activities.
+   *
+   * By default, this method returns the task type obtained from {@link 
#getType()},
+   * reflecting the basic categorization of the task.
+   *
+   * @return A string representing the task's label, which by default is the 
task type.
+   *         Override this method to specify more granular labels tailored to 
the task's
+   *         specific purpose or operational characteristics.
+   */
+  default String getLabel()
+  {
+    return getType();
+  }

Review Comment:
   @kfaraz copying the task context over to the report would be an immediate 
win and might actually take care of the issue. I was thinking more about any 
context that needs to be injected after a spec has been planned, which will 
require some kind of extension point.



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