[
https://issues.apache.org/jira/browse/STORM-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14377170#comment-14377170
]
ASF GitHub Bot commented on STORM-468:
--------------------------------------
Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/477#discussion_r26999928
--- Diff: docs/documentation/FAQ.md ---
@@ -62,6 +62,10 @@ You can join streams with join, merge or multiReduce.
At time of writing, you can't emit to multiple output streams from Trident
-- see [STORM-68](https://issues.apache.org/jira/browse/STORM-68)
+### Why am I getting a NotSerializableException/IllegalStateException when
my topology is being started up?
+
+Within the Storm lifecycle, the topology is instantiated and then
serialized to byte format to be stored in ZooKeeper, prior to the topology
being executed. Within this step, if a spout or bolt within the topology has an
initialized unserializable property, serialization will fail. If there is a
need for a field that is unserializable, initialize it within the bolt or
spout's prepare method, which is run after the topology is delivered to the
worker.
--- End diff --
I'm not sure but it may be better to document "serialized fields' values
are reused when workers are relaunched whether live worker modifies it or
not.".
I had this issue earlier, and sure it was by mistake, but it would be hard
to find bug.
Wish to hear everyone's thought.
> java.io.NotSerializableException should be explained
> ----------------------------------------------------
>
> Key: STORM-468
> URL: https://issues.apache.org/jira/browse/STORM-468
> Project: Apache Storm
> Issue Type: Bug
> Affects Versions: 0.9.2-incubating
> Environment: Any
> Reporter: Jason Kania
> Priority: Minor
> Labels: newbie
>
> The occurrence of the NotSerializableException and how to avoid it should be
> better documented and the error from the code should be expanded to include
> some human readable message because it took a lot of searching to find out
> that the spouts and bolts need to create their variables in the prepare
> method in order to avoid this problem.
> The error text output could state that this is how to solve the problem.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)