You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by fbyrne <gi...@git.apache.org> on 2016/05/05 18:03:42 UTC
[GitHub] storm pull request: STORM-1730 LocalCluster#shutdown() does not te...
GitHub user fbyrne opened a pull request:
https://github.com/apache/storm/pull/1400
STORM-1730 LocalCluster#shutdown() does not terminate all storm threads/thread pools.
The thread pool executor used by the `DisruptorQueue.FlusherPool` is in a static context of the
DisruptorQueue. To avoid major changes to how this queues lifecycle is
managed I added a simple fix is to create a thread pool factory which creates daemon
threads. The threads are now also named with the 'disruptor-flush'
prefix to be consistent with the TimerTask.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/fbyrne/storm master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/1400.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 #1400
----
commit 3c78314e18e21cd188cd7b8e5ae3f2143ed75cbd
Author: Fergus Byrne <fe...@gmail.com>
Date: 2016-05-05T16:32:33Z
STORM-1730 LocalCluster#shutdown() does not terminate all storm
threads/thread pools.
The thread pool that is remaining is in a static context of the
DisruptorQueue. To avoid major changes to how this queues lifecycle is
managed the fix is to create a thread pool factory which creates daemon
threads. The threads are now also named with the 'disruptor-flush'
prefix to be consistent with the TimerTask.
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: This closes #STORM-1730 #1730 LocalCluster#shu...
Posted by fbyrne <gi...@git.apache.org>.
Github user fbyrne commented on the pull request:
https://github.com/apache/storm/pull/1400#issuecomment-219662853
Sure, that's no problem. I haven't been able to find the Java style guide on the contribute readme.
Can you point me to this or if there is an eclipse formatter configuration you can forward to me.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: This closes #STORM-1730 #1730 LocalCluster#shu...
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/1400#discussion_r63306096
--- Diff: storm-core/src/jvm/org/apache/storm/utils/DisruptorQueue.java ---
@@ -62,10 +64,20 @@
private static final FlusherPool FLUSHER = new FlusherPool();
private static class FlusherPool {
- private Timer _timer = new Timer("disruptor-flush-trigger", true);
- private ThreadPoolExecutor _exec = new ThreadPoolExecutor(1, 100, 10, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(1024), new ThreadPoolExecutor.DiscardPolicy());
+ private static final String THREAD_PREFIX = "disruptor-flush";
+ private Timer _timer = new Timer(THREAD_PREFIX + "-trigger", true);
+ private ThreadPoolExecutor _exec;
private HashMap<Long, ArrayList<Flusher>> _pendingFlush = new HashMap<>();
private HashMap<Long, TimerTask> _tt = new HashMap<>();
+
+ public FlusherPool() {
+ _exec = new ThreadPoolExecutor(1, 100, 10, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(1024), new ThreadPoolExecutor.DiscardPolicy());
+ ThreadFactory threadFactory = new ThreadFactoryBuilder()
--- End diff --
indentation
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: This closes #STORM-1730 #1730 LocalCluster#shu...
Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on the pull request:
https://github.com/apache/storm/pull/1400#issuecomment-219583830
@fbyrne can you please look at above comments. We would like to get this into 1.x branch as well once you address the comments.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: This closes #STORM-1730 #1730 LocalCluster#shu...
Posted by kishorvpatil <gi...@git.apache.org>.
Github user kishorvpatil commented on the pull request:
https://github.com/apache/storm/pull/1400#issuecomment-217898782
@fbyrne, closing and reopening the PR or adding commit triggers the build.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: This closes #STORM-1730 #1730 LocalCluster#shu...
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the pull request:
https://github.com/apache/storm/pull/1400#issuecomment-219713855
@fbyrne Sorry we don't have it explicitly for Java now, we only have Clojure style guide.
Part of the plan for Storm 2.0.0 is porting Clojure to Java. After that we would have style guide / formatter for Java.
For now let's see style of origin code and adopt ourselves.
What I pointed out is indentation difference between L74, L75, L79. Could you address to let indentation consistent?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: This closes #STORM-1730 #1730 LocalCluster#shu...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/storm/pull/1400
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: This closes #STORM-1730 #1730 LocalCluster#shu...
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the pull request:
https://github.com/apache/storm/pull/1400#issuecomment-219339403
@fbyrne +1 once indentation is corrected.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request: This closes #STORM-1730 #1730 LocalCluster#shu...
Posted by fbyrne <gi...@git.apache.org>.
Github user fbyrne commented on the pull request:
https://github.com/apache/storm/pull/1400#issuecomment-217830423
Does a comment retrigger a build? we'll see.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---