You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Berkay Öztürk (Jira)" <ji...@apache.org> on 2019/12/26 12:23:00 UTC

[jira] [Updated] (BEAM-9031) Wrong Python example in Flink runner documentation

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

Berkay Öztürk updated BEAM-9031:
--------------------------------
    Description: 
Python example under the [Executing a Beam pipeline on a Flink Cluster|https://beam.apache.org/documentation/runners/flink/#executing-a-beam-pipeline-on-a-flink-cluster] header will throw this error:

{code}
TypeError: Runner PipelineOptions() is not a PipelineRunner object or the name of a registered runner
{code}

Fix:

{code:python}
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
options = PipelineOptions([
    "--runner=FlinkRunner",
    "--flink_version=1.8",
    "--flink_master=localhost:8081",
    "--environment_type=LOOPBACK"
])
with beam.Pipeline(options=options) as p:
    ...
{code}

  was:
Python example under the [Executing a Beam pipeline on a Flink Cluster|https://beam.apache.org/documentation/runners/flink/#executing-a-beam-pipeline-on-a-flink-cluster] header will throw this error:

{code}
TypeError: Runner PipelineOptions() is not a PipelineRunner object or the name of a registered runner
{code}

Fix:

{code:python}
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
options = PipelineOptions([
    "--runner=FlinkRunner",
    "--flink_version=1.8",
    "--flink_master=localhost:8081",
    "--environment_type=LOOPBACK"
])
with beam.Pipeline(options=options) as p:
    ...
{code}

GitHub pull request on it's way.


> Wrong Python example in Flink runner documentation
> --------------------------------------------------
>
>                 Key: BEAM-9031
>                 URL: https://issues.apache.org/jira/browse/BEAM-9031
>             Project: Beam
>          Issue Type: Bug
>          Components: website
>    Affects Versions: Not applicable
>            Reporter: Berkay Öztürk
>            Priority: Trivial
>              Labels: documentation, easyfix, newbie
>             Fix For: Not applicable
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Python example under the [Executing a Beam pipeline on a Flink Cluster|https://beam.apache.org/documentation/runners/flink/#executing-a-beam-pipeline-on-a-flink-cluster] header will throw this error:
> {code}
> TypeError: Runner PipelineOptions() is not a PipelineRunner object or the name of a registered runner
> {code}
> Fix:
> {code:python}
> import apache_beam as beam
> from apache_beam.options.pipeline_options import PipelineOptions
> options = PipelineOptions([
>     "--runner=FlinkRunner",
>     "--flink_version=1.8",
>     "--flink_master=localhost:8081",
>     "--environment_type=LOOPBACK"
> ])
> with beam.Pipeline(options=options) as p:
>     ...
> {code}



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