[ 
https://issues.apache.org/jira/browse/FLINK-22598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Al-assad updated FLINK-22598:
-----------------------------
    Description: 
 

The DataStream examples at 
[https://github.com/apache/flink/tree/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples]
 uses

_DataStream#writeAsText()_ which has been deprecated.

 

The associated deprecated calls to example code are distributed as follows:
 * org/apache/flink/streaming/examples/wordcount/WordCount.java
 * org/apache/flink/streaming/examples/windowing/WindowWordCount.java
 * org/apache/flink/streaming/examples/windowing/SessionWindowing.java
 * org/apache/flink/streaming/examples/twitter/TwitterExample.java
 * org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
 * org/apache/flink/streaming/examples/iteration/IterateExample.java

According to the code description, this API call should be replaced by the 
addSink API.

 

I feel that the project example code should not use deprecated APIs, which 
could be misleading to the reference, and should keep the API usage examples up 
to date.

 

If allowed, I would be happy to modify the commit-related code to look like this
 _writeAsText() -> addSink(StreamingFileSink.forRowFormat(...).build())_

 

 

 

  was:
 

The DataStream examples at 
[https://github.com/apache/flink/tree/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples]
 uses

_DataStream#writeAsText()_ which has been deprecated.

 

The associated deprecated calls to example code are distributed as follows:
 * org/apache/flink/streaming/examples/wordcount/WordCount.java
 * org/apache/flink/streaming/examples/windowing/WindowWordCount.java
 * org/apache/flink/streaming/examples/windowing/SessionWindowing.java
 * org/apache/flink/streaming/examples/twitter/TwitterExample.java
 * org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
 * org/apache/flink/streaming/examples/iteration/IterateExample.java

According to the code description, this API call should be replaced by the 
addSink API.

 

I feel that the project example code should not use deprecated APIs, which 
could be misleading to the reference, and should keep the API usage examples up 
to date.

 

If allowed, I would be happy to modify the commit-related code to look like this
 _writeAsText() -> addSink(StreamingFileSink.forRowFormat(...).build())_

 

 


> Examples use deprecated forms of writeAsText
> --------------------------------------------
>
>                 Key: FLINK-22598
>                 URL: https://issues.apache.org/jira/browse/FLINK-22598
>             Project: Flink
>          Issue Type: Improvement
>          Components: Examples
>    Affects Versions: 1.11.3, 1.12.0, 1.12.1, 1.12.2, 1.13.0
>            Reporter: Al-assad
>            Priority: Major
>             Fix For: 1.12.2, 1.13.0
>
>
>  
> The DataStream examples at 
> [https://github.com/apache/flink/tree/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples]
>  uses
> _DataStream#writeAsText()_ which has been deprecated.
>  
> The associated deprecated calls to example code are distributed as follows:
>  * org/apache/flink/streaming/examples/wordcount/WordCount.java
>  * org/apache/flink/streaming/examples/windowing/WindowWordCount.java
>  * org/apache/flink/streaming/examples/windowing/SessionWindowing.java
>  * org/apache/flink/streaming/examples/twitter/TwitterExample.java
>  * org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
>  * org/apache/flink/streaming/examples/iteration/IterateExample.java
> According to the code description, this API call should be replaced by the 
> addSink API.
>  
> I feel that the project example code should not use deprecated APIs, which 
> could be misleading to the reference, and should keep the API usage examples 
> up to date.
>  
> If allowed, I would be happy to modify the commit-related code to look like 
> this
>  _writeAsText() -> addSink(StreamingFileSink.forRowFormat(...).build())_
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to