+2 votes
in Apache Storm by
Why am I getting a NotSerializableException/IllegalStateException when my topology is being started up?

1 Answer

0 votes
by

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. Source: Apache Storm Documentation

Related questions

+1 vote
asked Dec 22, 2022 in Sqoop by SakshiSharma
+1 vote
asked Sep 11, 2020 in Insurance by Hodge
...