I think it should work like this:

mvn exec:java \
-Dexec.mainClass=org.apache.beam.runners.flink.examples.WordCount \
-Dexec.args="--runner=org.apache.beam.runners.flink.FlinkRunner.class
--inputFile='"$input"' --output='"$outfile_prefix"'"'

On Wed, 20 Jul 2016 at 10:47 Dumi Loghin <[email protected]> wrote:

> Hi,
>
> I'm trying to run Wordcount example on Flink single node but I'm getting
> this error:
>
> ~/incubator-beam/runners/flink/examples$ mvn exec:exec
> -Dinput=/home/hadoop/kinglear.txt -Doutput=wc-out.txt -Drunner=FlinkRunner
> ...
> Exception in thread "main" java.lang.IllegalArgumentException: No Runner
> was specified and the DirectRunner was not found on the classpath.
> Specify a runner by either:
>     Explicitly specifying a runner by providing the 'runner' property
>     Adding the DirectRunner to the classpath
>     Calling 'PipelineOptions.setRunner(PipelineRunner)' directly
> at
> org.apache.beam.sdk.options.PipelineOptions$DirectRunner.create(PipelineOptions.java:282)
> at
> org.apache.beam.sdk.options.PipelineOptions$DirectRunner.create(PipelineOptions.java:273)
> at
> org.apache.beam.sdk.options.ProxyInvocationHandler.getDefault(ProxyInvocationHandler.java:482)
> at
> org.apache.beam.sdk.options.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:157)
> at
> org.apache.beam.sdk.options.PipelineOptionsValidator.validate(PipelineOptionsValidator.java:72)
> at
> org.apache.beam.sdk.options.PipelineOptionsFactory$Builder.as(PipelineOptionsFactory.java:306)
> at
> org.apache.beam.runners.flink.examples.WordCount.main(WordCount.java:106)
> ...
>
>
> I've tried with -Drunner=FlinkRunner and without it and I get the same
> error. Moreover, the runner is also set in the source:
>
> options.setRunner(FlinkRunner.class);
>
> Any suggestions?
>
> Best regards,
> Dumi
>

Reply via email to