flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-34456][configuration]Move all checkpoint-related options into CheckpointingOptions

Open spoon-lz opened this issue 1 year ago • 8 comments

What is the purpose of the change

According to the FLIP-406,Move all checkpoint-related options that are out of CheckpointingOptions into CheckpointingOptions. Deprecate the original ones.

Brief change log

  • Move all configurations under org.apache.flink.streaming.api.environment.ExecutionCheckpointingOptions into org.apache.flink.configuration.CheckpointingOptions
  • Mark ExecutionCheckpointingOptions as deprecated
  • Move org.apache.flink.streaming.api.CheckpointingMode to org.apache.flink.configuration.CheckpointingMode
  • Split ExternalizedCheckpointCleanup out of CheckpointConfig and move it to flink-core module

Verifying this change

This change is a minor rework and is already covered by existing tests.

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 new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

spoon-lz avatar Feb 23 '24 05:02 spoon-lz

@flinkbot run azure

spoon-lz avatar Feb 23 '24 05:02 spoon-lz

CI report:

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

flinkbot avatar Feb 23 '24 05:02 flinkbot

@flinkbot run azure

spoon-lz avatar Feb 23 '24 07:02 spoon-lz

@flinkbot run azure

spoon-lz avatar Feb 26 '24 02:02 spoon-lz

@flinkbot run azure

spoon-lz avatar Feb 26 '24 04:02 spoon-lz

@flinkbot run azure

spoon-lz avatar Feb 26 '24 08:02 spoon-lz

Hi @spoon-lz , thanks for your contribution! At first glance of your PR, I would suggest keep the old org.apache.flink.streaming.api.CheckpointingMode and mark as deprecated. However it is required to start a discussion about such deprecation on dev mailing list first. I will start the discussion and work on the deprecation in Flink 1.19 (will soon be released this month).

If CheckpointingMode is not moved, do we need to copy the same class in the flink-core module? Otherwise, dependency problems will occur. Or wait until the discussion is over before modifying this PR.

spoon-lz avatar Feb 26 '24 08:02 spoon-lz

Hi @spoon-lz , thanks for your contribution! At first glance of your PR, I would suggest keep the old org.apache.flink.streaming.api.CheckpointingMode and mark as deprecated. However it is required to start a discussion about such deprecation on dev mailing list first. I will start the discussion and work on the deprecation in Flink 1.19 (will soon be released this month).

If CheckpointingMode is not moved, do we need to copy the same class in the flink-core module? Otherwise, dependency problems will occur. Or wait until the discussion is over before modifying this PR.

I suggest both keep the old one and the new introduced one. All the internal usage will use the new one, while only user-facing APIs leverage the old one.

We could wait the conclusion of the discussion.

Zakelly avatar Feb 26 '24 08:02 Zakelly

@spoon-lz Sorry for the late reply, seems we come to an agreement in discussion. To be brief, we agree to deprecate the old class and introduce a new one. Corresponding APIs will be changed accordingly. There is one PR ready for this #24381 . I suggest building your PR on top of this after it is merged. WDYT?

Zakelly avatar Mar 05 '24 03:03 Zakelly

@Zakelly I also saw the conclusion of the discussion in the email. I will re-edit this PR after #24381 is merged. Another question is, "Split ExternalizedCheckpointCleanup out of CheckpointConfig and move it to flink-core module". Does this change also need to be discussed?

spoon-lz avatar Mar 06 '24 02:03 spoon-lz

@Zakelly I also saw the conclusion of the discussion in the email. I will re-edit this PR after #24381 is merged. Another question is, "Split ExternalizedCheckpointCleanup out of CheckpointConfig and move it to flink-core module". Does this change also need to be discussed?

I think this is much easier since it is only annotated with @\PublicEvolving. I think we can do this in a similar way without another discussion. A seperated PR is also good.

Zakelly avatar Mar 06 '24 02:03 Zakelly

@Zakelly A separate PR seems more reasonable, I will submit a separate PR to split ExternalizedCheckpointCleanup

spoon-lz avatar Mar 06 '24 03:03 spoon-lz

@Zakelly There are some references to org.apache.flink.streaming.api.CheckpointingMode in ExecutionCheckpointingOptions. When we move these configurations into CheckpointingOptions, do we need to replace them with org.apache.flink .core.execution.CheckpointingMode?

spoon-lz avatar May 20 '24 06:05 spoon-lz

@Zakelly There are some references to org.apache.flink.streaming.api.CheckpointingMode in ExecutionCheckpointingOptions. When we move these configurations into CheckpointingOptions, do we need to replace them with org.apache.flink .core.execution.CheckpointingMode?

@spoon-lz Firstly, we should keep ExecutionCheckpointingOptions and mark it as deprecated. Secondly, any new introduced(moved) options should use the new enum class. Right?

Zakelly avatar May 20 '24 06:05 Zakelly

@flinkbot run azure

spoon-lz avatar May 20 '24 09:05 spoon-lz

@Zakelly New code has been submitted.

spoon-lz avatar May 21 '24 02:05 spoon-lz

@Zakelly The code has been modified, but I don’t know why. After I force push to the current branch, I can see the modification in my warehouse, but not in this PR. Do I need to submit a new PR?

spoon-lz avatar May 27 '24 11:05 spoon-lz

@Zakelly The code has been modified, but I don’t know why. After I force push to the current branch, I can see the modification in my warehouse, but not in this PR. Do I need to submit a new PR?

Hi, Could you check your branch 'lz-CheckpointingOptions' in your repo ? Seems it doesn't include new commits.

masteryhx avatar May 27 '24 12:05 masteryhx

@spoon-lz I didn't see any new commit on https://github.com/spoon-lz/flink/tree/lz-CheckpointingOptions

Zakelly avatar May 27 '24 12:05 Zakelly

@Zakelly @masteryhx Sorry I made the mistake of committing to the wrong branch, the code has been updated.

spoon-lz avatar May 28 '24 02:05 spoon-lz

@Zakelly @masteryhx Before this PR was merged, I found a new conflict with MaterializedTableManager.java of the master branch. I have resolved this conflict and it can be merged.

spoon-lz avatar May 29 '24 10:05 spoon-lz

I'll merge this once the CI green.

Zakelly avatar May 29 '24 12:05 Zakelly