-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add worker category dimension #11554
Add worker category dimension #11554
Conversation
This pull request introduces 10 alerts when merging 235eefc6bd04655b2bd309f230100fe7e9d2fc1a into 257bc5c - view on LGTM.com new alerts:
|
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.
@nikhil-ddu thanks for your contribution! The patch looks good overall, I left some comments. There are only two blockers among my comments, one for the spell check dictionary and one for SingleTaskBackgroundRunner
. Others are not blockers as they are nit picking, but please consider them and let me know if you want to address them before this PR is merged.
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java
Outdated
Show resolved
Hide resolved
indexing-service/src/main/java/org/apache/druid/indexing/overlord/RemoteTaskRunner.java
Outdated
Show resolved
Hide resolved
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ThreadingTaskRunner.java
Outdated
Show resolved
Hide resolved
...xing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java
Outdated
Show resolved
Hide resolved
*/ | ||
long getTotalTaskSlotCount(); | ||
*/ | ||
Map<String, Long> getTotalTaskSlotCount(); |
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.
nit: could use Object2LongMap
.
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.
Since I'm returning ImmutableMap
from methods where there will be only one entry, I can't use Object2LongMap
without changing return values.
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'm not sure what you mean. My suggestion is changing all return type here including all their implementations. For singleton map, you can use Object2LongMaps.singleton()
. But this comment is nit because this api is not performance critical.
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.
If it's okay I'm not planning to address this change in this PR.
...ing-service/src/main/java/org/apache/druid/indexing/overlord/SingleTaskBackgroundRunner.java
Outdated
Show resolved
Hide resolved
…TaskBackgroundRunner
0d740ea
to
0420a78
Compare
@jihoonson I've updated the PR with changes you requested for. Can you merge the PR? |
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 @nikhil-ddu!
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.
code changes lgtm 👍
I don't think making all of the emitters consistent necessarily needs to be done in this PR. If we do not resolve now, we should open an issue indicating that many of the 'contrib' emitters are not consistent in terms of what is emitted out of the box. The idea being to help provide visibility/guide anyone using these extensions that some things might be missing - depending on which emitter you are using.
"taskSlot/busy/count" : { "dimensions" : [], "type" : "gauge" }, | ||
"taskSlot/lazy/count" : { "dimensions" : [], "type" : "gauge" }, | ||
"taskSlot/blacklisted/count" : { "dimensions" : [], "type" : "gauge" }, | ||
"taskSlot/total/count" : { "dimensions" : ["category"], "type" : "gauge" }, |
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.
hmm, it looks like other emitters have files like this too:
- prometheus-emitter: https://github.com/apache/druid/blob/master/extensions-contrib/prometheus-emitter/src/main/resources/defaultMetrics.json
- opentsdb-emitter: https://github.com/apache/druid/blob/master/extensions-contrib/opentsdb-emitter/src/main/resources/defaultMetrics.json
- dropwizard-emitter: https://github.com/apache/druid/blob/master/extensions-contrib/dropwizard-emitter/src/main/resources/defaultMetricDimensions.json
- graphite-emitter: https://github.com/apache/druid/blob/master/extensions-contrib/graphite-emitter/src/main/resources/defaultWhiteListMap.json
- ambari-emitter: https://github.com/apache/druid/blob/master/extensions-contrib/ambari-metrics-emitter/src/main/resources/defaultWhiteListMap.json
should they be updated as well after this change? I didn't look super closely at their contents, and i'm not sure how consistent they actually are with each other since I'm not sure they are currently emitting these metrics at all... but this seemed worth discussing.
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 created #11958.
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.
This is worth discussing, but I think we can do it in #11958.
I'm merging this PR. Thanks @nikhil-ddu. |
Fixes #11505.
Description
Changed APIs of
TaskRunner
Changed following APIs of
TaskRunner
used for emitting statistics for @TaskSlotCountStatsMonitor to returnMap<String, Long>
where key will be worker category and value will be particular metric value.User-facing Changes
TaskSlot metrics of indexing service will have worker category as a dimension. Dimension name will be
category
.Following five metrics will have
category
as dimension.This PR has: