[
https://issues.apache.org/jira/browse/IGNITE-3963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15551774#comment-15551774
]
Andrey Gura edited comment on IGNITE-3963 at 10/6/16 12:11 PM:
---------------------------------------------------------------
[~samaitra] I've looked at your changes and have some comments:
- exception points to problem at deserialization of {{IgniteLogger}} instance
not {{Ignite}} ignite instance.
- {{IgniteSink.java}}: {{Ignite}} instance will not be serialized because
{{Holder}} class isn't serializable and {{Ignite}} instance static itself
(statics are implicitly transient). So {{@IgniteInstanceResource}} annotation
and {{transient}} modifier are redundant for {{Holder.IGNITE}} field.
- {{FlinkIgniteSinkSelfTest.java}}: {{@IgniteInstanceResource}} annotation and
{{transient}} modifier are redundant for {{FlinkIgniteSinkSelfTest.ignite}}
field bacuse value of this field does never sirialize in this test.
Could you please fix this comments?
I also found other issues that don't related with this ticket. JFYI: It's very
strange to me that {{cacheName}}, {{igniteCfgFile}} and {{stopped}} fileds of
{{IgniteSink}} class are static. Looks like we can does work only with one
Ignite cache in one JVM. Note also that {{stopped}} filed value will be
{{false}} by default after deserialization.
was (Author: agura):
[~samaitra] I've looked at your changes and have some comments:
- exception points to problem at deserialization of {{IgniteLogger}} instance
not {{Ignite}} ignite instance.
- {{IgniteSink.java}}: {{Ignite}} instance will not be serialized because
{{Holder}} class isn't serializable and {{Ignite}} instance static itself
(statics are implicitly transient). So {{@IgniteInstanceResource}} annotation
and {{transient}} modifier are redundant for {{Holder.IGNITE}} field.
- {{FlinkIgniteSinkSelfTest.java}}: {{@IgniteInstanceResource}} annotation and
{{transient}} modifier are redundant for {{FlinkIgniteSinkSelfTest.ignite}}
field bacuse value of this field does never sirialize in this test.
I also found other issues that don't related with this ticket. JFYI: It's very
strange to me that {{cacheName}}, {{igniteCfgFile}} and {{stopped}} fileds of
{{IgniteSink}} class are static. Looks like we can does work only with one
Ignite cache in one JVM. Note also that {{stopped}} filed value will be
{{false}} by default after deserialization.
> FlinkIgniteSinkSelfTest fails with exception IllegalArgumentException
> ---------------------------------------------------------------------
>
> Key: IGNITE-3963
> URL: https://issues.apache.org/jira/browse/IGNITE-3963
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 1.7
> Reporter: Saikat Maitra
> Assignee: Saikat Maitra
> Priority: Trivial
> Fix For: 1.8
>
>
> FlinkIgniteSinkSelfTest fails with exception IllegalArgumentException.
> {code}
> [21:30:31,387][INFO ][main][root] >>> Stopping test class:
> FlinkIgniteSinkSelfTest <<<
> org.apache.flink.runtime.client.JobExecutionException: Job execution failed.
> at
> org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$7.apply$mcV$sp(JobManager.scala:714)
> at
> org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$7.apply(JobManager.scala:660)
> at
> org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$7.apply(JobManager.scala:660)
> at
> scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
> at
> scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
> at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)
> at
> akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:401)
> at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
> at
> scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.pollAndExecAll(ForkJoinPool.java:1253)
> at
> scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1346)
> at
> scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
> at
> scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
> Caused by: org.apache.flink.streaming.runtime.tasks.StreamTaskException:
> Cannot instantiate user function.
> at
> org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperator(StreamConfig.java:209)
> at
> org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:186)
> at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.IllegalArgumentException: Ignite grid name thread local
> must be set or this method should be accessed under
> org.apache.ignite.thread.IgniteThread
> at
> org.apache.ignite.internal.IgnitionEx.localIgnite(IgnitionEx.java:1296)
> at
> org.apache.ignite.internal.GridLoggerProxy.readResolve(GridLoggerProxy.java:207)
> 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:497)
> at
> java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1148)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1810)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
> at
> org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:290)
> at
> org.apache.flink.util.InstantiationUtil.readObjectFromConfig(InstantiationUtil.java:248)
> at
> org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperator(StreamConfig.java:194)
> ... 3 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)