You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by subash basnet <ya...@gmail.com> on 2016/03/21 17:06:17 UTC

Unable to run the batch examples after running stream examples

Hello all,

The scenario is I am working on Kafka Read/Write examples. It works fine,
but now when I try to run the batch examples such as PiEstimation or any
other, I get the following error:

Exception in thread "main" *java.lang.NoSuchMethodError:
org.apache.flink.api.common.Plan.getRestartStrategyConfiguration()Lorg/apache/flink/api/common/restartstrategy/RestartStrategies$RestartStrategyConfiguration;*
at
org.apache.flink.optimizer.plantranslate.JobGraphGenerator.compileJobGraph(JobGraphGenerator.java:222)
at org.apache.flink.client.LocalExecutor.executePlan(LocalExecutor.java:187)
at
org.apache.flink.api.java.LocalEnvironment.execute(LocalEnvironment.java:90)
at
org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:855)
at org.apache.flink.api.java.DataSet.collect(DataSet.java:410)
at
org.apache.flink.examples.java.misc.PiEstimation.main(PiEstimation.java:63)

Previously before running the Kafka examples, the batch examples were
working fine, now not. Now only the streaming examples are working.

Best Regards,
Subash Basnet

Re: Unable to run the batch examples after running stream examples

Posted by Chesnay Schepler <ch...@apache.org>.
where did you run the batch/streaming jobs? did both job use the same 
flink version?

On 21.03.2016 17:06, subash basnet wrote:
> Hello all,
>
> The scenario is I am working on Kafka Read/Write examples. It works 
> fine, but now when I try to run the batch examples such as 
> PiEstimation or any other, I get the following error:
>
> Exception in thread "main" *java.lang.NoSuchMethodError: 
> org.apache.flink.api.common.Plan.getRestartStrategyConfiguration()Lorg/apache/flink/api/common/restartstrategy/RestartStrategies$RestartStrategyConfiguration;*
> at 
> org.apache.flink.optimizer.plantranslate.JobGraphGenerator.compileJobGraph(JobGraphGenerator.java:222)
> at 
> org.apache.flink.client.LocalExecutor.executePlan(LocalExecutor.java:187)
> at 
> org.apache.flink.api.java.LocalEnvironment.execute(LocalEnvironment.java:90)
> at 
> org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:855)
> at org.apache.flink.api.java.DataSet.collect(DataSet.java:410)
> at 
> org.apache.flink.examples.java.misc.PiEstimation.main(PiEstimation.java:63)
>
> Previously before running the Kafka examples, the batch examples were 
> working fine, now not. Now only the streaming examples are working.
>
> Best Regards,
> Subash Basnet
>


Re: Unable to run the batch examples after running stream examples

Posted by Chesnay Schepler <ch...@apache.org>.
the project.version property is not defined explicitly; it resembles the 
version of the parent.

Plan#getRestartStrategyConfiguration() exists in Flink 1.0.0, but not in 
1.1-SNAPSHOT.

When you set the version to 1.0.0 you may have created this version 
mismatch.

On 21.03.2016 19:23, subash basnet wrote:
> Hello Chesnay Schepler,
>
> I am running the latest flink examples from here 
> <https://github.com/apache/flink> in eclipse.
> I had used the WikipediaAnalysis pom properties/dependency in batch 
> pom as shown below:
>             <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <flink.version>1.0.0</flink.version>
>           </properties>
>           <dependency>
> <groupId>org.apache.flink</groupId>
> <artifactId>flink-java</artifactId>
> *<version>1.0.0</version>*
> </dependency>
> <dependency>
> <groupId>org.apache.flink</groupId>
> <artifactId>flink-streaming-java_2.10</artifactId>
> <version>${flink.version}</version>
> </dependency>
>
> But the original pom of batch has dependency:
>                 <dependency>
> <groupId>org.apache.flink</groupId>
> <artifactId>flink-java</artifactId>
> *<version>${project.version}</version>*
> </dependency>
>
> Shouldn't both the above mean the same? I couldn't find the pom file 
> where 'project.version' property was defined. Yeah it's working when I 
> used the original pom of batch, but I am confused why the modified one 
> is not working.
>
> Best Regards,
> Subash Basnet
>
>
> On Mon, Mar 21, 2016 at 5:14 PM, Chesnay Schepler <chesnay@apache.org 
> <ma...@apache.org>> wrote:
>
>     Boxbe <https://www.boxbe.com/overview> This message is eligible
>     for Automatic Cleanup! (chesnay@apache.org
>     <ma...@apache.org>) Add cleanup rule
>     <https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3Dlkiao%252FbvApkYqR3nqgNVFpcfEX3rRIVrEPiCy4Hab8YcKwvYpNB0bqFNuTlLTr%252FQNtDMtcXWOSffNjJHUkn0klwJ4M3RlFAkIHSZGZrQMF70ZHyyE0PpKtd4%252BQPJC0Sg3rovM8bg3iQ%253D%26key%3DuknwPP5FGaZFx41nEpUkUuHOEI915LlL13L4F1BY%252F4o%253D&tc_serial=24800110698&tc_rand=287469002&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001>
>     | More info
>     <http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=24800110698&tc_rand=287469002&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001>
>
>
>     where did you run the batch/streaming jobs? did both job use the
>     same flink version?
>
>     On 21.03.2016 17:06, subash basnet wrote:
>>     Hello all,
>>
>>     The scenario is I am working on Kafka Read/Write examples. It
>>     works fine, but now when I try to run the batch examples such as
>>     PiEstimation or any other, I get the following error:
>>
>>     Exception in thread "main" *java.lang.NoSuchMethodError:
>>     org.apache.flink.api.common.Plan.getRestartStrategyConfiguration()Lorg/apache/flink/api/common/restartstrategy/RestartStrategies$RestartStrategyConfiguration;*
>>     at
>>     org.apache.flink.optimizer.plantranslate.JobGraphGenerator.compileJobGraph(JobGraphGenerator.java:222)
>>     at
>>     org.apache.flink.client.LocalExecutor.executePlan(LocalExecutor.java:187)
>>     at
>>     org.apache.flink.api.java.LocalEnvironment.execute(LocalEnvironment.java:90)
>>     at
>>     org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:855)
>>     at org.apache.flink.api.java.DataSet.collect(DataSet.java:410)
>>     at
>>     org.apache.flink.examples.java.misc.PiEstimation.main(PiEstimation.java:63)
>>
>>     Previously before running the Kafka examples, the batch examples
>>     were working fine, now not. Now only the streaming examples are
>>     working.Â
>>
>>     Best Regards,
>>     Subash Basnet
>>
>
>
>


