This is an automated email from the ASF dual-hosted git repository.

sxnan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit a3212489bc9d0c3c1ec8776874802f18b139ee37
Author: sxnan <[email protected]>
AuthorDate: Wed Sep 11 17:21:35 2024 +0800

    [FLINK-33750][config] Remove deprecated StreamPipelineOptions
---
 .../environment/StreamExecutionEnvironment.java    |  9 +--
 .../api/environment/StreamPipelineOptions.java     | 71 ----------------------
 .../api/scala/StreamExecutionEnvironment.scala     | 13 ++--
 3 files changed, 6 insertions(+), 87 deletions(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
 
b/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
index d0509dacad7..5c5f60bd599 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
@@ -1089,8 +1089,7 @@ public class StreamExecutionEnvironment implements 
AutoCloseable {
     }
 
     /**
-     * Sets all relevant options contained in the {@link ReadableConfig} such 
as e.g. {@link
-     * StreamPipelineOptions#TIME_CHARACTERISTIC}. It will reconfigure {@link
+     * Sets all relevant options contained in the {@link ReadableConfig}. It 
will reconfigure {@link
      * StreamExecutionEnvironment}, {@link ExecutionConfig} and {@link 
CheckpointConfig}.
      *
      * <p>It will change the value of a setting only if a corresponding option 
was set in the {@code
@@ -1104,8 +1103,7 @@ public class StreamExecutionEnvironment implements 
AutoCloseable {
     }
 
     /**
-     * Sets all relevant options contained in the {@link ReadableConfig} such 
as e.g. {@link
-     * StreamPipelineOptions#TIME_CHARACTERISTIC}. It will reconfigure {@link
+     * Sets all relevant options contained in the {@link ReadableConfig}. It 
will reconfigure {@link
      * StreamExecutionEnvironment}, {@link ExecutionConfig} and {@link 
CheckpointConfig}.
      *
      * <p>It will change the value of a setting only if a corresponding option 
was set in the {@code
@@ -1117,9 +1115,6 @@ public class StreamExecutionEnvironment implements 
AutoCloseable {
     @PublicEvolving
     public void configure(ReadableConfig configuration, ClassLoader 
classLoader) {
         
this.configuration.addAll(Configuration.fromMap(configuration.toMap()));
-        configuration
-                .getOptional(StreamPipelineOptions.TIME_CHARACTERISTIC)
-                .ifPresent(this::setStreamTimeCharacteristic);
         configuration
                 .getOptional(DeploymentOptions.JOB_LISTENERS)
                 .ifPresent(listeners -> registerCustomListeners(classLoader, 
listeners));
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamPipelineOptions.java
 
b/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamPipelineOptions.java
deleted file mode 100644
index e43f3757825..00000000000
--- 
a/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamPipelineOptions.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.streaming.api.environment;
-
-import org.apache.flink.annotation.PublicEvolving;
-import org.apache.flink.api.common.eventtime.WatermarkStrategy;
-import org.apache.flink.configuration.ConfigOption;
-import org.apache.flink.configuration.ConfigOptions;
-import org.apache.flink.configuration.PipelineOptions;
-import org.apache.flink.configuration.description.Description;
-import org.apache.flink.configuration.description.TextElement;
-import org.apache.flink.streaming.api.TimeCharacteristic;
-
-/**
- * The {@link ConfigOption configuration options} for job execution. Those are 
stream specific
- * options. See also {@link org.apache.flink.configuration.PipelineOptions}.
- *
- * @deprecated This option class is deprecated in 1.20 and will be removed in 
2.0.
- */
-@Deprecated
-@PublicEvolving
-public class StreamPipelineOptions {
-
-    /**
-     * @deprecated In Flink 1.12 the default stream time characteristic has 
been changed to {@link
-     *     TimeCharacteristic#EventTime}, thus you don't need to set this 
option for enabling
-     *     event-time support anymore. Explicitly using processing-time 
windows and timers works in
-     *     event-time mode. If you need to disable watermarks, please set 
{@link
-     *     PipelineOptions#AUTO_WATERMARK_INTERVAL} to 0. If you are using 
{@link
-     *     TimeCharacteristic#IngestionTime}, please manually set an 
appropriate {@link
-     *     WatermarkStrategy}. If you are using generic "time window" 
operations (for example {@link
-     *     
org.apache.flink.streaming.api.datastream.KeyedStream#timeWindow(org.apache.flink.streaming.api.windowing.time.Time)}
-     *     that change behaviour based on the time characteristic, please use 
equivalent operations
-     *     that explicitly specify processing time or event time.
-     */
-    @Deprecated
-    public static final ConfigOption<TimeCharacteristic> TIME_CHARACTERISTIC =
-            ConfigOptions.key("pipeline.time-characteristic")
-                    .enumType(TimeCharacteristic.class)
-                    .defaultValue(TimeCharacteristic.EventTime)
-                    .withDescription(
-                            Description.builder()
-                                    .text(
-                                            "The time characteristic for all 
created streams, e.g., processing"
-                                                    + "time, event time, or 
ingestion time.")
-                                    .linebreak()
-                                    .linebreak()
-                                    .text(
-                                            "If you set the characteristic to 
IngestionTime or EventTime this will set a default "
-                                                    + "watermark update 
interval of 200 ms. If this is not applicable for your application "
-                                                    + "you should change it 
using %s.",
-                                            TextElement.code(
-                                                    
PipelineOptions.AUTO_WATERMARK_INTERVAL.key()))
-                                    .build());
-}
diff --git 
a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
 
b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
index 7aebdf5f603..fc349c43240 100644
--- 
a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
+++ 
b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
@@ -39,7 +39,6 @@ import org.apache.flink.streaming.api.functions.source._
 import 
org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext
 import org.apache.flink.streaming.api.graph.StreamGraph
 import org.apache.flink.util.{SplittableIterator, TernaryBoolean}
-import org.apache.flink.util.Preconditions.checkNotNull
 
 import _root_.scala.language.implicitConversions
 import com.esotericsoftware.kryo.Serializer
@@ -584,10 +583,8 @@ class StreamExecutionEnvironment(javaEnv: JavaEnv) extends 
AutoCloseable {
   def getStreamTimeCharacteristic = javaEnv.getStreamTimeCharacteristic()
 
   /**
-   * Sets all relevant options contained in the [[ReadableConfig]] such as e.g.
-   * 
[[org.apache.flink.streaming.api.environment.StreamPipelineOptions#TIME_CHARACTERISTIC]].
 It
-   * will reconfigure [[StreamExecutionEnvironment]],
-   * [[org.apache.flink.api.common.ExecutionConfig]] and
+   * Sets all relevant options contained in the [[ReadableConfig]]. It will 
reconfigure
+   * [[StreamExecutionEnvironment]], 
[[org.apache.flink.api.common.ExecutionConfig]] and
    * [[org.apache.flink.streaming.api.environment.CheckpointConfig]].
    *
    * It will change the value of a setting only if a corresponding option was 
set in the
@@ -604,10 +601,8 @@ class StreamExecutionEnvironment(javaEnv: JavaEnv) extends 
AutoCloseable {
   }
 
   /**
-   * Sets all relevant options contained in the [[ReadableConfig]] such as e.g.
-   * 
[[org.apache.flink.streaming.api.environment.StreamPipelineOptions#TIME_CHARACTERISTIC]].
 It
-   * will reconfigure [[StreamExecutionEnvironment]],
-   * [[org.apache.flink.api.common.ExecutionConfig]] and
+   * Sets all relevant options contained in the [[ReadableConfig]]. It will 
reconfigure
+   * [[StreamExecutionEnvironment]], 
[[org.apache.flink.api.common.ExecutionConfig]] and
    * [[org.apache.flink.streaming.api.environment.CheckpointConfig]].
    *
    * It will change the value of a setting only if a corresponding option was 
set in the

Reply via email to