-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[FLINK-38897][Runtime/REST] Introduce the /jobs/:jobid/rescales/config endpoint in the REST API #27580
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?
Conversation
037fa20 to
f0cc43f
Compare
| }, | ||
| "response" : { | ||
| "type" : "object", | ||
| "id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:ThreadDumpInfo", |
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.
"id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:job:rescales:JobRescaleConfigInfo",
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.
Nice catch!
|
|
||
| /*** | ||
| * Get the rescale related configuration when using {@link org.apache.flink.runtime.scheduler.adaptive.AdaptiveScheduler}. | ||
| * @return The rescale related configuration. |
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.
The method is marked as @nullable, but the contract does not clearly specify:
Under which scheduler modes this may return null
Whether REST handlers properly guard against null
This makes the API semantics unclear for callers:
Returns null if the scheduler is not AdaptiveScheduler.
| SchedulerExecutionMode: | ||
| type: string | ||
| enum: | ||
| - REACTIVE |
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.
The enum currently contains only REACTIVE.
If future scheduler modes are added (e.g., ADAPTIVE_BATCH), this may create REST compatibility constraints.
Please confirm whether this enum is intended to be strictly single-valued or extensible.
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.
f0cc43f to
a78304d
Compare
RocMarshal
left a comment
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.
Thanks @featzhang for the review. 👍
Updated.
| }, | ||
| "response" : { | ||
| "type" : "object", | ||
| "id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:ThreadDumpInfo", |
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.
Nice catch!
| SchedulerExecutionMode: | ||
| type: string | ||
| enum: | ||
| - REACTIVE |
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.
a78304d to
372471f
Compare
…g endpoint in the REST API
372471f to
e969af3
Compare
| * When the scheduler of the job is not {@link | ||
| * org.apache.flink.runtime.scheduler.adaptive.AdaptiveScheduler}, the value will be null. | ||
| */ | ||
| @Nullable private final JobRescaleConfigInfo jobRescaleConfigInfo; |
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.
Hi, @davidradl
@featzhang proposed a suggestion regarding where the newly added information should be stored:
#27544 (review)
It might be better to discuss it together there.
I’ve briefly looked into it. If we can reach a consensus on that suggestion, moving the newly added information into the ExecutionGraphInfo class so as to decouple JobRescaleConfigInfo from ExecutionGraph would also be a good option.
WDYTA ?

What is the purpose of the change
Brief change log
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation