This is an automated email from the ASF dual-hosted git repository. zhuzh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 4a7def9fe00387df66af8daf23603a6ea0848e03 Author: JunRuiLee <[email protected]> AuthorDate: Mon Dec 4 11:56:54 2023 +0800 [FLINK-33581][python] Deprecate getter/setter methods related to CheckpointStorage in python flink. --- .../pyflink/datastream/checkpoint_config.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/flink-python/pyflink/datastream/checkpoint_config.py b/flink-python/pyflink/datastream/checkpoint_config.py index f03ecf26abb..232effd1e0b 100644 --- a/flink-python/pyflink/datastream/checkpoint_config.py +++ b/flink-python/pyflink/datastream/checkpoint_config.py @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. ################################################################################ +import warnings from enum import Enum from typing import Optional @@ -440,7 +441,14 @@ class CheckpointConfig(object): HDFS, NFS Drivs, S3, and GCS, this storage policy supports large state size, in the magnitude of many terabytes while providing a highly available foundation for stateful applications. This checkpoint storage policy is recommended for most production deployments. + + .. note:: Deprecated since version 1.19: This method is deprecated and will be removed in + future FLINK major version. Use `stream_execution_environment.configure` method + instead to set the checkpoint storage. """ + warnings.warn("Deprecated since version 1.19: This method is deprecated and will be removed" + " in future FLINK major version. Use `stream_execution_environment.configure`" + " method instead to set the checkpoint storage.", DeprecationWarning) self._j_checkpoint_config.setCheckpointStorage(storage._j_checkpoint_storage) return self @@ -448,7 +456,14 @@ class CheckpointConfig(object): """ Configures the application to write out checkpoint snapshots to the configured directory. See `FileSystemCheckpointStorage` for more details on checkpointing to a file system. + + .. note:: Deprecated since version 1.19: This method is deprecated and will be removed in + future FLINK major version. Use `stream_execution_environment.configure` method + instead to set the checkpoint storage. """ + warnings.warn("Deprecated since version 1.19: This method is deprecated and will be removed" + " in future FLINK major version. Use `stream_execution_environment.configure`" + " method instead to set the checkpoint storage.", DeprecationWarning) self._j_checkpoint_config.setCheckpointStorage(checkpoint_path) return self @@ -456,7 +471,14 @@ class CheckpointConfig(object): """ The checkpoint storage that has been configured for the Job, or None if none has been set. + + .. note:: Deprecated since version 1.19: This method is deprecated and will be removed in + future FLINK major version. It is recommended to find which checkpoint storage is + used by checkpoint storage ConfigOption. """ + warnings.warn("Deprecated since version 1.19: This method is deprecated and will be removed" + " in future FLINK major version. It is recommended to find which checkpoint" + " storage is used by checkpoint storage ConfigOption.", DeprecationWarning) j_storage = self._j_checkpoint_config.getCheckpointStorage() if j_storage is None: return None
