Hi, Foo, Bar and Baz are the (avro)classes that will be emitted from the Spout. Since they are avro-generated they do not implement "Serializable". When the topology is deployed, everything is working nicely - I am only facing this issue during testing with a backtype.storm.testing.FeederSpout.
Regards, Tom From: Aaron.Dossett [mailto:[email protected]] Sent: Dienstag, 29. September 2015 13:47 To: [email protected] Subject: Re: Testing issue What are the exact classes of Foo, Bar, Baz? I serialize avro objects through topologies (e.g., GenericRecords). On Sep 29, 2015, at 2:51 AM, Ziemer, Tom <[email protected]<mailto:[email protected]>> wrote: Hi, I am using storm's testing framework to test my topology. Unfortunately I ran into some serialization issues: Testing.withLocalCluster(mkClusterParam, cluster -> { ... MockedSources mockedSources = new MockedSources(); mockedSources.addMockData(spout.getName(), new Values( foo, bar, baz)); } I see: [main] ERROR backtype.storm.testing4j - Error in cluster java.lang.RuntimeException: java.io.NotSerializableException: x.y.Foo at backtype.storm.serialization.DefaultSerializationDelegate.serialize(DefaultSerializationDelegate.java:43) ~[storm-core-0.9.4.jar:0.9.4] at backtype.storm.utils.Utils.serialize(Utils.java:85) ~[storm-core-0.9.4.jar:0.9.4] at backtype.storm.thrift$serialize_component_object.invoke(thrift.clj:164) ~[storm-core-0.9.4.jar:0.9.4] at backtype.storm.testing$complete_topology.doInvoke(testing.clj:478) ~[storm-core-0.9.4.jar:0.9.4] at clojure.lang.RestFn.invoke(RestFn.java:826) ~[clojure-1.5.1.jar:na] at backtype.storm.testing4j$_completeTopology.invoke(testing4j.clj:61) ~[storm-core-0.9.4.jar:0.9.4] at backtype.storm.Testing.completeTopology(Unknown Source) [storm-core-0.9.4.jar:0.9.4] ... Caused by: java.io.NotSerializableException: x.y.Foo at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) ~[na:1.8.0_45] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) ~[na:1.8.0_45] at java.util.ArrayList.writeObject(ArrayList.java:762) ~[na:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988) ~[na:1.8.0_45] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496) ~[na:1.8.0_45] Where Foo, Bar and Baz are my Avro-Classes that are used throughout the topology. Any idea how to solve this? Thanks, Tom
