GitHub user shanthoosh opened a pull request:
https://github.com/apache/samza/pull/283
SAMZA-1406: Fix potential orphaned containers problem in stand alone.
Changes:
* Switch from `executorService.shutdown()` to
`executorService.shutdownNow()` in `stopScheduler()` implementation. Along with
cancelling all the pending tasks, this switch will also interrupt the current
running thread.
* Check for the interrupted flag in `ScheduleAfterDebounceTime` scheduled
task and trigger the stop sequence.â¨
* Update stop sequence of `ScheduleAfterDebounceTime` on task exception.
* Move zookeeper specific constants outside of `ScheduleAfterDebounceTime`
into `ZkJobCoordinator`(The overall purpose of this `ScheduleAfterDebounceTime`
class is to become the common scheduler for both AzureTasks, ZkTasks. This
cleanup takes few steps in that general direction).
* Unit test to verify the callback triggering on exception.
* General code cleanup and java doc added to fields and methods.
NOTE: Scenario that triggers orphaned container is last run of
`ScheduleAfterDebounceTime` brings up samza container. Though we handle the
interrupt and kill container, small window between interrupt occurrence and
killing container, thereâll be orphaned containers.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shanthoosh/samza SAMZA-1406_1
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/samza/pull/283.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 #283
----
commit 1766362544c4267582ce12875c42d7954342849b
Author: Shanthoosh Venkataraman <[email protected]>
Date: 2017-08-23T22:52:23Z
SAMZA-1406:
Detailed explanation goes here.
----
---
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.
---