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

Aydar Zaynutdinov updated BEAM-13942:
-------------------------------------
    Description: 
Run the following code via Playground:
{code:java}
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.PipelineResult;
import org.apache.beam.sdk.io.TextIO;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;

public class Class {  

    public static void main(String[] args) {
        PipelineOptions options = PipelineOptionsFactory.create();
        Pipeline p = Pipeline.create(options);
        p.apply("ReadLines", 
TextIO.read().from("gs://apache-beam-samples/shakespeare/kinglear.txt"));
        PipelineResult result = p.run();
        result.waitUntilFinish();
    }
}
{code}
{*}Expected result{*}:
no error in the output tab.

{*}Actual result{*}:
output contains the next error:
_error: exit status 1_
_output: 
/opt/playground/backend/executable_files/1aab2a09-a6f8-4690-89c9-cec431c686dd/src/1aab2a09-a6f8-4690-89c9-cec431c686dd.java:13:
 error: ';' expected_
    _PipelineResult result = String dotString = 
org.apache.beam.runners.core.construction.renderer.PipelineDotRenderer.toDotString(p);_
                                  _^_
_1 error_

  was:
Run the following code via Playground:
{code:java}
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.PipelineResult;
import org.apache.beam.sdk.io.TextIO;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;public class Class {  
public static void main(String[] args) {
    PipelineOptions options = PipelineOptionsFactory.create();
    Pipeline p = Pipeline.create(options);
    p.apply("ReadLines", 
TextIO.read().from("gs://apache-beam-samples/shakespeare/kinglear.txt"));
    PipelineResult result = p.run();
    result.waitUntilFinish();
  }
}
{code}
{*}Expected result{*}:
no error in the output tab.

{*}Actual result{*}:
output contains next error:
_error: exit status 1_
_output: 
/opt/playground/backend/executable_files/1aab2a09-a6f8-4690-89c9-cec431c686dd/src/1aab2a09-a6f8-4690-89c9-cec431c686dd.java:13:
 error: ';' expected_
    _PipelineResult result = String dotString = 
org.apache.beam.runners.core.construction.renderer.PipelineDotRenderer.toDotString(p);_
                                  _^_
_1 error_


> [Playground] Error when wrap pipeline.run()
> -------------------------------------------
>
>                 Key: BEAM-13942
>                 URL: https://issues.apache.org/jira/browse/BEAM-13942
>             Project: Beam
>          Issue Type: Bug
>          Components: beam-playground
>            Reporter: Aydar Zaynutdinov
>            Priority: P3
>              Labels: beam-playground-backend
>
> Run the following code via Playground:
> {code:java}
> import org.apache.beam.sdk.Pipeline;
> import org.apache.beam.sdk.PipelineResult;
> import org.apache.beam.sdk.io.TextIO;
> import org.apache.beam.sdk.options.PipelineOptions;
> import org.apache.beam.sdk.options.PipelineOptionsFactory;
> public class Class {  
>     public static void main(String[] args) {
>         PipelineOptions options = PipelineOptionsFactory.create();
>         Pipeline p = Pipeline.create(options);
>         p.apply("ReadLines", 
> TextIO.read().from("gs://apache-beam-samples/shakespeare/kinglear.txt"));
>         PipelineResult result = p.run();
>         result.waitUntilFinish();
>     }
> }
> {code}
> {*}Expected result{*}:
> no error in the output tab.
> {*}Actual result{*}:
> output contains the next error:
> _error: exit status 1_
> _output: 
> /opt/playground/backend/executable_files/1aab2a09-a6f8-4690-89c9-cec431c686dd/src/1aab2a09-a6f8-4690-89c9-cec431c686dd.java:13:
>  error: ';' expected_
>     _PipelineResult result = String dotString = 
> org.apache.beam.runners.core.construction.renderer.PipelineDotRenderer.toDotString(p);_
>                                   _^_
> _1 error_



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to