Hi, I am trying to run a simple flink program, which reads an image from disk and does some image processing and stores it back to the disk. For the purpose I have a custom defined class, which I am using in dataset and passing it onwards to flatmap function. However the experiment encountered an error which I am clueless about. Any help will be highly appreciated. Pasting the error below.Exception in thread "main" java.lang.NoSuchMethodError: org.apache.flink.api.java.typeutils.runtime.kryo.Serializers.recursivelyRegisterType(Ljava/lang/Class;Lorg/apache/flink/api/common/ExecutionConfig;)V at org.apache.flink.api.java.ExecutionEnvironment$1.preVisit(ExecutionEnvironment.java:985) at org.apache.flink.api.java.ExecutionEnvironment$1.preVisit(ExecutionEnvironment.java:977) at org.apache.flink.api.common.operators.SingleInputOperator.accept(SingleInputOperator.java:198) at org.apache.flink.api.common.operators.GenericDataSinkBase.accept(GenericDataSinkBase.java:223) at org.apache.flink.api.common.Plan.accept(Plan.java:348) at org.apache.flink.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:977) at org.apache.flink.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:938) at org.apache.flink.api.java.LocalEnvironment.execute(LocalEnvironment.java:80) at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:834) at org.apache.flink.api.java.DataSet.collect(DataSet.java:408) at org.myorg.quickstart.Job.main(Job.java:51) Warm Regards, Debaditya |
Hello Debaditya,
From the exception message you posted it seems that it is a linkage error. Could it be that you are combining different versions of Flink when running your application? E.g. you have version X running on your cluster and you create your jar against version Y on your local machine? In this case, Flink version Y may have a method that is no longer there in version X, and this causes the exception. Kostas
|
Hello Kostas, Thanks for you reply. On Thu, Jun 2, 2016 at 1:27 PM, Kostas Kloudas <[hidden email]> wrote:
|
Hi Debaditya,
When creating your application, did you follow the steps described in: (of course adjusted to the release you are currently using) ? Kostas
|
Hi Kostas, I followed this https://ci.apache.org/projects/flink/flink-docs-release-1.0/quickstart/java_api_quickstart.html . On Thu, Jun 2, 2016 at 2:17 PM, Kostas Kloudas <[hidden email]> wrote:
|
Could you please post your pom file and which version of Flink you downloaded?
The latter you can find it in the beginning of the log files. Kostas
|
Hello Kostas, Here is the pom<!--and currently I am using flink version 1.0.3. Since yesterday I had 1.0.2 , however I removed that version today morning and downloaded the version 1.0.3. On Thu, Jun 2, 2016 at 3:07 PM, Kostas Kloudas <[hidden email]> wrote:
|
Could you replace 0.10-SNAPSHOT with ${flink.version} in the pom?
Thanks,
|
Hi Kostas, Doing this throws an error in the pom.<dependency>'org.apache.flink:flink-yarn-tests:1.0.3' not found. On Thu, Jun 2, 2016 at 3:32 PM, Kostas Kloudas <[hidden email]> wrote:
|
The correct artifact id is flink-yarn-tests_2.10. On Thu, Jun 2, 2016 at 3:54 PM, Debaditya Roy <[hidden email]> wrote:
|
Hello, I updated the artifact Id and regenerated the jar, but it is giving the same error. It is somehow trying to access the method which is not there in the updated version.On Thu, Jun 2, 2016 at 4:10 PM, Robert Metzger <[hidden email]> wrote:
|
Form the Flink logs you see that the version is the correct right (1.0.3)?
|
Yeah I think so. Here is a part of log file. 2016-06-02 18:37:27,376 INFO org.apache.flink.runtime.jobmanager.JobManager - -------------------------------------------------------------------------------- 2016-06-02 18:37:27,377 INFO org.apache.flink.runtime.jobmanager.JobManager - Starting JobManager (Version: 1.0.3, Rev:f3a6b5f, Date:06.05.2016 @ 12:58:02 UTC) 2016-06-02 18:37:27,377 INFO org.apache.flink.runtime.jobmanager.JobManager - Current user: royd1990 2016-06-02 18:37:27,377 INFO org.apache.flink.runtime.jobmanager.JobManager - JVM: Java HotSpot(TM) 64-Bit Server VM - Oracle Corporation - 1.8/25.74-b02 2016-06-02 18:37:27,377 INFO org.apache.flink.runtime.jobmanager.JobManager - Maximum heap size: 736 MiBytes 2016-06-02 18:37:27,377 INFO org.apache.flink.runtime.jobmanager.JobManager - JAVA_HOME: /usr/lib/jvm/java-8-oracle/jre 2016-06-02 18:37:27,385 INFO org.apache.flink.runtime.jobmanager.JobManager - Hadoop version: 1.2.1 2016-06-02 18:37:27,385 INFO org.apache.flink.runtime.jobmanager.JobManager - JVM Options: 2016-06-02 18:37:27,385 INFO org.apache.flink.runtime.jobmanager.JobManager - -Xms768m 2016-06-02 18:37:27,385 INFO org.apache.flink.runtime.jobmanager.JobManager - -Xmx768m 2016-06-02 18:37:27,385 INFO org.apache.flink.runtime.jobmanager.JobManager - -Dlog.file=/home/royd1990/Downloads/flink-1.0.3/log/flink-royd1990-jobmanager-0-royd1990-HP-ENVY-Notebook.log On Thu, Jun 2, 2016 at 4:32 PM, Kostas Kloudas <[hidden email]> wrote:
|
The reason seems to be that somehow an older version of Flink is still in your dependencies.
As you can see here: at 0.10 the method you cannot find had 2 arguments and after this commit it has 3. This is the reason why you cannot find the method. It can be that you forgot to clean some directory or forgot to rebuild after updating versions. What you could do is delete and clean everything and reinstall/re-download/rebuild them. I hope this is not too much of a hassle. Kostas
|
Yeah i will do that as a last resort. But the strange fact is in IDE it is working fine. Although I am not entirely aware of the mechanics on how flink is simulated on IDE. On Thu, 2 Jun 2016 17:35 Kostas Kloudas, <[hidden email]> wrote:
|
Hello, Thank you for the advice. I have done that simulation and have successfully got correct results. But there is some problem which I have already raised before. mvn clean install -Pbuild-jar is unable to run on the local flink node as it gives an Java linking error (when I concluded the fat jar could not link the path to my native library for the open cv). Hence I manually built the fat jar and uploaded it in the web frontend, after submitting the job it is correctly executing and giving me the desired results but with an exception (cannot show the plan) org.apache.flink.client.program.ProgramInvocationException: The program plan could not be fetched - the program aborted pre-maturely.System.out: (none)
fat jar file created by mvn clean install -Pbuild-jar runs without giving the linking error? (because my guess is the manually created jar incorporates something which causes the premature abort in the web interface). Sorry for long mail and thanks in advance. Warm Regards, Debaditya On Thu, Jun 2, 2016 at 5:53 PM, Debaditya Roy <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |