SAMZA-1340 - StreamProcessor does not propagate container failures from StreamTask
authorNavina Ramesh <navina@apache.org>
Wed, 28 Jun 2017 18:09:27 +0000 (11:09 -0700)
committernavina <navina@apache.org>
Wed, 28 Jun 2017 18:09:27 +0000 (11:09 -0700)
commitcd925aa17e69e068edb6e6f15f06853b7d3713cd
tree74092168cf30396889dd2a6adc713081f0562bb8
parente11ccd241c6dddd1ffb25e5debd4a639930a4660
SAMZA-1340 - StreamProcessor does not propagate container failures from StreamTask

Storing the exception seen from the container in the `SamzaContainerListener#onFailure(Throwable)` in the StreamProcessor.
`JobCoordinator#stop` callback inspects this stored exception and invokes the correct callback for StreamProcessorLifecycleListener.
It is pretty difficult to add all test cases. Suggestion welcome for improving code/testing.

Author: Navina Ramesh <navina@apache.org>

Reviewers: Chris Pettitt <cpettitt@linkedin.com>, Boris Shkolnik <boryas@apache.org>

Closes #230 from navina/LISAMZA-5272
samza-core/src/main/java/org/apache/samza/coordinator/JobCoordinatorListener.java
samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
samza-core/src/test/java/org/apache/samza/processor/TestStreamProcessor.java
samza-core/src/test/scala/org/apache/samza/processor/StreamProcessorTestUtils.scala