salesforce / storm-dynamic-spout

A framework for building spouts for Apache Storm and a Kafka based spout for dynamically skipping messages to be processed later.
BSD 3-Clause "New" or "Revised" License
41 stars 13 forks source link

Do not pass empty ending state when loading sidelines #99

Closed stanlemon closed 6 years ago

stanlemon commented 6 years ago

When redeploying a topology with an existing sideline in the resume state I noticed the sideline failed to load because of the exception thrown at https://github.com/salesforce/storm-dynamic-spout/blob/2dc9dbd394b81ed7516068b32c9b58589d3729a7/src/main/java/com/salesforce/storm/spout/dynamic/VirtualSpout.java#L347-L353

This is because there is no ending state set in the resume, but we instantiate the builder regardless and never populate it. To avoid this exception I added a check to make sure that the ending state is empty, and if it is to pass null on instead.