-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add active worker count and active coordinator count metrics #27408
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
base: master
Are you sure you want to change the base?
Add active worker count and active coordinator count metrics #27408
Conversation
c3f98f0 to
8243d5f
Compare
9990048 to
55146ba
Compare
| private final boolean worker; | ||
| private final long longHashCode; | ||
|
|
||
| public InternalNode(String nodeIdentifier, URI internalUri, NodeVersion nodeVersion, boolean coordinator) |
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 constructor is used in quite some test files. Shall I remove this constructor and update the tests, or shall I keep it this way?
55146ba to
110890f
Compare
| <item> | ||
| <ignore>true</ignore> | ||
| <code>java.method.addedToInterface</code> | ||
| <new>method boolean io.trino.spi.Node::isWorker()</new> |
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 unnecessary to add it, since the worker means not coordinator. we already has isCoordinator, why not just reuse it
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.
Because a node can be a worker and coordinator at the same time using node-scheduler.include-coordinator as described here: https://trino.io/docs/current/installation/deployment.html#config-properties
Description
The
/metricsendpoint lists active nodes, but not all nodes are workers and # of workers is not always equal to # nodes - # coordinators as coordinators can be workers as well.This PR adds
CoordinatorNodeManager_ActiveCoordinatorCountandCoordinatorNodeManager_ActiveWorkerCountmetrics. I can't find any tests for the current metrics in theCoordinatorNodeManager, so I'm not sure they should be added.Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( X ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: