You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by mf...@apache.org on 2014/06/04 22:42:28 UTC

[1/2] git commit: STREAMS-103 | The run method in StatusCounterMonitorThread caught the InterruptedException, but never did anything with it. As a result, any calls to this.monitor.shutdownNow() were essentially ignored. Added in an explicit call to its

Repository: incubator-streams
Updated Branches:
  refs/heads/master c4b36af75 -> 8d554374a


STREAMS-103 | The run method in StatusCounterMonitorThread caught the InterruptedException, but never did anything with it. As a result, any calls to this.monitor.shutdownNow() were essentially ignored. Added in an explicit call to its shutdown method once that interrupt is received


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/a94af4ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/a94af4ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/a94af4ed

Branch: refs/heads/master
Commit: a94af4ed4b09029bbb3254cc9dbffb047a3be2cd
Parents: f4749b9
Author: Robert Douglas <rd...@w2odigital.com>
Authored: Wed May 28 12:38:45 2014 -0500
Committer: Robert Douglas <rd...@w2odigital.com>
Committed: Wed May 28 12:38:45 2014 -0500

----------------------------------------------------------------------
 .../local/tasks/StatusCounterMonitorThread.java  | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/a94af4ed/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StatusCounterMonitorThread.java
----------------------------------------------------------------------
diff --git a/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StatusCounterMonitorThread.java b/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StatusCounterMonitorThread.java
index 7579209..4635b9d 100644
--- a/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StatusCounterMonitorThread.java
+++ b/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/StatusCounterMonitorThread.java
@@ -4,8 +4,7 @@ import org.apache.streams.core.DatumStatusCountable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class StatusCounterMonitorThread implements StatusCounterMonitorRunnable
-{
+public class StatusCounterMonitorThread implements StatusCounterMonitorRunnable {
     private static final Logger LOGGER = LoggerFactory.getLogger(StatusCounterMonitorThread.class);
 
     private DatumStatusCountable task;
@@ -20,7 +19,7 @@ public class StatusCounterMonitorThread implements StatusCounterMonitorRunnable
     }
 
     @Override
-    public void shutdown(){
+    public void shutdown() {
         this.run = false;
     }
 
@@ -30,9 +29,8 @@ public class StatusCounterMonitorThread implements StatusCounterMonitorRunnable
     }
 
     @Override
-    public void run()
-    {
-        while(run){
+    public void run() {
+        while(run) {
 
             /**
              *
@@ -50,13 +48,12 @@ public class StatusCounterMonitorThread implements StatusCounterMonitorRunnable
                     task.getDatumStatusCounter().getFail(),
                     task.getDatumStatusCounter().getEmitted());
 
-            try
-            {
+            try {
                 Thread.sleep(seconds*1000);
             }
-            catch (InterruptedException e)
-            { }
+            catch (InterruptedException e){
+                shutdown();
+            }
         }
     }
-
 }


[2/2] git commit: Applied PR#32 from 'robdouglas/STREAMS-103'

Posted by mf...@apache.org.
Applied PR#32 from  'robdouglas/STREAMS-103'


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/8d554374
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/8d554374
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/8d554374

Branch: refs/heads/master
Commit: 8d554374abc4300e04ef25ace0711dd3d55e87ed
Parents: c4b36af a94af4e
Author: mfranklin <mf...@apache.org>
Authored: Wed Jun 4 16:42:15 2014 -0400
Committer: mfranklin <mf...@apache.org>
Committed: Wed Jun 4 16:42:15 2014 -0400

----------------------------------------------------------------------
 .../local/tasks/StatusCounterMonitorThread.java  | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------