streams-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sblack...@apache.org
Subject [01/43] incubator-streams git commit: STREAMS-210 | Began planning MXBean monitoring strategy
Date Thu, 13 Nov 2014 05:09:28 GMT
Repository: incubator-streams
Updated Branches:
  refs/heads/master 0ffc40e25 -> 853d01c57


STREAMS-210 | Began planning MXBean monitoring strategy


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

Branch: refs/heads/master
Commit: ebfe73d31a301966f247f8370bccb2eef5b3f088
Parents: 9aebd0b
Author: Robert Douglas <rdouglas@w2ogroup.com>
Authored: Thu Nov 6 15:41:19 2014 -0600
Committer: Robert Douglas <rdouglas@w2ogroup.com>
Committed: Thu Nov 6 15:41:19 2014 -0600

----------------------------------------------------------------------
 .../streams/local/builders/LocalStreamBuilder.java    | 12 ++++++++----
 .../streams/local/tasks/BroadcastMonitorThread.java   | 14 ++++++++++++++
 2 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ebfe73d3/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/builders/LocalStreamBuilder.java
----------------------------------------------------------------------
diff --git a/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/builders/LocalStreamBuilder.java
b/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/builders/LocalStreamBuilder.java
index 57f3aa4..10194ce 100644
--- a/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/builders/LocalStreamBuilder.java
+++ b/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/builders/LocalStreamBuilder.java
@@ -22,10 +22,7 @@ import org.apache.log4j.spi.LoggerFactory;
 import org.apache.streams.core.*;
 import org.apache.streams.local.executors.ShutdownStreamOnUnhandleThrowableThreadPoolExecutor;
 import org.apache.streams.local.queues.ThroughputQueue;
-import org.apache.streams.local.tasks.LocalStreamProcessMonitorThread;
-import org.apache.streams.local.tasks.StatusCounterMonitorThread;
-import org.apache.streams.local.tasks.StreamsProviderTask;
-import org.apache.streams.local.tasks.StreamsTask;
+import org.apache.streams.local.tasks.*;
 import org.joda.time.DateTime;
 import org.slf4j.Logger;
 
@@ -58,6 +55,7 @@ public class LocalStreamBuilder implements StreamBuilder {
     private LocalStreamProcessMonitorThread monitorThread;
     private Map<String, List<StreamsTask>> tasks;
     private Thread shutdownHook;
+    private Thread broadcastMonitor;
     private int maxQueueCapacity;
 
     /**
@@ -105,6 +103,9 @@ public class LocalStreamBuilder implements StreamBuilder {
                 self.stopInternal(true);
             }
         };
+
+        this.broadcastMonitor = new BroadcastMonitorThread();
+
         this.futures = new HashMap<>();
     }
 
@@ -184,6 +185,9 @@ public class LocalStreamBuilder implements StreamBuilder {
         Map<String, StreamsProviderTask> provTasks = new HashMap<String, StreamsProviderTask>();
         tasks = new HashMap<String, List<StreamsTask>>();
         boolean forcedShutDown = false;
+
+        broadcastMonitor.start();
+
         try {
             monitorThread = new LocalStreamProcessMonitorThread(executor, 10);
             this.monitor.submit(monitorThread);

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ebfe73d3/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/BroadcastMonitorThread.java
----------------------------------------------------------------------
diff --git a/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/BroadcastMonitorThread.java
b/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/BroadcastMonitorThread.java
new file mode 100644
index 0000000..3b4fc7b
--- /dev/null
+++ b/streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/BroadcastMonitorThread.java
@@ -0,0 +1,14 @@
+package org.apache.streams.local.tasks;
+
+import org.slf4j.Logger;
+
+public class BroadcastMonitorThread extends Thread {
+    private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(BroadcastMonitorThread.class);
+
+    public BroadcastMonitorThread() { }
+
+    @Override
+    public void run() {
+        LOGGER.debug("OMFG BROADCAST THREAD");
+    }
+}


Mime
View raw message