Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
This happens when I tried to run 0.10 topology on 2.x cluster. It's because in 0.10,
struct StormTopology { //ids must be unique across maps // #workers to use is in conf 1: required map<string, SpoutSpec> spouts; 2: required map<string, Bolt> bolts; 3: required map<string, StateSpoutSpec> state_spouts; #reserved 4: optional list<binary> worker_hooks; #reserved 5: optional list<string> dependency_jars; #reserved 6: optional list<string> dependency_artifacts; 7: optional string storm_version; 8: optional string jdk_version; }
The worker_hooks field is commented out. When WorkerState. runWorkerStartHooks () calls get_worker_hooks(), it returns null.
worker_hooks is an optional field in StormTopology struct (storm.thrift). So when we call get_worker_hooks(), we need to check with is_set_worker_hooks().
BTW, this can be a common issue for all thrift structs. We should always check is_set_xxx before we call get_xxx if xxx is an optional field.
Attachments
Issue Links
- links to