Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception at Accumulo Data Source #1066

Closed
ChrizZz110 opened this Issue Oct 30, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@ChrizZz110
Copy link
Contributor

ChrizZz110 commented Oct 30, 2018

Reading a graph from AccumuloDataSource, I get the following exception:

org.apache.flink.client.program.ProgramInvocationException: com.esotericsoftware.kryo.KryoException: Unable to find class: org.gradoop.common.model.impl.id.GradoopIdSet
Serialization trace:
graphIds (org.gradoop.common.model.impl.pojo.Vertex)
	at org.apache.flink.client.program.rest.RestClusterClient.submitJob(RestClusterClient.java:265)
	at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:464)
	at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:452)
	at org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:62)
	at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:816)
	at org.gradoop.benchmark.subgraph.SubgraphBenchmark.main(SubgraphBenchmark.java:191)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:528)
	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:420)
	at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:404)
	at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:781)
	at org.apache.flink.client.cli.CliFrontend.runProgram(CliFrontend.java:275)
	at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:210)
	at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:1020)
	at org.apache.flink.client.cli.CliFrontend.lambda$main$9(CliFrontend.java:1096)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1754)
	at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
	at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1096)

Complete exception is found here: acc-exception.txt

@ChrizZz110

This comment has been minimized.

Copy link
Contributor Author

ChrizZz110 commented Oct 30, 2018

@chpengzh can you have a look at it? Thx!

@chpengzh

This comment has been minimized.

Copy link
Contributor

chpengzh commented Nov 1, 2018

I tried again with the latest version in branch develop [704925d], but I didn't see this happen.

Always rebuild gradoop-common module if something is changed.

gradoop-accumulo-iterator.jar is built by maven-shade-plugin, gradoop-accumulo is built by maven-compiler-plugin, which means you must always use the same version of iterator jar and client jar.

If not, kryo serializer may throw such exception

@chpengzh

This comment has been minimized.

Copy link
Contributor

chpengzh commented Nov 1, 2018

@ChrizZz110

This comment has been minimized.

Copy link
Contributor Author

ChrizZz110 commented Dec 12, 2018

@chpengzh This issue still exists. Do you have any other thoughts?

@p-f

This comment has been minimized.

Copy link
Collaborator

p-f commented Dec 14, 2018

I could not reproduce this exception, but I was having a similar Exception where Accumulo could not find the Iterator classes. I had to add path to the iterator jar to the accumulo-site.xml so maybe I did something wrong there, since Accumulo is supposed to find classes inside of jar files in the lib/ext folder.
After changing the property in accumulo-site.xml to:

<property>
  <name>general.dynamic.classpaths</name>
  <value>/etc/accumulo/lib/ext,/etc/accumulo/lib/ext/gradoop-accumulo-iterator.jar</value>
</property>

I was getting another ClassNotFoundException, this time for org.objenesis.strategy.InstantiatorStrategy. This class is used by Kryo, and it's dependency was simply missing in the includes rules of the shade plugin.
Everything seems to work now after adding the dependency. Will provide PR for this fix.

@p-f

This comment has been minimized.

Copy link
Collaborator

p-f commented Dec 14, 2018

Building a JAR and running it with flink run produces the Exception, so this does not fix is completely.

@p-f

This comment has been minimized.

Copy link
Collaborator

p-f commented Jan 15, 2019

Found the issue: Flink also uses Kryo, but some 2.x version. This version does not use Accumulo's AccumuloVFSClassLoader, which is responsible for loading classes from the lib/ext folder.
Everything seems to work after relocating the classes.

TL;DR: Flink uses another incompatible version of Kryo.

Will update and reopen my PR.

p-f added a commit to p-f/gradoop that referenced this issue Jan 15, 2019

p-f added a commit to p-f/gradoop that referenced this issue Feb 20, 2019

ChrizZz110 added a commit to p-f/gradoop that referenced this issue Feb 20, 2019

p-f added a commit to p-f/gradoop that referenced this issue Feb 20, 2019

p-f added a commit to p-f/gradoop that referenced this issue Feb 20, 2019

p-f added a commit to p-f/gradoop that referenced this issue Feb 20, 2019

@galpha galpha closed this in #1145 Feb 20, 2019

galpha added a commit that referenced this issue Feb 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.