GitHub user Ethanlm opened a pull request: https://github.com/apache/storm/pull/2311
[STORM-2729] Fix NPE in WorkerState runWorkerStartHooks and runWorkerShutdownHooks methods worker_hooks is an optional field in StormTopology struct (storm.thrift). So when we call get_worker_hooks(), we need to check is_set_worker_hooks(). We probably want to pay attention to optional fields when we write the code because 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. For details, see https://issues.apache.org/jira/browse/STORM-2729. You can merge this pull request into a Git repository by running: $ git pull https://github.com/Ethanlm/storm STORM-2729 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/storm/pull/2311.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2311 ---- commit e7e1177992ba3a151d3162b8c6de041bf6708005 Author: Ethan Li <ethanopensou...@gmail.com> Date: 2017-09-07T17:15:50Z [STORM-2729] Fix NPE in WorkerState runWorkerStartHooks and runWorkerShutdownHooks methods ---- ---