[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-19 Thread HeartSaVioR
Github user HeartSaVioR commented on the issue: https://github.com/apache/storm/pull/1821 +1 --- 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

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-15 Thread ptgoetz
Github user ptgoetz commented on the issue: https://github.com/apache/storm/pull/1821 +1 --- 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

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-15 Thread srdo
Github user srdo commented on the issue: https://github.com/apache/storm/pull/1821 @ptgoetz Sure, I'll add that. --- 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

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-15 Thread ptgoetz
Github user ptgoetz commented on the issue: https://github.com/apache/storm/pull/1821 One minor nit: It would be helpful to construct the exceptions with a message explaining what happened. Other than that I'm +1. --- If your project is set up for it, you can reply to this

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-13 Thread hmcl
Github user hmcl commented on the issue: https://github.com/apache/storm/pull/1821 +1 --- 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

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-12 Thread srdo
Github user srdo commented on the issue: https://github.com/apache/storm/pull/1821 @hmcl I'd be happy to add comments explaining the propagation. Calling `close()` isn't enough. When the Kafka exception is thrown, the thread interrupt state is cleared (same behavior as the Java

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-12 Thread hmcl
Github user hmcl commented on the issue: https://github.com/apache/storm/pull/1821 @srdo I think I understand what you mean. However, I think that the cleanest way to do this is to catch kafka's InterruptException, and call the Spout's `close()` method. If it is an error from which

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-12 Thread srdo
Github user srdo commented on the issue: https://github.com/apache/storm/pull/1821 I went ahead and replaced the interrupts with `throw new RuntimeException(new InterruptedException());`, that way the executor stops immediately instead of waiting for next check in the async loop.

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-12 Thread hmcl
Github user hmcl commented on the issue: https://github.com/apache/storm/pull/1821 @srdo [Kafka's InterruptException](https://kafka.apache.org/090/javadoc/org/apache/kafka/common/errors/InterruptException.html) is a RuntimeException, otherwise the code wouldn't even compile without

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-11 Thread srdo
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

[GitHub] storm issue #1821: STORM-2239: Handle InterruptException in new Kafka spout

2016-12-11 Thread hmcl
Github user hmcl commented on the issue: https://github.com/apache/storm/pull/1821 @srdo what is `Thread.currentThread().interrupt();` trying to accomplish? --- 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