[
https://issues.apache.org/jira/browse/STORM-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
itiel updated STORM-2234:
-------------------------
Description:
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
was:
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.
> 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
> Labels: bug
> Original Estimate: 0h
> Time Spent: 10m
> 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)