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

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


The following commit(s) were added to refs/heads/master by this push:
     new 3856e41f517 [FLINK-27056][streaming] "pipeline.time-characteristic" 
should be deprecated and have EVENT_TIME as default value
3856e41f517 is described below

commit 3856e41f5172dee070a4b1d5f15829203b6d580f
Author: Zhanghao Chen <m...@outlook.com>
AuthorDate: Sat Jul 9 18:06:55 2022 +0800

    [FLINK-27056][streaming] "pipeline.time-characteristic" should be 
deprecated and have EVENT_TIME as default value
    
    Close apache/flink#20231
---
 docs/content.zh/docs/deployment/config.md              |  1 -
 docs/content/docs/deployment/config.md                 |  1 -
 .../generated/stream_pipeline_configuration.html       | 18 ------------------
 .../api/environment/StreamPipelineOptions.java         | 17 ++++++++++++++++-
 4 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/docs/content.zh/docs/deployment/config.md 
b/docs/content.zh/docs/deployment/config.md
index bc2e406a220..ff8935923b6 100644
--- a/docs/content.zh/docs/deployment/config.md
+++ b/docs/content.zh/docs/deployment/config.md
@@ -314,7 +314,6 @@ See the [History Server Docs]({{< ref 
"docs/deployment/advanced/historyserver" >
 ### Pipeline
 
 {{< generated/pipeline_configuration >}}
-{{< generated/stream_pipeline_configuration >}}
 
 ### Checkpointing
 
diff --git a/docs/content/docs/deployment/config.md 
b/docs/content/docs/deployment/config.md
index 6071d674afe..3de3826c040 100644
--- a/docs/content/docs/deployment/config.md
+++ b/docs/content/docs/deployment/config.md
@@ -316,7 +316,6 @@ See the [History Server Docs]({{< ref 
"docs/deployment/advanced/historyserver" >
 ### Pipeline
 
 {{< generated/pipeline_configuration >}}
-{{< generated/stream_pipeline_configuration >}}
 
 ### Checkpointing
 
diff --git 
a/docs/layouts/shortcodes/generated/stream_pipeline_configuration.html 
b/docs/layouts/shortcodes/generated/stream_pipeline_configuration.html
deleted file mode 100644
index 8ddd9fb10c6..00000000000
--- a/docs/layouts/shortcodes/generated/stream_pipeline_configuration.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<table class="configuration table table-bordered">
-    <thead>
-        <tr>
-            <th class="text-left" style="width: 20%">Key</th>
-            <th class="text-left" style="width: 15%">Default</th>
-            <th class="text-left" style="width: 10%">Type</th>
-            <th class="text-left" style="width: 55%">Description</th>
-        </tr>
-    </thead>
-    <tbody>
-        <tr>
-            <td><h5>pipeline.time-characteristic</h5></td>
-            <td style="word-wrap: break-word;">ProcessingTime</td>
-            <td><p>Enum</p></td>
-            <td>The time characteristic for all created streams, e.g., 
processingtime, event time, or ingestion time.<br /><br />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 <code 
class="highlighter-rouge">pipeline.auto-watermark-interval</code>.<br /><br 
/>Possible 
values:<ul><li>"ProcessingTime"</li><li>"IngestionTime"</li><li>"EventTime" 
[...]
-        </tr>
-    </tbody>
-</table>
diff --git 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamPipelineOptions.java
 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamPipelineOptions.java
index 01aa5f9172a..e848479f3b6 100644
--- 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamPipelineOptions.java
+++ 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamPipelineOptions.java
@@ -19,6 +19,7 @@
 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;
@@ -32,10 +33,24 @@ import org.apache.flink.streaming.api.TimeCharacteristic;
  */
 @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.ProcessingTime)
+                    .defaultValue(TimeCharacteristic.EventTime)
                     .withDescription(
                             Description.builder()
                                     .text(

Reply via email to