suneet-s commented on code in PR #16041:
URL: https://github.com/apache/druid/pull/16041#discussion_r1513363337
##########
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:
Since a label is a subjective thing, I can imagine Druid operators wanting
to implement their own custom labeling strategy.
Have you considered adding an interface that is extensible to allow Druid
operators to define their own labeling? I think this will give operators the
flexibility to define their own labels by implementing an extension. Druid can
have a default labeling strategy that does something like what is being
proposed in this change.
Can you please update the PR with a description of how the interface is
expected to work, and any design decisions that were made in choosing the
interface as well as docs that describe where the labels are emitted and how
they are set.
--
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]