Repository: storm Updated Branches: refs/heads/master 14a483e0e -> 0a01432fb
Clarify spout non-serializable field exception message ISpout has an `open` method instead of a `prepare` method. Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e33cf7c0 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e33cf7c0 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e33cf7c0 Branch: refs/heads/master Commit: e33cf7c089748d21c2857c19005a1bb60e39bd55 Parents: 66b8f50 Author: Edward Samson <edw...@samson.ph> Authored: Thu Oct 18 19:27:38 2018 +0800 Committer: Edward Samson <edw...@samson.ph> Committed: Thu Oct 18 19:33:16 2018 +0800 ---------------------------------------------------------------------- docs/FAQ.md | 2 +- .../src/jvm/org/apache/storm/topology/TopologyBuilder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/e33cf7c0/docs/FAQ.md ---------------------------------------------------------------------- diff --git a/docs/FAQ.md b/docs/FAQ.md index ce9130e..525514e 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -64,7 +64,7 @@ At time of writing, you can't emit to multiple output streams from Trident -- se ### 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. +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's `prepare` or spout's `open` method, which is run after the topology is delivered to the worker. ## Spouts http://git-wip-us.apache.org/repos/asf/storm/blob/e33cf7c0/storm-client/src/jvm/org/apache/storm/topology/TopologyBuilder.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/topology/TopologyBuilder.java b/storm-client/src/jvm/org/apache/storm/topology/TopologyBuilder.java index 9f2545b..eafc728 100644 --- a/storm-client/src/jvm/org/apache/storm/topology/TopologyBuilder.java +++ b/storm-client/src/jvm/org/apache/storm/topology/TopologyBuilder.java @@ -134,7 +134,7 @@ public class TopologyBuilder { throw new IllegalStateException( "Spout '" + spoutId + "' contains a non-serializable field of type " + wrapperCause.getCause().getMessage() + ", " + "which was instantiated prior to topology creation. " + wrapperCause.getCause().getMessage() + " " + - "should be instantiated within the prepare method of '" + spoutId + " at the earliest.", wrapperCause); + "should be instantiated within the open method of '" + spoutId + " at the earliest.", wrapperCause); } throw wrapperCause; }