Re: Unable to run the batch examples after running stream examples

Posted by subash basnet <ya...@gmail.com>.
Hello Chesnay Schepler,

I am running the latest flink examples from here
<https://github.com/apache/flink> in eclipse.
I had used the WikipediaAnalysis pom properties/dependency in batch pom as
shown below:
            <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<flink.version>1.0.0</flink.version>
          </properties>
          <dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
*<version>1.0.0</version>*
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${flink.version}</version>
</dependency>

But the original pom of batch has dependency:
                <dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
*<version>${project.version}</version>*
</dependency>

Shouldn't both the above mean the same? I couldn't find the pom file where
'project.version' property was defined. Yeah it's working when I used the
original pom of batch, but I am confused why the modified one is not
working.

Best Regards,
Subash Basnet


On Mon, Mar 21, 2016 at 5:14 PM, Chesnay Schepler <ch...@apache.org>
wrote:

> [image: Boxbe] <https://www.boxbe.com/overview> This message is eligible
> for Automatic Cleanup! (chesnay@apache.org) Add cleanup rule
> <https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3Dlkiao%252FbvApkYqR3nqgNVFpcfEX3rRIVrEPiCy4Hab8YcKwvYpNB0bqFNuTlLTr%252FQNtDMtcXWOSffNjJHUkn0klwJ4M3RlFAkIHSZGZrQMF70ZHyyE0PpKtd4%252BQPJC0Sg3rovM8bg3iQ%253D%26key%3DuknwPP5FGaZFx41nEpUkUuHOEI915LlL13L4F1BY%252F4o%253D&tc_serial=24800110698&tc_rand=287469002&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001>
> | More info
> <http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=24800110698&tc_rand=287469002&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001>
>
> where did you run the batch/streaming jobs? did both job use the same
> flink version?
>
> On 21.03.2016 17:06, subash basnet wrote:
>
> Hello all,
>
> The scenario is I am working on Kafka Read/Write examples. It works fine,
> but now when I try to run the batch examples such as PiEstimation or any
> other, I get the following error:
>
> Exception in thread "main" *java.lang.NoSuchMethodError:
> org.apache.flink.api.common.Plan.getRestartStrategyConfiguration()Lorg/apache/flink/api/common/restartstrategy/RestartStrategies$RestartStrategyConfiguration;*
> at
> org.apache.flink.optimizer.plantranslate.JobGraphGenerator.compileJobGraph(JobGraphGenerator.java:222)
> at
> org.apache.flink.client.LocalExecutor.executePlan(LocalExecutor.java:187)
> at
> org.apache.flink.api.java.LocalEnvironment.execute(LocalEnvironment.java:90)
> at
> org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:855)
> at org.apache.flink.api.java.DataSet.collect(DataSet.java:410)
> at
> org.apache.flink.examples.java.misc.PiEstimation.main(PiEstimation.java:63)
>
> Previously before running the Kafka examples, the batch examples were
> working fine, now not. Now only the streaming examples are working.Â
>
> Best Regards,
> Subash Basnet
>
>
>
>