You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "itiel (JIRA)" <ji...@apache.org> on 2016/12/03 16:26:58 UTC
[jira] [Created] (STORM-2234) heartBeatExecutorService in
shellSpout don't work well with deactivate
itiel created STORM-2234:
----------------------------
Summary: 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
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)