Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.x, 0.10.3
-
Irrelevant - all
Description
When using the activate and deactivate of a shellSpout (using the client):
1 .First we deactivate -which calls :
heartBeatExecutorService.shutdownNow();
2. Then we actiavate which calls:
heartBeatExecutorService.scheduleAtFixedRate(new SpoutHeartbeatTimerTask(this), 1, 1, TimeUnit.SECONDS);
3.This results in an
as we already shutdown the heartBeatExecutorService.RejectedExecutionException
4.Simple test to prove this:
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); }
5.Already created a fix and opening a PR with it: https://github.com/apache/storm/pull/1813
Attachments
Issue Links
- links to