Add adhoc minion task creation endpoint#8465
Conversation
|
Please give me a couple of days, I would like to review this. Meanwhile, if you can please mention some use cases I would appreciate it. |
b1068c7 to
471168c
Compare
Thanks, @mcvsubbu, In short, the goal here is to add a new public endpoint to schedule ad-hoc minion tasks. Current minion tasks require all tasks configs to be part of table configs, it makes sense for regularly scheduled jobs, but when I want to quickly test something, it's hard for me to bring in data using minion. Once this feature is in place, we can also implement the feature of SQL E.g. or |
Codecov Report
@@ Coverage Diff @@
## master #8465 +/- ##
=============================================
+ Coverage 29.21% 70.55% +41.34%
- Complexity 0 4287 +4287
=============================================
Files 1662 1679 +17
Lines 87290 87873 +583
Branches 13236 13305 +69
=============================================
+ Hits 25501 61999 +36498
+ Misses 59467 21557 -37910
- Partials 2322 4317 +1995
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
when this API would be used? I see /tasks/{taskType}/taskstates is there.
There was a problem hiding this comment.
We don't have one API to show all the task states, across all task types.
There was a problem hiding this comment.
Can we do that in the client? (i.e. fetch all tasks and then iterate through the types to get status)?
There was a problem hiding this comment.
The goal eventually is to convert those API responses to an in-memory table and you can run the below queries to see job status.
SHOW LOAD;
SHOW LOAD WHERE taskName = 'mytask-01';
SHOW LOAD WHERE state = 'CANCELLED';
SHOW LOAD WHERE state = 'LOADING';
I feel we may need a better data structure to hold the task status, e.g. job progress(12/35 COMPLETED, 5/35 IN_PROGRESS ), exception: xxxxx, time usage: 12mins, etc.
There was a problem hiding this comment.
I will remove this API for now, we can add it later on with a better understanding of the task information.
...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
...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
...inot/plugin/minion/tasks/segmentgenerationandpush/SegmentGenerationAndPushTaskGenerator.java
Outdated
Show resolved
Hide resolved
...inot/plugin/minion/tasks/segmentgenerationandpush/SegmentGenerationAndPushTaskGenerator.java
Outdated
Show resolved
Hide resolved
...inot/plugin/minion/tasks/segmentgenerationandpush/SegmentGenerationAndPushTaskGenerator.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Can we do that in the client? (i.e. fetch all tasks and then iterate through the types to get status)?
...roller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java
Outdated
Show resolved
Hide resolved
...roller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java
Outdated
Show resolved
Hide resolved
...controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
Outdated
Show resolved
Hide resolved
pinot-controller/src/main/java/org/apache/pinot/controller/util/FileIngestionHelper.java
Outdated
Show resolved
Hide resolved
85138ea to
972f339
Compare
...roller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java
Outdated
Show resolved
Hide resolved
|
@mcvsubbu can you take a look again ? |
84f3f66 to
326ede3
Compare
126f26b to
6b3db0a
Compare
...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
...controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/pinot/controller/helix/core/minion/generator/PinotTaskGenerator.java
Outdated
Show resolved
Hide resolved
pinot-controller/src/main/java/org/apache/pinot/controller/util/FileIngestionHelper.java
Outdated
Show resolved
Hide resolved
...pinot/plugin/minion/tasks/segmentgenerationandpush/SegmentGenerationAndPushTaskExecutor.java
Outdated
Show resolved
Hide resolved
...inot/plugin/minion/tasks/segmentgenerationandpush/SegmentGenerationAndPushTaskGenerator.java
Outdated
Show resolved
Hide resolved
...inot/plugin/minion/tasks/segmentgenerationandpush/SegmentGenerationAndPushTaskGenerator.java
Outdated
Show resolved
Hide resolved
...inot/plugin/minion/tasks/segmentgenerationandpush/SegmentGenerationAndPushTaskGenerator.java
Outdated
Show resolved
Hide resolved
a4e54b8 to
1f53ee1
Compare
1. Add adhoc task creation endpoint for PinotTaskRestletResource endpoint 2. Add adhoc minion task submission endpoint and the implementation of SegmentGenerationAndPushTask
ff26801 to
5da7f98
Compare
mcvsubbu
left a comment
There was a problem hiding this comment.
Minor change suggested.
thank you
...roller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java
Outdated
Show resolved
Hide resolved
5da7f98 to
862ad5c
Compare
Thanks for your comments! |
Description
Sample requests:
Release Notes
Adding Adhoc minion task execution endpoint in Pinot controller
/tasks/execute.Documentation