[
https://issues.apache.org/jira/browse/STORM-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jungtaek Lim resolved STORM-2234.
---------------------------------
Resolution: Fixed
Assignee: itiel
Fix Version/s: 1.0.3
1.1.0
2.0.0
Thanks [~itielshw], I merged into master, 1.x, 1.0.x branches.
> heartBeatExecutorService in shellSpout don't work well with deactivate
> -----------------------------------------------------------------------
>
> Key: STORM-2234
> URL: https://issues.apache.org/jira/browse/STORM-2234
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-core
> Affects Versions: 1.x, 0.10.3
> Environment: Irrelevant - all
> Reporter: itiel
> Assignee: itiel
> Labels: bug
> Fix For: 2.0.0, 1.1.0, 1.0.3
>
> Original Estimate: 0h
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> When using the activate and deactivate of a shellSpout (using the client):
> 1 .First we deactivate -which calls : {quote}
> heartBeatExecutorService.shutdownNow();{quote}
> 2. Then we actiavate which calls: {quote}
> heartBeatExecutorService.scheduleAtFixedRate(new
> SpoutHeartbeatTimerTask(this), 1, 1, TimeUnit.SECONDS);
> {quote}
> 3.This results in an {quote} RejectedExecutionException {quote} as we
> *already* shutdown the heartBeatExecutorService.
> 4.Simple test to prove this:
> {quote}{noformat}
> private class TestTimerTask extends TimerTask {
> @Override
> public void run() {
> System.out.println("Im running now");
> }
> }
> @Test(expectedExceptions = RejectedExecutionException.class)
> public void heartBeatShutdownTest() {
> ScheduledExecutorService heartBeatExecutorService =
> MoreExecutors.getExitingScheduledExecutorService(new
> ScheduledThreadPoolExecutor(1));
> heartBeatExecutorService.scheduleAtFixedRate(new TestTimerTask(), 1,
> 1, TimeUnit.SECONDS);
> heartBeatExecutorService.shutdownNow();
> heartBeatExecutorService.scheduleAtFixedRate(new TestTimerTask(), 1,
> 1, TimeUnit.SECONDS);
> }{noformat}{quote}
> 5.Already created a fix and opening a PR with it:
> https://github.com/apache/storm/pull/1813
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)