Adding task pending time in MSQ reports#15966
Conversation
| } | ||
|
|
||
| @JsonProperty("pendingMs") | ||
| public long getPendingTimeInMS() |
There was a problem hiding this comment.
pendingTimeMillis would probably be a better name and more in line with rest of the names in Druid.
There was a problem hiding this comment.
Since we already have durationMs as part of line:389 of this payload, having pendingTimeMillis would be weird. If you feel strongly about it, I can change.
There was a problem hiding this comment.
We are using millis as convention in this class, so it's a bit unfortunate that we already have "durationMs" in the taskReport. Would the best thing be to call it pendingTimeMillis in the code and expose it in the report as getPendingTimeInMs. As a nit, I think it should be getPendingTimeInMs though.
adarshsanjeev
left a comment
There was a problem hiding this comment.
Looks good overall, minor comments
| final TaskTracker tracker = taskEntry.getValue(); | ||
| if (!canceledWorkerTasks.contains(taskId) | ||
| && (tracker.status == null || !tracker.status.getStatusCode().isComplete())) { | ||
| if ((!canceledWorkerTasks.contains(taskId)) |
There was a problem hiding this comment.
nit: this looks a bit weird due to the parenthesis and new lines.
| if ((!canceledWorkerTasks.contains(taskId)) | |
| if (!canceledWorkerTasks.contains(taskId) && !tracker.isComplete()) { |
There was a problem hiding this comment.
I personally find 2 not statements a little tricky so hence like the parenthesis. Keeping it as is for now.
pendingMsin MSQ task reports. This helps in figuring out the exact run time of the MSQ worker tasks.The payload now looks like
Release notes
A new field in MSQ task report which captures the milliseconds elapsed between when the worker task was first requested and when it fully started RUNNING. Actual work time can be calculated using
actualWorkTimeMS = durationMs - pendingMs