Skip to content

Conversation

@RocMarshal
Copy link
Contributor

@RocMarshal RocMarshal commented Feb 11, 2026

What is the purpose of the change

  • [FLINK-38897][Runtime/REST] Introduce the /jobs/:jobid/rescales/config endpoint in the REST API
  • The pr is not blocked by FLIP-495 completion and is independent sub-task in FLIP-487.

Brief change log

  • [FLINK-38897][Runtime/REST] Introduce the /jobs/:jobid/rescales/config endpoint in the REST API
  • Done the related adaption logic and added test cases.

Verifying this change

This change added tests and can be verified as follows:

  • org.apache.flink.runtime.rest.handler.job.rescales.JobRescaleConfigHandlerTest

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a minor new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Feb 11, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

},
"response" : {
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:ThreadDumpInfo",
Copy link
Member

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",

Copy link
Contributor Author

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.
Copy link
Member

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
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Thanks for the reminder.
There is only one enum value now.

Copy link
Contributor Author

@RocMarshal RocMarshal left a 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",
Copy link
Contributor Author

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Thanks for the reminder.
There is only one enum value now.

@github-actions github-actions bot added the community-reviewed PR has been reviewed by the community. label Feb 12, 2026
* 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;
Copy link
Contributor Author

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants