[ 
https://issues.apache.org/jira/browse/FLINK-9927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16558035#comment-16558035
 ] 

ASF GitHub Bot commented on FLINK-9927:
---------------------------------------

zentol closed pull request #6424: [FLINK-9927] [Documentation] Change .print() 
to .output() in Python Streaming example
URL: https://github.com/apache/flink/pull/6424
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/dev/stream/python.md b/docs/dev/stream/python.md
index 887d983c404..adce83fea28 100644
--- a/docs/dev/stream/python.md
+++ b/docs/dev/stream/python.md
@@ -104,7 +104,7 @@ def main(factory):
         .key_by(Selector()) \
         .time_window(milliseconds(50)) \
         .reduce(Sum()) \
-        .print()
+        .output()
     env.execute()
 
 {% endhighlight %}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Error in Python Stream API example on website
> ---------------------------------------------
>
>                 Key: FLINK-9927
>                 URL: https://issues.apache.org/jira/browse/FLINK-9927
>             Project: Flink
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.6.0
>            Reporter: Joe Malt
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> The [Python Programming Guide (Streaming) 
> |https://ci.apache.org/projects/flink/flink-docs-master/dev/stream/python.html#program-skeleton]page
>  contains a WordCount example with the following main method:
> {code:java}
> def main(factory):
>  env = factory.get_execution_environment()
>  env.create_python_source(Generator(num_iters=1000)) \
>  .flat_map(Tokenizer()) \
>  .key_by(Selector()) \
>  .time_window(milliseconds(50)) \
>  .reduce(Sum()) \
>  .print(){code}
> The print() should, [according to the documentation, be 
> output()|https://ci.apache.org/projects/flink/flink-docs-release-1.6/api/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.html#output%E2%80%93].
>  Trying to call print() results in an error:
> {code:java}
> jmalt-machine:bin jmalt$ ./pyflink-stream.sh 
> /Users/jmalt/flink-python/WordCount.py
> Starting execution of program
> Failed to run plan: null
> Traceback (most recent call last):
>  File "<string>", line 1, in <module>
>  File 
> "/var/folders/t1/gcltcjcn5zdgqfqrc32xk90x85xkg9/T/flink_streaming_plan_9539e241-ba0a-42bf-9d4c-844dda26b998/WordCount.py",
>  line 43, in main
> AttributeError: 'org.apache.flink.streaming.python.api.datastream.P' object 
> has no attribute 'print'{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to