You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "shounakmk219 (via GitHub)" <gi...@apache.org> on 2025/10/08 13:42:59 UTC
[PR] Enable table based filtering for minion subtask details [pinot]
shounakmk219 opened a new pull request, #16977:
URL: https://github.com/apache/pinot/pull/16977
## Description
When minion tasks are scheduled with the /schedule endpoint without specifying a particular table it schedules the tasks for all tables where the task is configured. This leads to controller submitting a single job containing task configs from multiple tables. When user opens the minion UI it gets confusing as subtasks from different tables appears on the UI making it hard to follow the actual progress for the particular table
### Current behaviour
The test1 table view shows 30 subtasks (only 15 subtasks belong to the table)
<img width="1726" height="891" alt="image" src="https://github.com/user-attachments/assets/81585b60-31b1-4042-aaf9-fd4cedf12648" />
One of the subtask from another table (test2)
<img width="3452" height="1628" alt="image" src="https://github.com/user-attachments/assets/035affed-d4ba-4fe9-b7b4-284c3e5f2358" />
### After the changes
Post the table based filtering each table view will only list the subtasks that belong to the table (check the subtask count showing 15 now)
<img width="1726" height="891" alt="image" src="https://github.com/user-attachments/assets/c813a9b5-a090-4752-89e4-f7bae371d0bc" />
### Important changes
- New query param `tableName` added to `/tasks/task/{taskName}/debug` endpoint to filter based in table name. Subtasks from all tables would be returned if table name is not passed (current behaviour)
- Updated minion task manager UI page to pass the tableName filter param to show the correct view
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "jayeshchoudhary (via GitHub)" <gi...@apache.org>.
jayeshchoudhary commented on PR #16977:
URL: https://github.com/apache/pinot/pull/16977#issuecomment-3382534856
please address copilot comments
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "jayeshchoudhary (via GitHub)" <gi...@apache.org>.
jayeshchoudhary commented on code in PR #16977:
URL: https://github.com/apache/pinot/pull/16977#discussion_r2414553094
##########
pinot-controller/src/main/resources/app/requests/index.ts:
##########
@@ -209,8 +209,8 @@ export const getTasks = (tableName: string, taskType: string): Promise<AxiosResp
export const getTaskRuntimeConfig = (taskName: string): Promise<AxiosResponse<TaskRuntimeConfig>> =>
baseApi.get(`/tasks/task/${taskName}/runtime/config`, { headers: { ...headers, Accept: 'application/json' }});
-export const getTaskDebug = (taskName: string): Promise<AxiosResponse<OperationResponse>> =>
- baseApi.get(`/tasks/task/${taskName}/debug?verbosity=1`, { headers: { ...headers, Accept: 'application/json' } });
+export const getTaskDebug = (taskName: string, tableName: string): Promise<AxiosResponse<OperationResponse>> =>
+ baseApi.get(`/tasks/task/${taskName}/debug?verbosity=1&tableName=${tableName}`, { headers: { ...headers, Accept: 'application/json' } });
Review Comment:
afaik table name convention does not contain any special chars
if it contains numbers then yes we need to url encode the table name to read correct value
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "shounakmk219 (via GitHub)" <gi...@apache.org>.
shounakmk219 commented on PR #16977:
URL: https://github.com/apache/pinot/pull/16977#issuecomment-3382550211
> > Updated minion task manager UI page to pass the tableName filter param to show the correct view
>
> how do you pass this? modify the url?
Yes added the query param in the request
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #16977:
URL: https://github.com/apache/pinot/pull/16977#issuecomment-3381820903
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/16977?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 56.04%. Comparing base ([`fb7d220`](https://app.codecov.io/gh/apache/pinot/commit/fb7d220d3ee70206187f8ab82639b34e436d3593?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`317248b`](https://app.codecov.io/gh/apache/pinot/commit/317248b036c5523fbf84fe49551eafffe0255db4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (fb7d220) and HEAD (317248b). Click for more details.
>
> <details><summary>HEAD has 32 uploads less than BASE</summary>
>
>| Flag | BASE (fb7d220) | HEAD (317248b) |
>|------|------|------|
>|java-21|4|1|
>|unittests1|2|1|
>|unittests|4|1|
>|temurin|9|1|
>|java-11|5|0|
>|unittests2|2|0|
>|integration|5|0|
>|integration1|2|0|
>|custom-integration1|1|0|
>|integration2|2|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #16977 +/- ##
============================================
- Coverage 63.33% 56.04% -7.30%
+ Complexity 1417 701 -716
============================================
Files 3075 2411 -664
Lines 180878 134011 -46867
Branches 27682 21329 -6353
============================================
- Hits 114561 75100 -39461
+ Misses 57533 52675 -4858
+ Partials 8784 6236 -2548
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-11](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.04% <ø> (-7.25%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.04% <ø> (-7.30%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.04% <ø> (-7.30%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.04% <ø> (-0.06%)` | :arrow_down: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/16977/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/16977?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "jayeshchoudhary (via GitHub)" <gi...@apache.org>.
jayeshchoudhary commented on code in PR #16977:
URL: https://github.com/apache/pinot/pull/16977#discussion_r2414553094
##########
pinot-controller/src/main/resources/app/requests/index.ts:
##########
@@ -209,8 +209,8 @@ export const getTasks = (tableName: string, taskType: string): Promise<AxiosResp
export const getTaskRuntimeConfig = (taskName: string): Promise<AxiosResponse<TaskRuntimeConfig>> =>
baseApi.get(`/tasks/task/${taskName}/runtime/config`, { headers: { ...headers, Accept: 'application/json' }});
-export const getTaskDebug = (taskName: string): Promise<AxiosResponse<OperationResponse>> =>
- baseApi.get(`/tasks/task/${taskName}/debug?verbosity=1`, { headers: { ...headers, Accept: 'application/json' } });
+export const getTaskDebug = (taskName: string, tableName: string): Promise<AxiosResponse<OperationResponse>> =>
+ baseApi.get(`/tasks/task/${taskName}/debug?verbosity=1&tableName=${tableName}`, { headers: { ...headers, Accept: 'application/json' } });
Review Comment:
afaik table name convention does not contain any special chars, spaces so we are good here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "shounakmk219 (via GitHub)" <gi...@apache.org>.
shounakmk219 commented on code in PR #16977:
URL: https://github.com/apache/pinot/pull/16977#discussion_r2413922013
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -1003,14 +1017,23 @@ private synchronized TaskDebugInfo getTaskDebugInfo(WorkflowContext workflowCont
TaskCount subtaskCount = new TaskCount();
for (int partition : partitionSet) {
// First get the partition's state and update the subtaskCount
+ String taskIdForPartition = jobContext.getTaskIdForPartition(partition);
TaskPartitionState partitionState = jobContext.getPartitionState(partition);
+ TaskConfig helixTaskConfig = jobConfig.getTaskConfig(taskIdForPartition);
+ PinotTaskConfig pinotTaskConfig = null;
+ if (helixTaskConfig != null) {
+ pinotTaskConfig = PinotTaskConfig.fromHelixTaskConfig(helixTaskConfig);
+ if ((tableNameWithType != null) && (!tableNameWithType.equals(pinotTaskConfig.getTableName()))) {
+ // Filter task configs that match this table name
+ continue;
+ }
+ }
Review Comment:
moving this logic before recording the task state to avoid recording the entries that are skipped when table name is specified
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "shounakmk219 (via GitHub)" <gi...@apache.org>.
shounakmk219 commented on code in PR #16977:
URL: https://github.com/apache/pinot/pull/16977#discussion_r2414550788
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -1003,14 +1017,23 @@ private synchronized TaskDebugInfo getTaskDebugInfo(WorkflowContext workflowCont
TaskCount subtaskCount = new TaskCount();
for (int partition : partitionSet) {
// First get the partition's state and update the subtaskCount
+ String taskIdForPartition = jobContext.getTaskIdForPartition(partition);
TaskPartitionState partitionState = jobContext.getPartitionState(partition);
+ TaskConfig helixTaskConfig = jobConfig.getTaskConfig(taskIdForPartition);
+ PinotTaskConfig pinotTaskConfig = null;
+ if (helixTaskConfig != null) {
+ pinotTaskConfig = PinotTaskConfig.fromHelixTaskConfig(helixTaskConfig);
+ if ((tableNameWithType != null) && (!tableNameWithType.equals(pinotTaskConfig.getTableName()))) {
+ // Filter task configs that match this table name
+ continue;
+ }
+ }
subtaskCount.addTaskState(partitionState);
Review Comment:
We want to skip counting the filtered tasks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "yashmayya (via GitHub)" <gi...@apache.org>.
yashmayya merged PR #16977:
URL: https://github.com/apache/pinot/pull/16977
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #16977:
URL: https://github.com/apache/pinot/pull/16977#discussion_r2413918026
##########
pinot-controller/src/main/resources/app/requests/index.ts:
##########
@@ -209,8 +209,8 @@ export const getTasks = (tableName: string, taskType: string): Promise<AxiosResp
export const getTaskRuntimeConfig = (taskName: string): Promise<AxiosResponse<TaskRuntimeConfig>> =>
baseApi.get(`/tasks/task/${taskName}/runtime/config`, { headers: { ...headers, Accept: 'application/json' }});
-export const getTaskDebug = (taskName: string): Promise<AxiosResponse<OperationResponse>> =>
- baseApi.get(`/tasks/task/${taskName}/debug?verbosity=1`, { headers: { ...headers, Accept: 'application/json' } });
+export const getTaskDebug = (taskName: string, tableName: string): Promise<AxiosResponse<OperationResponse>> =>
+ baseApi.get(`/tasks/task/${taskName}/debug?verbosity=1&tableName=${tableName}`, { headers: { ...headers, Accept: 'application/json' } });
Review Comment:
The tableName parameter is not URL-encoded, which could cause issues if the table name contains special characters. Also, there's no null check for tableName, which could result in 'tableName=null' being appended to the URL. Consider using URLSearchParams or conditionally adding the tableName parameter only when it's not null.
```suggestion
baseApi.get(`/tasks/task/${taskName}/debug`, {
headers: { ...headers, Accept: 'application/json' },
params: {
verbosity: 1,
...(tableName != null ? { tableName } : {})
}
});
```
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -1003,14 +1017,23 @@ private synchronized TaskDebugInfo getTaskDebugInfo(WorkflowContext workflowCont
TaskCount subtaskCount = new TaskCount();
for (int partition : partitionSet) {
// First get the partition's state and update the subtaskCount
+ String taskIdForPartition = jobContext.getTaskIdForPartition(partition);
TaskPartitionState partitionState = jobContext.getPartitionState(partition);
+ TaskConfig helixTaskConfig = jobConfig.getTaskConfig(taskIdForPartition);
+ PinotTaskConfig pinotTaskConfig = null;
+ if (helixTaskConfig != null) {
+ pinotTaskConfig = PinotTaskConfig.fromHelixTaskConfig(helixTaskConfig);
+ if ((tableNameWithType != null) && (!tableNameWithType.equals(pinotTaskConfig.getTableName()))) {
+ // Filter task configs that match this table name
+ continue;
+ }
+ }
subtaskCount.addTaskState(partitionState);
Review Comment:
The subtaskCount.addTaskState(partitionState) is called after the table filtering continue statement, which means filtered out tasks won't be counted. This will result in incorrect subtask counts when table filtering is applied. Move line 1031 before the filtering logic (after line 1021) to ensure all partition states are counted regardless of table filtering.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "jayeshchoudhary (via GitHub)" <gi...@apache.org>.
jayeshchoudhary commented on PR #16977:
URL: https://github.com/apache/pinot/pull/16977#issuecomment-3382516999
> Updated minion task manager UI page to pass the tableName filter param to show the correct view
how do you pass this? modify the url?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Enable table based filtering for minion subtask details [pinot]
Posted by "shounakmk219 (via GitHub)" <gi...@apache.org>.
shounakmk219 commented on code in PR #16977:
URL: https://github.com/apache/pinot/pull/16977#discussion_r2414556248
##########
pinot-controller/src/main/resources/app/requests/index.ts:
##########
@@ -209,8 +209,8 @@ export const getTasks = (tableName: string, taskType: string): Promise<AxiosResp
export const getTaskRuntimeConfig = (taskName: string): Promise<AxiosResponse<TaskRuntimeConfig>> =>
baseApi.get(`/tasks/task/${taskName}/runtime/config`, { headers: { ...headers, Accept: 'application/json' }});
-export const getTaskDebug = (taskName: string): Promise<AxiosResponse<OperationResponse>> =>
- baseApi.get(`/tasks/task/${taskName}/debug?verbosity=1`, { headers: { ...headers, Accept: 'application/json' } });
+export const getTaskDebug = (taskName: string, tableName: string): Promise<AxiosResponse<OperationResponse>> =>
+ baseApi.get(`/tasks/task/${taskName}/debug?verbosity=1&tableName=${tableName}`, { headers: { ...headers, Accept: 'application/json' } });
Review Comment:
The minions task/subtask details page will always have the table name which is passed. Special characters are not allowed in table name so should not be an issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org