[FLINK-38899][runtime-web] Introduce the Rescales/History sub-page for streaming jobs with the adaptive scheduler enabled#27874
[FLINK-38899][runtime-web] Introduce the Rescales/History sub-page for streaming jobs with the adaptive scheduler enabled#27874och5351 wants to merge 2 commits intoapache:masterfrom
Conversation
RocMarshal
left a comment
There was a problem hiding this comment.
Hi, @och5351 Thank you for your hard work.
LGTM on the whole, just a few of comments.
PTAL in your free time :)
| export interface RescalesHistory { | ||
| rescaleUuid: string; | ||
| resourceRequirementsUuid: string; | ||
| rescaleAttemptId: number; | ||
| vertices: object; | ||
| slots: object; | ||
| schedulerStates: unknown[]; | ||
| startTimestampInMillis: number; | ||
| endTimestampInMillis: number; | ||
| terminalState: string; | ||
| triggerCause: string; | ||
| terminatedReason: string; | ||
| expand?: boolean; | ||
| } | ||
|
|
||
| export interface RescalesDetailHistory { | ||
| rescaleUuid: string; | ||
| resourceRequirementsUuid: string; | ||
| rescaleAttemptId: number; | ||
| vertices: { [vertexId: string]: RescaleVertex }; | ||
| slots: { [slotSharingGroupId: string]: RescaleSlot }; | ||
| schedulerStates: SchedulerState[]; | ||
| startTimestampInMillis: number; | ||
| endTimestampInMillis: number; | ||
| terminalState: string; | ||
| triggerCause: string; | ||
| terminatedReason: string; | ||
| } |
There was a problem hiding this comment.
- What about renaming it to
JobRescaleDetails(keep the same name as backend REST part) - What about merging the two interface into one for reusing( The corresponding class in backend is one class.)?
export interface JobRescaleDetails {
rescaleUuid: string;
resourceRequirementsUuid: string;
rescaleAttemptId: number;
vertices?: { [vertexId: string]: VertexParallelismRescaleInfo };
slots?: { [slotSharingGroupId: string]: SlotSharingGroupRescaleInfo };
schedulerStates?: SchedulerState[];
startTimestampInMillis: number;
endTimestampInMillis: number;
terminalState: string;
triggerCause: string;
terminatedReason: string;
}
There was a problem hiding this comment.
Hi @RocMarshal!
Thank you for the review :)
Regarding your first question about renaming to JobRescaleDetails:
That sounds great! I'll make that change and request your review again.
Regarding your second question about merging the two interfaces:
You make a good point. However, I think they should remain separate because they're used
for different API endpoints. JobRescaleDetails can extend JobRescaleHistory since:
- JobRescaleHistory: /jobs/:jobid/rescales/history
- JobRescaleDetails: /jobs/:jobid/rescales/details/:rescaleuuid
Does that approach work for you?
There was a problem hiding this comment.
Thanks @och5351
I compared this with the implementations of other existing frontend pages, and perhaps we can take a balanced approach.
Based on your idea, we can use inheritance to separate the two interfaces.
However, we may need to slightly differentiate the naming:
- RescalesHistory → BriefJobRescaleDetails, since “xxHistory” sounds like a collection composed of multiple objects.
- RescalesHistories → RescalesHistory, for the same reason, and it also better aligns with the abstraction level used by the backend when handling this data.
- RescalesDetailHistory → JobRescaleDetails (extends BriefJobRescaleDetails)
Pls let me know your opinon.
There was a problem hiding this comment.
@RocMarshal
Thank you for considering my suggestions!
I agree with your naming approach. The revised names make much more sense
and better reflect the actual data structure:
- BriefJobRescaleDetails (for RescalesHistory)
- RescalesHistory (for RescalesHistories)
- JobRescaleDetails (for RescalesDetailHistory)
I'll make these changes and push a new commit for review.
Once all reviews are complete, I'll squash all the commits together.
flink-runtime-web/web-dashboard/src/app/interfaces/job-rescales.ts
Outdated
Show resolved
Hide resolved
flink-runtime-web/web-dashboard/src/app/interfaces/job-rescales.ts
Outdated
Show resolved
Hide resolved
flink-runtime-web/web-dashboard/src/app/interfaces/job-rescales.ts
Outdated
Show resolved
Hide resolved
flink-runtime-web/web-dashboard/src/app/pages/job/rescales/job-rescales.component.html
Show resolved
Hide resolved
flink-runtime-web/web-dashboard/src/app/pages/job/rescales/job-rescales.component.html
Outdated
Show resolved
Hide resolved
flink-runtime-web/web-dashboard/src/app/interfaces/job-rescales.ts
Outdated
Show resolved
Hide resolved
|
Hi, @RocMarshal ! Thank you. |
flink-runtime-web/web-dashboard/src/app/interfaces/job-rescales.ts
Outdated
Show resolved
Hide resolved
…r streaming jobs with the adaptive scheduler enabled
…r streaming jobs with the adaptive scheduler enabled - Temporary commit for review (Changed the `expand` and `styles` in the job-rescales.component.html.)
|
I checked UI of the PR locally with #27705. checked:
LGTM +1 on the whole just a few of issues:
Thanks @och5351 for the hard work. |


What is the purpose of the change
Brief change log
Adds the 'Rescales/History' tab and 'HistoryDetail' subpage in relation to [FLINK-38897][Runtime/REST] Introduce /jobs/:jobid/rescales/config endpoint to REST API #27580.
Rescales History Tab
Rescales HistoryDetail page
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation