edits based on @harsha comments
Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/6e6a0003 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/6e6a0003 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/6e6a0003 Branch: refs/heads/master Commit: 6e6a00031d0100e6d44db57cb59ecdffe907149d Parents: 0e941da Author: Boyang Jerry Peng <[email protected]> Authored: Tue Feb 16 20:54:51 2016 -0600 Committer: Boyang Jerry Peng <[email protected]> Committed: Thu Feb 18 10:37:29 2016 -0600 ---------------------------------------------------------------------- storm-core/src/jvm/org/apache/storm/StormTimer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/6e6a0003/storm-core/src/jvm/org/apache/storm/StormTimer.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/org/apache/storm/StormTimer.java b/storm-core/src/jvm/org/apache/storm/StormTimer.java index 1c0d967..2874135 100644 --- a/storm-core/src/jvm/org/apache/storm/StormTimer.java +++ b/storm-core/src/jvm/org/apache/storm/StormTimer.java @@ -34,7 +34,7 @@ import java.util.concurrent.atomic.AtomicBoolean; * code that does asynchronous work on the timer thread */ -public class StormTimer implements AutoCloseable{ +public class StormTimer implements AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(StormTimer.class); public static class QueueEntry { @@ -51,7 +51,8 @@ public class StormTimer implements AutoCloseable{ public static class StormTimerTask extends Thread { - private PriorityBlockingQueue<QueueEntry> queue = new PriorityBlockingQueue<QueueEntry>(10, new Comparator<QueueEntry>() { + //initialCapacity set to 11 since its the default inital capacity of PriorityBlockingQueue + private PriorityBlockingQueue<QueueEntry> queue = new PriorityBlockingQueue<QueueEntry>(11, new Comparator<QueueEntry>() { @Override public int compare(QueueEntry o1, QueueEntry o2) { return o1.endTimeMs.intValue() - o2.endTimeMs.intValue();
