Ryan Merriman created METRON-1793:
-------------------------------------
Summary: ParserBolt not serializable when a Stellar filter is
configured
Key: METRON-1793
URL: https://issues.apache.org/jira/browse/METRON-1793
Project: Metron
Issue Type: Bug
Reporter: Ryan Merriman
When a sensor parser is configured to use a STELLAR filter, this exception is
thrown when starting the parser topology:
{code:java}
java.lang.IllegalStateException: Bolt 'parserBolt' contains a non-serializable
field of type org.apache.metron.stellar.common.StellarPredicateProcessor, which
was instantiated prior to topology creation. o
rg.apache.metron.stellar.common.StellarPredicateProcessor should be
instantiated within the prepare method of 'parserBolt at the earliest. at
org.apache.storm.topology.TopologyBuilder.createTopology(TopologyBuilder.java:128)
at
org.apache.metron.parsers.topology.ParserTopologyCLI.main(ParserTopologyCLI.java:610)
Caused by: java.lang.RuntimeException: java.io.NotSerializableException:
org.apache.metron.stellar.common.StellarPredicateProcessor at
org.apache.storm.utils.Utils.javaSerialize(Utils.java:238) at
org.apache.storm.topology.TopologyBuilder.createTopology(TopologyBuilder.java:123)
... 1 more Caused by: java.io.NotSerializableException:
org.apache.metron.stellar.common.StellarPredicateProcessor at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at
java.util.HashMap.internalWriteEntries(HashMap.java:1785) at
java.util.HashMap.writeObject(HashMap.java:1362) at
sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028) at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496) at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at
org.apache.storm.utils.Utils.javaSerialize(Utils.java:234) ... 2 more{code}
This is because filter classes are instantiated and passed into the ParserBolt
constructor. When a STELLAR filter is used, a StellarPredicateProcessor
variable is included in the Filter object, causing the error when Storm
attempts to serialize the bolt.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)