flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4149) Fix Serialization of NFA in AbstractKeyedCEPPatternOperator
Date Wed, 12 Apr 2017 17:28:41 GMT

    [ https://issues.apache.org/jira/browse/FLINK-4149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966249#comment-15966249
] 

ASF GitHub Bot commented on FLINK-4149:
---------------------------------------

Github user shashank734 commented on the issue:

    https://github.com/apache/flink/pull/2202
  
    Again getting this error. After changing state backend from Rocksdb it's working fine.
    
    ```
    04/12/2017 10:05:04	Job execution switched to status FAILING.
    java.lang.RuntimeException: Could not deserialize NFA.
    	at org.apache.flink.cep.nfa.NFA$Serializer.deserialize(NFA.java:538)
    	at org.apache.flink.cep.nfa.NFA$Serializer.deserialize(NFA.java:469)
    	at org.apache.flink.contrib.streaming.state.RocksDBValueState.value(RocksDBValueState.java:81)
    	at org.apache.flink.cep.operator.AbstractKeyedCEPPatternOperator.getNFA(AbstractKeyedCEPPatternOperator.java:124)
    	at org.apache.flink.cep.operator.AbstractCEPBasePatternOperator.processElement(AbstractCEPBasePatternOperator.java:72)
    	at org.apache.flink.cep.operator.AbstractKeyedCEPPatternOperator.processElement(AbstractKeyedCEPPatternOperator.java:162)
    	at org.apache.flink.streaming.runtime.io.StreamInputProcessor.processInput(StreamInputProcessor.java:185)
    	at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask.run(OneInputStreamTask.java:63)
    	at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:272)
    	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:655)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.ClassNotFoundException: co.ronak.nto.Job$$anon$18$$anon$21$$anon$3
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Class.java:348)
    	at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:626)
    	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1613)
    	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
    	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000)
    	at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:501)
    	at org.apache.flink.api.scala.typeutils.TraversableSerializer.readObject(TraversableSerializer.scala:53)
    	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
    	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1900)
    	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.readArray(ObjectInputStream.java:1707)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1345)
    	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.defaultReadObject(ObjectInputStream.java:501)
    	at org.apache.flink.cep.NonDuplicatingTypeSerializer.readObject(NonDuplicatingTypeSerializer.java:190)
    	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.invokeReadObject(ObjectStreamClass.java:1017)
    	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1900)
    	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.defaultReadObject(ObjectInputStream.java:501)
    	at org.apache.flink.cep.nfa.NFA.readObject(NFA.java:394)
    	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.invokeReadObject(ObjectStreamClass.java:1017)
    	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1900)
    	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.cep.nfa.NFA$Serializer.deserialize(NFA.java:535)
    	... 10 more
    ```



> Fix Serialization of NFA in AbstractKeyedCEPPatternOperator
> -----------------------------------------------------------
>
>                 Key: FLINK-4149
>                 URL: https://issues.apache.org/jira/browse/FLINK-4149
>             Project: Flink
>          Issue Type: Bug
>          Components: CEP
>    Affects Versions: 1.0.0, 1.1.0, 1.0.1, 1.0.2, 1.0.3
>            Reporter: Aljoscha Krettek
>            Assignee: Aljoscha Krettek
>            Priority: Blocker
>             Fix For: 1.1.0
>
>
> A job that uses CEP fails upon restore with a {{NullPointerException}} in {{NFA.process()}}.
The reason seems to be that field {{computationStates}} is {{null}}. This field is transient
and read in a custom {{readObject()}} method.
> In {{AbstractKeyedCEPPatternOperator}} this snipped is used to construct a {{StateDescriptor}}
for an {{NFA}} state:
> {code}
> new ValueStateDescriptor<NFA<IN>>(
>     NFA_OPERATOR_STATE_NAME,
>     new KryoSerializer<NFA<IN>>((Class<NFA<IN>>) (Class<?>)
NFA.class, getExecutionConfig()),
>     null)
> {code}
> It seems Kryo does not invoke {{readObject}}/{{writeObject}}. We probably need a custom
{{TypeSerializer}} for {{NFA}} to solve the problem.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message