Add indexer level task metrics to provide more visibility in the task distribution#15991
Conversation
| @Before | ||
| public void setUp() | ||
| { | ||
| task = createMock(Task.class); |
There was a problem hiding this comment.
Use NoopTask instead of creating a mock.
| taskDetails = createMock(WorkerTaskManager.TaskDetails.class); | ||
| EasyMock.expect(taskDetails.getDataSource()).andReturn("dummy_DS2"); | ||
| EasyMock.replay(taskDetails); | ||
| taskAnnouncement = createMock(TaskAnnouncement.class); |
There was a problem hiding this comment.
Try to use concrete instances of TaskAnnouncement and TaskDetails (if needed) instead of mocks.
| EasyMock.replay(taskAnnouncement); | ||
| taskRunner = createMock(TaskRunner.class); | ||
| taskConfig = createMock(TaskConfig.class); | ||
| overlordClient = createMock(OverlordClient.class); |
There was a problem hiding this comment.
Use NoopOverlordClient instead.
| public interface IndexerTaskCountStatsProvider | ||
| { | ||
| /** | ||
| * The number of running tasks on an indexer |
There was a problem hiding this comment.
Minor suggestion for the javadocs but this can be addressed later.
| * The number of running tasks on an indexer | |
| * Map from datasource name to the number of running tasks on the Indexer. |
…indexerTaskCountStatsProvides
|
@rbankar7 , the checkstyle and |
|
@rbankar7 , there are more checkstyle failures. To ensure that you catch all of them, please run the following on your local machine before you commit: |
|
@kfaraz I fixed the issues and verified that there are no checkstyle errors |
|
@rbankar7 , I ran the workflow. The test Error: Errors:
Error: org.apache.druid.server.metrics.WorkerTaskCountStatsMonitorTest.testMonitorNotMiddleManager
Error: Run 1: WorkerTaskCountStatsMonitorTest.testMonitorNotMiddleManager:288 » Configuration Guice configuration errors:
1) No implementation for org.apache.druid.server.metrics.IndexerTaskCountStatsProvider was bound.
while locating org.apache.druid.server.metrics.IndexerTaskCountStatsProviderThe code coverage also seems insufficient for |
@kfaraz will fix it |
…nitorIndexer) and add tests for getting worker stats
|
@kfaraz looks like build is passing now |
|
Thanks a lot for the fix, @rbankar7 ! |
… distribution (apache#15991) Changes: Add the following indexer level task metrics: - `worker/task/running/count` - `worker/task/assigned/count` - `worker/task/completed/count` These metrics will provide more visibility into the tasks distribution across indexers (We often see a task skew issue across indexers and with this issue it would be easier to catch the imbalance)
… distribution (apache#15991) Changes: Add the following indexer level task metrics: - `worker/task/running/count` - `worker/task/assigned/count` - `worker/task/completed/count` These metrics will provide more visibility into the tasks distribution across indexers (We often see a task skew issue across indexers and with this issue it would be easier to catch the imbalance)
…re visibility (#191) * Add indexer level task metrics to provide more visibility in the task distribution (apache#15991) Changes: Add the following indexer level task metrics: - `worker/task/running/count` - `worker/task/assigned/count` - `worker/task/completed/count` These metrics will provide more visibility into the tasks distribution across indexers (We often see a task skew issue across indexers and with this issue it would be easier to catch the imbalance)
… distribution (apache#15991) (#192) Changes: Add the following indexer level task metrics: - `worker/task/running/count` - `worker/task/assigned/count` - `worker/task/completed/count` These metrics will provide more visibility into the tasks distribution across indexers (We often see a task skew issue across indexers and with this issue it would be easier to catch the imbalance)

Adds indexer level task metrics
Description
This PR adds indexer level task metrics-
These metrics will provide more visibility into the tasks distribution across indexers (We often see a task skew issue across indexers and with this issue it would be easier to catch the imbalance)
This PR has: