New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding metrics for minion tasks status #6549
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6549 +/- ##
===========================================
- Coverage 66.44% 43.98% -22.47%
===========================================
Files 1075 1336 +261
Lines 54773 65849 +11076
Branches 8168 9609 +1441
===========================================
- Hits 36396 28965 -7431
- Misses 15700 34440 +18740
+ Partials 2677 2444 -233
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
...controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
Outdated
Show resolved
Hide resolved
...controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
Outdated
Show resolved
Hide resolved
...controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
Outdated
Show resolved
Hide resolved
taskStateToCountMap.put(taskState, taskStateToCountMap.get(taskState) + 1); | ||
} | ||
// Reset all the status to 0 | ||
for (TaskState taskState : _taskStateToCountMap.keySet()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to maintain the member _taskStateToCountMap
, the local map should be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not, as we need to update the already reported metrics.
e.g.
in run 1, we report:
pinot_controller_taskStatus_Value{status="IN_PROGRESS",taskType="SegmentGenerationAndPushTask",} 0.0
in run 2, we need report:
pinot_controller_taskStatus_Value{status="IN_PROGRESS",taskType="SegmentGenerationAndPushTask",} 0.0
pinot_controller_taskStatus_Value{status="COMPLETED",taskType="SegmentGenerationAndPushTask",} 1.0
Without tracking the previous metrics, we cannot reset the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, make sense
...controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
Outdated
Show resolved
Hide resolved
...controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
taskStateToCountMap.put(taskState, taskStateToCountMap.get(taskState) + 1); | ||
} | ||
// Reset all the status to 0 | ||
for (TaskState taskState : _taskStateToCountMap.keySet()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, make sense
Description
Adding metrics for minion tasks status and JMX query to extract metrics
Sample metrics reported by JMX:
Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
backward-incompat
, and complete the section below on Release Notes)Does this PR fix a zero-downtime upgrade introduced earlier?
backward-incompat
, and complete the section below on Release Notes)Does this PR otherwise need attention when creating release notes? Things to consider:
release-notes
and complete the section on Release Notes)Release Notes
If you have tagged this as either backward-incompat or release-notes,
you MUST add text here that you would like to see appear in release notes of the
next release.
If you have a series of commits adding or enabling a feature, then
add this section only in final commit that marks the feature completed.
Refer to earlier release notes to see examples of text
Documentation
If you have introduced a new feature or configuration, please add it to the documentation as well.
See https://docs.pinot.apache.org/developers/developers-and-contributors/update-document