Github user srdo commented on the issue:
https://github.com/apache/storm/pull/1821
When Storm is trying to shut down, it interrupts the executor threads. This
should cause the async loop
(https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/utils/Utils.java#L2177)
to stop running, since an InterruptedException will be thrown from either
within the spout, or from the sleep statement in the loop. The loop catches and
handles InterruptedException so we don't crash the worker while shutting down.
The Kafka consumer doesn't throw InterruptedException when interrupted, but
instead a Kafka specific unchecked InterruptException. If we don't catch and
convert it to something Storm understands, the spout will cause the worker to
crash when shutting down. This is very inconvenient for local mode clusters,
since that means the VM running the cluster gets killed. The ways to convert
the exception are either to throw a new (wrapped) InterruptedException out of
the spout, or to reinterrupt the running thread.
I can replace the interrupt with `throw new RuntimeException(new
InterruptedException())` if you like?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---