You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2014/12/05 11:03:23 UTC
[22/32] incubator-ignite git commit: # Renaming
# Renaming
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/42704cb9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/42704cb9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/42704cb9
Branch: refs/heads/master
Commit: 42704cb99b79305ce0b05672881d3cdbe7da525b
Parents: f54e7ba
Author: sboikov <sb...@gridgain.com>
Authored: Fri Dec 5 12:50:09 2014 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Dec 5 12:50:09 2014 +0300
----------------------------------------------------------------------
examples/config/example-streamer.xml | 8 +-
.../org/gridgain/examples/ExamplesUtils.java | 2 +-
.../streaming/StreamingCheckInExample.java | 2 +-
.../StreamingPopularNumbersExample.java | 4 +-
.../streaming/StreamingPriceBarsExample.java | 2 +-
.../StreamingRunningAverageExample.java | 4 +-
.../java/org/apache/ignite/IgniteStreamer.java | 16 +-
.../configuration/IgniteConfiguration.java | 2 +-
.../ignite/streamer/StreamerConfiguration.java | 267 +++++++++++++++++++
.../apache/ignite/streamer/StreamerContext.java | 134 ++++++++++
.../ignite/streamer/StreamerEventRouter.java | 47 ++++
.../streamer/StreamerEventRouterAdapter.java | 52 ++++
.../streamer/StreamerFailureListener.java | 36 +++
.../apache/ignite/streamer/StreamerMBean.java | 161 +++++++++++
.../apache/ignite/streamer/StreamerMetrics.java | 201 ++++++++++++++
.../apache/ignite/streamer/StreamerStage.java | 53 ++++
.../ignite/streamer/StreamerStageMBean.java | 106 ++++++++
.../ignite/streamer/StreamerStageMetrics.java | 85 ++++++
.../apache/ignite/streamer/StreamerWindow.java | 198 ++++++++++++++
.../ignite/streamer/StreamerWindowMBean.java | 50 ++++
.../ignite/streamer/StreamerWindowMetrics.java | 36 +++
.../org/apache/ignite/streamer/package.html | 14 +
.../org/gridgain/grid/kernal/GridGainEx.java | 2 +-
.../streamer/GridStreamProcessor.java | 2 +-
.../streamer/GridStreamerAttributes.java | 2 +-
.../streamer/GridStreamerContextDelegate.java | 2 +-
.../streamer/GridStreamerContextImpl.java | 2 +-
.../GridStreamerStageExecutionFuture.java | 2 +-
.../processors/streamer/IgniteStreamerEx.java | 2 +-
.../processors/streamer/IgniteStreamerImpl.java | 2 +-
.../streamer/StreamerMBeanAdapter.java | 2 +-
.../streamer/StreamerMetricsAdapter.java | 2 +-
.../streamer/StreamerMetricsHolder.java | 2 +-
.../streamer/StreamerStageMBeanAdapter.java | 2 +-
.../streamer/StreamerStageMetricsAdapter.java | 2 +-
.../streamer/StreamerStageMetricsHolder.java | 2 +-
.../streamer/StreamerStageWrapper.java | 2 +-
.../streamer/StreamerWindowMetricsAdapter.java | 2 +-
.../streamer/StreamerWindowMetricsHolder.java | 2 +-
.../task/GridStreamerBroadcastTask.java | 2 +-
.../streamer/task/GridStreamerQueryTask.java | 2 +-
.../streamer/task/GridStreamerReduceTask.java | 2 +-
.../visor/node/VisorNodeDataCollectorJob.java | 2 +-
.../streamer/VisorStreamerConfiguration.java | 2 +-
.../visor/streamer/VisorStreamerMetrics.java | 4 +-
.../streamer/VisorStreamerStageMetrics.java | 4 +-
.../grid/streamer/StreamerConfiguration.java | 267 -------------------
.../gridgain/grid/streamer/StreamerContext.java | 134 ----------
.../grid/streamer/StreamerEventRouter.java | 47 ----
.../streamer/StreamerEventRouterAdapter.java | 52 ----
.../grid/streamer/StreamerFailureListener.java | 36 ---
.../gridgain/grid/streamer/StreamerMBean.java | 161 -----------
.../gridgain/grid/streamer/StreamerMetrics.java | 201 --------------
.../gridgain/grid/streamer/StreamerStage.java | 53 ----
.../grid/streamer/StreamerStageMBean.java | 106 --------
.../grid/streamer/StreamerStageMetrics.java | 85 ------
.../gridgain/grid/streamer/StreamerWindow.java | 198 --------------
.../grid/streamer/StreamerWindowMBean.java | 50 ----
.../grid/streamer/StreamerWindowMetrics.java | 36 ---
.../grid/streamer/index/StreamerIndex.java | 8 +-
.../streamer/index/StreamerIndexProvider.java | 2 +-
.../org/gridgain/grid/streamer/package.html | 14 -
.../router/StreamerAffinityEventRouter.java | 2 +-
.../StreamerCacheAffinityEventRouter.java | 2 +-
.../router/StreamerLocalEventRouter.java | 2 +-
.../router/StreamerRandomEventRouter.java | 2 +-
.../router/StreamerRoundRobinEventRouter.java | 2 +-
.../streamer/window/StreamerWindowAdapter.java | 2 +-
.../average/spring-streamer-average-base.xml | 2 +-
.../streamer/GridStreamerEvictionSelfTest.java | 2 +-
.../streamer/GridStreamerFailoverSelfTest.java | 2 +-
.../GridStreamerLifecycleAwareSelfTest.java | 4 +-
.../streamer/GridStreamerSelfTest.java | 2 +-
.../processors/streamer/GridTestStage.java | 2 +-
.../streamer/GridTestStreamerEventRouter.java | 2 +-
.../grid/kernal/processors/streamer/SC.java | 2 +-
.../marshaller/GridMarshallerAbstractTest.java | 2 +-
.../window/GridStreamerWindowSelfTest.java | 2 +-
.../loadtests/streamer/average/TestStage.java | 2 +-
79 files changed, 1509 insertions(+), 1509 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/examples/config/example-streamer.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-streamer.xml b/examples/config/example-streamer.xml
index f105770..ff81b19 100644
--- a/examples/config/example-streamer.xml
+++ b/examples/config/example-streamer.xml
@@ -59,7 +59,7 @@
<!--
Streamer for GridStreamingRunningAverageExample.
-->
- <bean class="org.gridgain.grid.streamer.StreamerConfiguration">
+ <bean class="org.apache.ignite.streamer.StreamerConfiguration">
<property name="name" value="running-average"/>
<property name="windows">
@@ -102,7 +102,7 @@
<!--
Streamer for GridStreamingPopularNumbersExample.
-->
- <bean class="org.gridgain.grid.streamer.StreamerConfiguration">
+ <bean class="org.apache.ignite.streamer.StreamerConfiguration">
<property name="name" value="popular-numbers"/>
<property name="windows">
@@ -157,7 +157,7 @@
<!--
Streamer for GridStreamingOpenHighLowCloseExample.
-->
- <bean class="org.gridgain.grid.streamer.StreamerConfiguration">
+ <bean class="org.apache.ignite.streamer.StreamerConfiguration">
<property name="name" value="priceBars"/>
<property name="windows">
@@ -205,7 +205,7 @@
<!--
Streamer for GridStreamingCheckInExample.
-->
- <bean class="org.gridgain.grid.streamer.StreamerConfiguration">
+ <bean class="org.apache.ignite.streamer.StreamerConfiguration">
<property name="name" value="check-in"/>
<property name="windows">
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/examples/src/main/java/org/gridgain/examples/ExamplesUtils.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/gridgain/examples/ExamplesUtils.java b/examples/src/main/java/org/gridgain/examples/ExamplesUtils.java
index be34697..c3ab59f 100644
--- a/examples/src/main/java/org/gridgain/examples/ExamplesUtils.java
+++ b/examples/src/main/java/org/gridgain/examples/ExamplesUtils.java
@@ -11,7 +11,7 @@ package org.gridgain.examples;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
-import org.gridgain.grid.streamer.*;
+import org.apache.ignite.streamer.*;
import java.net.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/examples/src/main/java/org/gridgain/examples/streaming/StreamingCheckInExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/gridgain/examples/streaming/StreamingCheckInExample.java b/examples/src/main/java/org/gridgain/examples/streaming/StreamingCheckInExample.java
index 34802c7..a6ad99e 100644
--- a/examples/src/main/java/org/gridgain/examples/streaming/StreamingCheckInExample.java
+++ b/examples/src/main/java/org/gridgain/examples/streaming/StreamingCheckInExample.java
@@ -11,9 +11,9 @@ package org.gridgain.examples.streaming;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.examples.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.streamer.index.*;
import org.jetbrains.annotations.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/examples/src/main/java/org/gridgain/examples/streaming/StreamingPopularNumbersExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/gridgain/examples/streaming/StreamingPopularNumbersExample.java b/examples/src/main/java/org/gridgain/examples/streaming/StreamingPopularNumbersExample.java
index 592afd8..55633eb 100644
--- a/examples/src/main/java/org/gridgain/examples/streaming/StreamingPopularNumbersExample.java
+++ b/examples/src/main/java/org/gridgain/examples/streaming/StreamingPopularNumbersExample.java
@@ -11,9 +11,9 @@ package org.gridgain.examples.streaming;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.examples.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.streamer.index.*;
import org.jetbrains.annotations.*;
@@ -193,7 +193,7 @@ public class StreamingPopularNumbersExample {
* Sample streamer stage to compute average.
*/
@SuppressWarnings("PublicInnerClass")
- public static class StreamerStage implements org.gridgain.grid.streamer.StreamerStage<Integer> {
+ public static class StreamerStage implements org.apache.ignite.streamer.StreamerStage<Integer> {
/** {@inheritDoc} */
@Override public String name() {
return "exampleStage";
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/examples/src/main/java/org/gridgain/examples/streaming/StreamingPriceBarsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/gridgain/examples/streaming/StreamingPriceBarsExample.java b/examples/src/main/java/org/gridgain/examples/streaming/StreamingPriceBarsExample.java
index 5b881ea..6e07c4b 100644
--- a/examples/src/main/java/org/gridgain/examples/streaming/StreamingPriceBarsExample.java
+++ b/examples/src/main/java/org/gridgain/examples/streaming/StreamingPriceBarsExample.java
@@ -11,9 +11,9 @@ package org.gridgain.examples.streaming;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.examples.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.streamer.router.*;
import org.jetbrains.annotations.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/examples/src/main/java/org/gridgain/examples/streaming/StreamingRunningAverageExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/gridgain/examples/streaming/StreamingRunningAverageExample.java b/examples/src/main/java/org/gridgain/examples/streaming/StreamingRunningAverageExample.java
index 6a62456..9a69330 100644
--- a/examples/src/main/java/org/gridgain/examples/streaming/StreamingRunningAverageExample.java
+++ b/examples/src/main/java/org/gridgain/examples/streaming/StreamingRunningAverageExample.java
@@ -11,8 +11,8 @@ package org.gridgain.examples.streaming;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.streamer.*;
import org.jetbrains.annotations.*;
import java.io.*;
@@ -141,7 +141,7 @@ public class StreamingRunningAverageExample {
/**
* Sample streamer stage to compute average.
*/
- public static class StreamerStage implements org.gridgain.grid.streamer.StreamerStage<Integer> {
+ public static class StreamerStage implements org.apache.ignite.streamer.StreamerStage<Integer> {
/** {@inheritDoc} */
@Override public String name() {
return "exampleStage";
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java b/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java
index 89ce78d..a37154e 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java
@@ -9,8 +9,8 @@
package org.apache.ignite;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.streamer.*;
import org.jetbrains.annotations.*;
import java.util.*;
@@ -18,10 +18,10 @@ import java.util.*;
/**
* Streamer interface. Streamer provides an easy way to process large (possibly infinite) stream of
* events. Event can be of any object type, different types of events can be submitted to streamer. Each event
- * is processed by one or more {@link org.gridgain.grid.streamer.StreamerStage}, a set of stages event passed through is called pipeline.
+ * is processed by one or more {@link org.apache.ignite.streamer.StreamerStage}, a set of stages event passed through is called pipeline.
* <p>
* For each submitted group of events streamer determines one or more execution nodes that will process this
- * group of events. Execution nodes are determined by {@link org.gridgain.grid.streamer.StreamerEventRouter}. Execution nodes run stages
+ * group of events. Execution nodes are determined by {@link org.apache.ignite.streamer.StreamerEventRouter}. Execution nodes run stages
* with received events. After stage execution streamer gets an optional set of events that should be processed
* further. The process is repeated until stage returns empty map. After stage returned empty map pipeline execution
* for given group of events is finished.
@@ -30,14 +30,14 @@ import java.util.*;
* any other group of events and will be passed to stage as is. Event processing order is not guaranteed, group that
* was submitted second can be processed earlier then first submitted group.
* <p>
- * If {@link org.gridgain.grid.streamer.StreamerConfiguration#isAtLeastOnce()} is set to {@code false}, then event execution is not tracked
+ * If {@link org.apache.ignite.streamer.StreamerConfiguration#isAtLeastOnce()} is set to {@code false}, then event execution is not tracked
* by streamer and any occurred failure will be reported to failure listener on node on which failure happened. If
* this configuration property is set to {@code true}, then streamer will cancel current pipeline execution in case
* of failure and will try to execute pipeline from the beginning. If failover cannot be succeeded or maximum number
* of failover attempts is exceeded, then listener will be notified on node which originated pipeline execution.
*
- * @see org.gridgain.grid.streamer.StreamerStage
- * @see org.gridgain.grid.streamer.StreamerEventRouter
+ * @see org.apache.ignite.streamer.StreamerStage
+ * @see org.apache.ignite.streamer.StreamerEventRouter
*/
public interface IgniteStreamer {
/**
@@ -102,7 +102,7 @@ public interface IgniteStreamer {
/**
* Adds streamer failure listener. Listener will be notified on node on which failure occurred in case if
- * {@link org.gridgain.grid.streamer.StreamerConfiguration#isAtLeastOnce()} is set to {@code false} and on node which originated
+ * {@link org.apache.ignite.streamer.StreamerConfiguration#isAtLeastOnce()} is set to {@code false} and on node which originated
* pipeline execution otherwise.
*
* @param lsnr Listener to add.
@@ -124,7 +124,7 @@ public interface IgniteStreamer {
public StreamerMetrics metrics();
/**
- * Resets all configured streamer windows by calling {@link org.gridgain.grid.streamer.StreamerWindow#reset()} on each and
+ * Resets all configured streamer windows by calling {@link org.apache.ignite.streamer.StreamerWindow#reset()} on each and
* clears local space.
* <p>
* This is local method, it will clear only local windows and local space. Note that windows and
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index 7f08e41..13b135c 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -18,6 +18,7 @@ import org.apache.ignite.managed.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.plugin.*;
import org.apache.ignite.portables.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.client.ssl.*;
import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
@@ -51,7 +52,6 @@ import org.gridgain.grid.spi.securesession.*;
import org.gridgain.grid.spi.securesession.noop.*;
import org.gridgain.grid.spi.swapspace.*;
import org.gridgain.grid.spi.swapspace.file.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.jetbrains.annotations.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerConfiguration.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerConfiguration.java
new file mode 100644
index 0000000..8b15afd
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerConfiguration.java
@@ -0,0 +1,267 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.gridgain.grid.util.typedef.internal.*;
+import org.gridgain.grid.util.tostring.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Streamer configuration.
+ */
+public class StreamerConfiguration {
+ /** By default maximum number of concurrent sessions is unlimited. */
+ public static final int DFLT_MAX_CONCURRENT_SESSIONS = -1;
+
+ /** Default value for maximum failover attempts. */
+ public static final int DFLT_MAX_FAILOVER_ATTEMPTS = 3;
+
+ /** Name. */
+ private String name;
+
+ /** Window. */
+ private Collection<StreamerWindow> win;
+
+ /** Router. */
+ private StreamerEventRouter router;
+
+ /** Stages. */
+ @GridToStringInclude
+ private Collection<StreamerStage> stages;
+
+ /** At least once flag. */
+ private boolean atLeastOnce;
+
+ /** Maximum number of failover attempts. */
+ private int maxFailoverAttempts = DFLT_MAX_FAILOVER_ATTEMPTS;
+
+ /** Maximum number of concurrent sessions to be processed. */
+ private int maxConcurrentSessions = DFLT_MAX_CONCURRENT_SESSIONS;
+
+ /** Streamer executor service. */
+ private ExecutorService execSvc;
+
+ /** Executor service shutdown flag. */
+ private boolean execSvcShutdown;
+
+ /**
+ *
+ */
+ public StreamerConfiguration() {
+ // No-op.
+ }
+
+ /**
+ * @param c Configuration to copy.
+ */
+ public StreamerConfiguration(StreamerConfiguration c) {
+ atLeastOnce = c.isAtLeastOnce();
+ execSvc = c.getExecutorService();
+ execSvcShutdown = c.isExecutorServiceShutdown();
+ maxConcurrentSessions = c.getMaximumConcurrentSessions();
+ maxFailoverAttempts = c.getMaximumFailoverAttempts();
+ name = c.getName();
+ router = c.getRouter();
+ stages = c.getStages();
+ win = c.getWindows();
+ }
+
+ /**
+ * Gets streamer name. Must be unique within grid.
+ *
+ * @return Streamer name, if {@code null} then default streamer is returned.
+ */
+ @Nullable public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name of the streamer.
+ *
+ * @param name Name.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Gets streamer event router.
+ *
+ * @return Event router, if {@code null} then events will be executed locally.
+ */
+ @SuppressWarnings("unchecked")
+ @Nullable public StreamerEventRouter getRouter() {
+ return router;
+ }
+
+ /**
+ * Sets router for streamer.
+ *
+ * @param router Router.
+ */
+ public void setRouter(StreamerEventRouter router) {
+ this.router = router;
+ }
+
+ /**
+ * Gets collection of streamer event windows. At least one window should be configured. Each window
+ * must have unique name.
+ *
+ * @return Streamer windows.
+ */
+ public Collection<StreamerWindow> getWindows() {
+ return win;
+ }
+
+ /**
+ * Sets collection of streamer windows.
+ *
+ * @param win Window.
+ */
+ public void setWindows(Collection<StreamerWindow> win) {
+ this.win = win;
+ }
+
+ /**
+ * Gets collection of streamer stages. Streamer must have at least one stage to execute. Each stage
+ * must have unique name.
+ *
+ * @return Collection of streamer stages.
+ */
+ public Collection<StreamerStage> getStages() {
+ return stages;
+ }
+
+ /**
+ * Sets stages.
+ *
+ * @param stages Stages.
+ */
+ public void setStages(Collection<StreamerStage> stages) {
+ this.stages = stages;
+ }
+
+ /**
+ * Gets flag indicating whether streamer should track event execution sessions and failover event execution
+ * if any failure detected or any node on which execution happened has left the grid before successful response
+ * is received.
+ * <p>
+ * Setting this flag to {@code true} will guarantee that all pipeline stages will be executed at least once for
+ * each group of event submitted to streamer (or failure listener will be notified if failover cannot succeed).
+ * However, it does not guarantee that each stage will be executed at most once.
+ *
+ * @return {@code True} if event should be processed at least once,
+ * or {@code false} if failures can be safely ignored.
+ */
+ public boolean isAtLeastOnce() {
+ return atLeastOnce;
+ }
+
+ /**
+ * @param atLeastOnce {@code True} to guarantee that event will be processed at least once.
+ */
+ public void setAtLeastOnce(boolean atLeastOnce) {
+ this.atLeastOnce = atLeastOnce;
+ }
+
+ /**
+ * Gets maximum number of failover attempts to try when pipeline execution has failed. This parameter
+ * is ignored if {@link #isAtLeastOnce()} is set to {@code false}.
+ * <p>
+ * If not set, default value is
+ *
+ * @return Maximum number of failover attempts to try.
+ */
+ public int getMaximumFailoverAttempts() {
+ return maxFailoverAttempts;
+ }
+
+ /**
+ * Sets maximum number of failover attempts.
+
+ * @param maxFailoverAttempts Maximum number of failover attempts.
+ * @see #getMaximumFailoverAttempts()
+ */
+ public void setMaximumFailoverAttempts(int maxFailoverAttempts) {
+ this.maxFailoverAttempts = maxFailoverAttempts;
+ }
+
+ /**
+ * Gets maximum number of concurrent events to be processed by streamer. This property is taken into
+ * account when {@link #isAtLeastOnce()} is set to {@code true}. If not positive, number of sessions
+ * will not be limited by any value.
+ *
+ * @return Maximum number of concurrent events to be processed. If number of concurrent events is greater
+ * then this value, caller will be blocked until enough responses are received.
+ */
+ public int getMaximumConcurrentSessions() {
+ return maxConcurrentSessions;
+ }
+
+ /**
+ * Sets maximum number of concurrent sessions.
+ *
+ * @param maxConcurrentSessions Maximum number of concurrent sessions.
+ * @see #getMaximumConcurrentSessions()
+ */
+ public void setMaximumConcurrentSessions(int maxConcurrentSessions) {
+ this.maxConcurrentSessions = maxConcurrentSessions;
+ }
+
+ /**
+ * Gets streamer executor service. Defines a thread pool in which streamer stages will be executed.
+ * <p>
+ * If not specified, thread pool executor with max pool size equal to number of cores will be created.
+ *
+ * @return Streamer executor service.
+ */
+ public ExecutorService getExecutorService() {
+ return execSvc;
+ }
+
+ /**
+ * Sets streamer executor service.
+ *
+ * @param execSvc Executor service to use.
+ * @see #getExecutorService()
+ */
+ public void setExecutorService(ExecutorService execSvc) {
+ this.execSvc = execSvc;
+ }
+
+ /**
+ * Flag indicating whether streamer executor service should be shut down on GridGain stop. If this flag
+ * is {@code true}, executor service will be shut down regardless of whether executor was specified externally
+ * or it was created by GridGain.
+ *
+ * @return {@code True} if executor service should be shut down on GridGain stop.
+ */
+ public boolean isExecutorServiceShutdown() {
+ return execSvcShutdown;
+ }
+
+ /**
+ * Sets flag indicating whether executor service should be shut down on GridGain stop.
+ *
+ * @param execSvcShutdown {@code True} if executor service should be shut down on GridGain stop.
+ * @see #isExecutorServiceShutdown()
+ */
+ public void setExecutorServiceShutdown(boolean execSvcShutdown) {
+ this.execSvcShutdown = execSvcShutdown;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(StreamerConfiguration.class, this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java
new file mode 100644
index 0000000..5f2b284
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java
@@ -0,0 +1,134 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.lang.*;
+import org.gridgain.grid.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Streamer context. Provides access to streamer local store, configured windows and various methods
+ * to run streamer queries.
+ */
+public interface StreamerContext {
+ /**
+ * Gets instance of dynamic grid projection including all nodes on which this streamer is running.
+ *
+ * @return Projection with all nodes on which streamer is configured.
+ */
+ public ClusterGroup projection();
+
+ /**
+ * Gets streamer local space. Note that all updates to this space will be local.
+ *
+ * @return Streamer local space.
+ */
+ public <K, V> ConcurrentMap<K, V> localSpace();
+
+ /**
+ * Gets default event window, i.e. window that is on the first place in streamer configuration.
+ *
+ * @return Default window.
+ */
+ public <E> StreamerWindow<E> window();
+
+ /**
+ * Gets streamer event window by window name, if no window with such
+ * name was configured {@link IllegalArgumentException} will be thrown.
+ *
+ * @param winName Window name.
+ * @return Window instance.
+ */
+ public <E> StreamerWindow<E> window(String winName);
+
+ /**
+ * For context passed to {@link StreamerStage#run(StreamerContext, Collection)} this method will
+ * return next stage name in execution pipeline. For context obtained from streamer object, this method will
+ * return first stage name.
+ *
+ * @return Next stage name depending on invocation context.
+ */
+ public String nextStageName();
+
+ /**
+ * Queries all streamer nodes deployed within grid. Given closure will be executed on each node on which streamer
+ * is configured. Streamer context local for that node will be passed to closure during execution. All results
+ * returned by closure will be added to result collection.
+ *
+ * @param clo Function to be executed on individual nodes.
+ * @return Result received from all streamers.
+ * @throws GridException If query execution failed.
+ */
+ public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo) throws GridException;
+
+ /**
+ * Queries streamer nodes deployed within grid. Given closure will be executed on those of passed nodes
+ * on which streamer is configured. Streamer context local for that node will be passed to closure during
+ * execution. All results returned by closure will be added to result collection.
+ *
+ * @param clo Function to be executed on individual nodes.
+ * @param nodes Optional list of nodes to execute query on, if empty, then all nodes on
+ * which this streamer is running will be queried.
+ * @return Result received from all streamers.
+ * @throws GridException If query execution failed.
+ */
+ public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo, Collection<ClusterNode> nodes)
+ throws GridException;
+
+ /**
+ * Queries all streamer nodes deployed within grid. Given closure will be executed on each streamer node
+ * in the grid. No result is collected.
+ *
+ * @param clo Function to be executed on individual nodes.
+ * @throws GridException If closure execution failed.
+ */
+ public void broadcast(IgniteInClosure<StreamerContext> clo) throws GridException;
+
+ /**
+ * Queries streamer nodes deployed within grid. Given closure will be executed on those of passed nodes on
+ * which streamer is configured. No result is collected.
+ *
+ * @param clo Function to be executed on individual nodes.
+ * @param nodes Optional list of nodes to execute query on, if empty, then all nodes on
+ * which this streamer is running will be queried.
+ * @throws GridException If closure execution failed.
+ */
+ public void broadcast(IgniteInClosure<StreamerContext> clo, Collection<ClusterNode> nodes) throws GridException;
+
+ /**
+ * Queries all streamer nodes deployed within grid. Given closure will be executed on each streamer node in
+ * the grid. Streamer context local for that node will be passed to closure during execution. Results returned
+ * by closure will be passed to given reducer.
+ *
+ * @param clo Function to be executed on individual nodes.
+ * @param rdc Reducer to reduce results received from remote nodes.
+ * @return Reducer result.
+ * @throws GridException If query execution failed.
+ */
+ public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc) throws GridException;
+
+ /**
+ * Queries streamer nodes deployed within grid. Given closure will be executed on those of passed nodes on which
+ * streamer is configured. Streamer context local for that node will be passed to closure during execution.
+ * Results returned by closure will be passed to given reducer.
+ *
+ * @param clo Function to be executed on individual nodes.
+ * @param rdc Reducer to reduce results received from remote nodes.
+ * @param nodes Optional list of nodes to execute query on, if empty, then all nodes on
+ * which this streamer is running will be queried.
+ * @return Reducer result.
+ * @throws GridException If query execution failed.
+ */
+ public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc,
+ Collection<ClusterNode> nodes) throws GridException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerEventRouter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerEventRouter.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerEventRouter.java
new file mode 100644
index 0000000..dbe515a
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerEventRouter.java
@@ -0,0 +1,47 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.apache.ignite.cluster.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Streamer event router. Pluggable component that determines event execution flow across the grid.
+ * Each time a group of events is submitted to streamer or returned to streamer by a stage, event
+ * router will be used to select execution node for next stage.
+ */
+public interface StreamerEventRouter {
+ /**
+ * Selects a node for given event that should be processed by a stage with given name.
+ *
+ * @param ctx Streamer context.
+ * @param stageName Stage name.
+ * @param evt Event to route.
+ * @return Node to route to. If this method returns {@code null} then the whole pipeline execution
+ * will be terminated. All running and ongoing stages for pipeline execution will be
+ * cancelled.
+ */
+ @Nullable public <T> ClusterNode route(StreamerContext ctx, String stageName, T evt);
+
+ /**
+ * Selects a node for given events that should be processed by a stage with given name.
+ *
+ * @param ctx Streamer context.
+ * @param stageName Stage name to route events.
+ * @param evts Events.
+ * @return Events to node mapping. If this method returns {@code null} then the whole pipeline execution
+ * will be terminated. All running and ongoing stages for pipeline execution will be
+ * cancelled.
+ */
+ @Nullable public <T> Map<ClusterNode, Collection<T>> route(StreamerContext ctx, String stageName,
+ Collection<T> evts);
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerEventRouterAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerEventRouterAdapter.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerEventRouterAdapter.java
new file mode 100644
index 0000000..fecb264
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerEventRouterAdapter.java
@@ -0,0 +1,52 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.apache.ignite.cluster.*;
+import org.gridgain.grid.util.*;
+import org.gridgain.grid.util.typedef.*;
+
+import java.util.*;
+
+/**
+ * Streamer adapter for event routers.
+ */
+public abstract class StreamerEventRouterAdapter implements StreamerEventRouter {
+ /** {@inheritDoc} */
+ @Override public <T> Map<ClusterNode, Collection<T>> route(StreamerContext ctx, String stageName,
+ Collection<T> evts) {
+ if (evts.size() == 1) {
+ ClusterNode route = route(ctx, stageName, F.first(evts));
+
+ if (route == null)
+ return null;
+
+ return Collections.singletonMap(route, evts);
+ }
+
+ Map<ClusterNode, Collection<T>> map = new GridLeanMap<>();
+
+ for (T e : evts) {
+ ClusterNode n = route(ctx, stageName, e);
+
+ if (n == null)
+ return null;
+
+ Collection<T> mapped = map.get(n);
+
+ if (mapped == null)
+ map.put(n, mapped = new ArrayList<>());
+
+ mapped.add(e);
+ }
+
+ return map;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerFailureListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerFailureListener.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerFailureListener.java
new file mode 100644
index 0000000..4ff9ba7
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerFailureListener.java
@@ -0,0 +1,36 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import java.util.*;
+
+/**
+ * Streamer failure listener. Asynchronous callback passed to user in case of any failure determined by streamer.
+ *
+ * @see org.apache.ignite.IgniteStreamer#addStreamerFailureListener(StreamerFailureListener)
+ *
+ */
+public interface StreamerFailureListener {
+ /**
+ * Callback invoked when unrecoverable failure is detected by streamer.
+ * <p>
+ * If {@link StreamerConfiguration#isAtLeastOnce()} is set to {@code false}, then this callback
+ * will be invoked on node on which failure occurred. If {@link StreamerConfiguration#isAtLeastOnce()}
+ * is set to {@code true}, then this callback will be invoked on node on which
+ * {@link org.apache.ignite.IgniteStreamer#addEvents(Collection)} or its variant was called. Callback will be called if maximum
+ * number of failover attempts exceeded or failover cannot be performed (for example, if router
+ * returned {@code null}).
+ *
+ * @param stageName Failed stage name.
+ * @param evts Failed set of events.
+ * @param err Error cause.
+ */
+ public void onFailure(String stageName, Collection<Object> evts, Throwable err);
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerMBean.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerMBean.java
new file mode 100644
index 0000000..71ca900
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerMBean.java
@@ -0,0 +1,161 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.apache.ignite.mbean.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Streamer MBean interface.
+ */
+@IgniteMBeanDescription("MBean that provides access to streamer description and metrics.")
+public interface StreamerMBean {
+ /**
+ * Gets streamer name.
+ *
+ * @return Streamer name.
+ */
+ @IgniteMBeanDescription("Streamer name.")
+ @Nullable public String getName();
+
+ /**
+ * Gets {@code atLeastOnce} configuration flag.
+ *
+ * @return {@code True} if {@code atLeastOnce} is configured.
+ */
+ @IgniteMBeanDescription("True if atLeastOnce is configured.")
+ public boolean isAtLeastOnce();
+
+ /**
+ * Gets size of stage futures map. This map is maintained only when {@code atLeastOnce} configuration
+ * flag is set to true.
+ *
+ * @return Stage future map size.
+ */
+ @IgniteMBeanDescription("Stage future map size.")
+ public int getStageFutureMapSize();
+
+ /**
+ * Gets size of batch futures map.
+ *
+ * @return Batch future map size.
+ */
+ @IgniteMBeanDescription("Batch future map size.")
+ public int getBatchFutureMapSize();
+
+ /**
+ * Gets number of stages currently being executed in streamer pool.
+ *
+ * @return Number of stages. Cannot be more than pool thread count.
+ */
+ @IgniteMBeanDescription("Number of stages currently being executed in streamer pool.")
+ public int getStageActiveExecutionCount();
+
+ /**
+ * Gets number of event batches currently waiting to be executed.
+ *
+ * @return Number of event batches waiting to be processed.
+ */
+ @IgniteMBeanDescription("Number of event batches currently waiting to be executed.")
+ public int getStageWaitingExecutionCount();
+
+ /**
+ * Gets total number of stages executed since last reset.
+ *
+ * @return Total number of stages executed since last reset.
+ */
+ @IgniteMBeanDescription("Total number of stages executed since last reset.")
+ public long getStageTotalExecutionCount();
+
+ /**
+ * Gets pipeline maximum execution time, i.e. time between execution start and time when last stage in pipeline
+ * returned empty map. If pipeline execution was split to different nodes, metrics for each split will be
+ * recorded independently.
+ *
+ * @return Pipeline maximum execution time.
+ */
+ @IgniteMBeanDescription("Pipeline maximum execution time.")
+ public long getPipelineMaximumExecutionTime();
+
+ /**
+ * Gets pipeline minimum execution time, i.e. time between execution start and time when last stage in pipeline
+ * returned empty map. If pipeline execution was split to different nodes, metrics for each split will be
+ * recorded independently.
+ *
+ * @return Pipeline minimum execution time.
+ */
+ @IgniteMBeanDescription("Pipeline minimum execution time.")
+ public long getPipelineMinimumExecutionTime();
+
+ /**
+ * Gets pipeline average execution time, i.e. time between execution start and time when last stage in pipeline
+ * returned empty map. If pipeline execution was split, metrics for each split will be recorded independently.
+ *
+ * @return Pipeline average execution time.
+ */
+ @IgniteMBeanDescription("Pipeline average execution time.")
+ public long getPipelineAverageExecutionTime();
+
+ /**
+ * Gets maximum number of unique nodes participated in pipeline execution. If pipeline execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Maximum number of unique nodes in pipeline execution.
+ */
+ @IgniteMBeanDescription("Maximum number of unique nodes participated in pipeline execution.")
+ public int getPipelineMaximumExecutionNodes();
+
+ /**
+ * Gets minimum number of unique nodes participated in pipeline execution. If pipeline execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Minimum number of unique nodes in pipeline execution.
+ */
+ @IgniteMBeanDescription("Minimum number of unique nodes participated in pipeline execution.")
+ public int getPipelineMinimumExecutionNodes();
+
+ /**
+ * Gets average number of unique nodes participated in pipeline execution. If pipeline execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Average number of unique nodes in pipeline execution.
+ */
+ @IgniteMBeanDescription("Average number of unique nodes participated in pipeline execution.")
+ public int getPipelineAverageExecutionNodes();
+
+ /**
+ * Gets number of current active sessions. Since event execution sessions are tracked only when
+ * {@code atLeastOnce} configuration property is set to {@code true}, this metric will be collected
+ * only in this case. When {@code atLeastOnce} is set to {@code false}, this metric will always be zero.
+ *
+ * @return Number of current active sessions.
+ */
+ @IgniteMBeanDescription("Number of current active sessions.")
+ public int getCurrentActiveSessions();
+
+ /**
+ * Gets maximum number of active sessions since last reset. Since event execution sessions are tracked only when
+ * {@code atLeastOnce} configuration property is set to {@code true}, this metric will be collected
+ * only in this case. When {@code atLeastOnce} is set to {@code false}, this metric will always be zero.
+ *
+ * @return Maximum active sessions since last reset.
+ */
+ @IgniteMBeanDescription("Maximum number of active sessions since last reset.")
+ public int getMaximumActiveSessions();
+
+ /**
+ * Gets number of failures since last reset. If {@code atLeastOnce} flag is set to steamer configuration,
+ * then only root node failures will be counted. Otherwise each node will count failures independently.
+ *
+ * @return Failures count.
+ */
+ @IgniteMBeanDescription("Number of failures since last reset.")
+ public int getFailuresCount();
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerMetrics.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerMetrics.java
new file mode 100644
index 0000000..300a2fb
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerMetrics.java
@@ -0,0 +1,201 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import java.util.*;
+
+/**
+ * Streamer metrics.
+ */
+public interface StreamerMetrics {
+ /**
+ * Gets number of stages currently being executed in streamer pool.
+ *
+ * @return Number of stages. Cannot be more than pool thread count.
+ */
+ public int stageActiveExecutionCount();
+
+ /**
+ * Gets number of event batches currently waiting to be executed.
+ *
+ * @return Number of event batches waiting to be processed.
+ */
+ public int stageWaitingExecutionCount();
+
+ /**
+ * Gets total number of stages executed since last reset.
+ *
+ * @return Total number of stages executed since last reset.
+ */
+ public long stageTotalExecutionCount();
+
+ /**
+ * Gets pipeline maximum execution time, i.e. time between execution start and time when last stage in pipeline
+ * returned empty map. If pipeline execution was split to different nodes, metrics for each split will be
+ * recorded independently.
+ *
+ * @return Pipeline maximum execution time.
+ */
+ public long pipelineMaximumExecutionTime();
+
+ /**
+ * Gets pipeline minimum execution time, i.e. time between execution start and time when last stage in pipeline
+ * returned empty map. If pipeline execution was split to different nodes, metrics for each split will be
+ * recorded independently.
+ *
+ * @return Pipeline minimum execution time.
+ */
+ public long pipelineMinimumExecutionTime();
+
+ /**
+ * Gets pipeline average execution time, i.e. time between execution start and time when last stage in pipeline
+ * returned empty map. If pipeline execution was split, metrics for each split will be recorded independently.
+ *
+ * @return Pipeline average execution time.
+ */
+ public long pipelineAverageExecutionTime();
+
+ /**
+ * Gets maximum number of unique nodes participated in pipeline execution. If pipeline execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Maximum number of unique nodes in pipeline execution.
+ */
+ public int pipelineMaximumExecutionNodes();
+
+ /**
+ * Gets minimum number of unique nodes participated in pipeline execution. If pipeline execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Minimum number of unique nodes in pipeline execution.
+ */
+ public int pipelineMinimumExecutionNodes();
+
+ /**
+ * Gets average number of unique nodes participated in pipeline execution. If pipeline execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Average number of unique nodes in pipeline execution.
+ */
+ public int pipelineAverageExecutionNodes();
+
+ /**
+ * Gets query maximum execution time. If query execution was split to different nodes, metrics for each split
+ * will be recorded independently.
+ *
+ * @return Query maximum execution time.
+ */
+ public long queryMaximumExecutionTime();
+
+ /**
+ * Gets query minimum execution time. If query execution was split to different nodes, metrics for each split
+ * will be recorded independently.
+ *
+ * @return Query minimum execution time.
+ */
+ public long queryMinimumExecutionTime();
+
+ /**
+ * Gets query average execution time. If query execution was split to different nodes, metrics for each split
+ * will be recorded independently.
+ *
+ * @return Query average execution time.
+ */
+ public long queryAverageExecutionTime();
+
+ /**
+ * Gets maximum number of unique nodes participated in query execution. If query execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Maximum number of unique nodes in query execution.
+ */
+ public int queryMaximumExecutionNodes();
+
+ /**
+ * Gets minimum number of unique nodes participated in query execution. If query execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Minimum number of unique nodes in query execution.
+ */
+ public int queryMinimumExecutionNodes();
+
+ /**
+ * Gets average number of unique nodes participated in query execution. If query execution was split,
+ * metrics for each split will be recorded independently.
+ *
+ * @return Average number of unique nodes in query execution.
+ */
+ public int queryAverageExecutionNodes();
+
+ /**
+ * Gets number of current active sessions. Since event execution sessions are tracked only when
+ * {@code atLeastOnce} configuration property is set to {@code true}, this metric will be collected
+ * only in this case. When {@code atLeastOnce} is set to {@code false}, this metric will always be zero.
+ *
+ * @return Number of current active sessions.
+ */
+ public int currentActiveSessions();
+
+ /**
+ * Gets maximum number of active sessions since last reset. Since event execution sessions are tracked only when
+ * {@code atLeastOnce} configuration property is set to {@code true}, this metric will be collected
+ * only in this case. When {@code atLeastOnce} is set to {@code false}, this metric will always be zero.
+ *
+ * @return Maximum active sessions since last reset.
+ */
+ public int maximumActiveSessions();
+
+ /**
+ * Gets number of failures. If {@code atLeastOnce} flag is set to steamer configuration, then only root node
+ * failures will be counted. Otherwise each node will count failures independently.
+ *
+ * @return Failures count.
+ */
+ public int failuresCount();
+
+ /**
+ * Gets maximum number of threads in executor service.
+ *
+ * @return Maximum number of threads in executor service.
+ */
+ public int executorServiceCapacity();
+
+ /**
+ * Gets current stage metrics, if stage with given name is not configured
+ * then {@link IllegalArgumentException} will be thrown.
+ *
+ * @param stageName Stage name.
+ * @return Stage metrics.
+ */
+ public StreamerStageMetrics stageMetrics(String stageName);
+
+ /**
+ * Gets metrics for all stages. Stage metrics order is the same as stage order in configuration.
+ *
+ * @return Stage metrics collection.
+ */
+ public Collection<StreamerStageMetrics> stageMetrics();
+
+ /**
+ * Gets current window metrics, if window with given name is not configured
+ * then {@link IllegalArgumentException} will be thrown.
+ *
+ * @param winName Window name.
+ * @return Window metrics.
+ */
+ public StreamerWindowMetrics windowMetrics(String winName);
+
+ /**
+ * Gets metrics for all windows.
+ *
+ * @return Collection of window metrics.
+ */
+ public Collection<StreamerWindowMetrics> windowMetrics();
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java
new file mode 100644
index 0000000..b028dfa
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java
@@ -0,0 +1,53 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.gridgain.grid.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Streamer stage is a component that determines event processing flow. User logic related to
+ * any particular event processing is implemented by streamer stage. A stage takes events as
+ * an input and returns groups of events mapped to different stages as an output. Events for
+ * every returned stage will be passed to {@link StreamerEventRouter} which will determine
+ * on which node the stage should be executed.
+ * <p>
+ * Generally, event stage execution graph if fully controlled by return values of
+ * this method, while node execution graph is controlled by
+ * {@link StreamerEventRouter#route(StreamerContext, String, Object)} method.
+ */
+public interface StreamerStage<IN> {
+ /**
+ * Gets streamer stage name.
+ *
+ * @return Name of the stage.
+ */
+ public String name();
+
+ /**
+ * Stage execution routine. After the passed in events are processed, stage can emit
+ * another set of events to be processed. The returned events can be mapped to different
+ * stages. Events for every returned stage will be passed to {@link StreamerEventRouter}
+ * which will determine on which node the stage should be executed.
+ * <p>
+ * Generally, event stage execution graph if fully controlled by return values of
+ * this method, while node execution graph is controlled by
+ * {@link StreamerEventRouter#route(StreamerContext, String, Object)} method.
+ *
+ * @param ctx Streamer context.
+ * @param evts Input events.
+ * @return Map of stage name to collection of events.
+ * @throws GridException If failed.
+ */
+ @Nullable public Map<String, Collection<?>> run(StreamerContext ctx, Collection<IN> evts)
+ throws GridException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStageMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStageMBean.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStageMBean.java
new file mode 100644
index 0000000..5d1bc99
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStageMBean.java
@@ -0,0 +1,106 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.apache.ignite.mbean.*;
+
+/**
+ * Streamer stage MBean.
+ */
+@IgniteMBeanDescription("MBean that provides access to streamer stage description and metrics.")
+public interface StreamerStageMBean {
+ /**
+ * Gets stage name.
+ *
+ * @return Stage name.
+ */
+ @IgniteMBeanDescription("Stage name.")
+ public String getName();
+
+ /**
+ * Gets stage class name.
+ *
+ * @return Stage class name.
+ */
+ @IgniteMBeanDescription("Stage class name.")
+ public String getStageClassName();
+
+ /**
+ * Gets stage minimum execution time.
+ *
+ * @return Stage minimum execution time.
+ */
+ @IgniteMBeanDescription("Stage minimum execution time.")
+ public long getMinimumExecutionTime();
+
+ /**
+ * Gets stage maximum execution time.
+ *
+ * @return Stage maximum execution time.
+ */
+ @IgniteMBeanDescription("Stage maximum execution time.")
+ public long getMaximumExecutionTime();
+
+ /**
+ * Gets stage average execution time.
+ *
+ * @return Stage average execution time.
+ */
+ @IgniteMBeanDescription("Stage average execution time.")
+ public long getAverageExecutionTime();
+
+ /**
+ * Gets stage minimum waiting time.
+ *
+ * @return Stage minimum waiting time.
+ */
+ @IgniteMBeanDescription("Stage minimum waiting time.")
+ public long getMinimumWaitingTime();
+
+ /**
+ * Gets stage maximum waiting time.
+ *
+ * @return Stage maximum waiting time.
+ */
+ @IgniteMBeanDescription("Stage maximum waiting time.")
+ public long getMaximumWaitingTime();
+
+ /**
+ * Stage average waiting time.
+ *
+ * @return Stage average waiting time.
+ */
+ @IgniteMBeanDescription("Stage average waiting time.")
+ public long getAverageWaitingTime();
+
+ /**
+ * Gets total stage execution count since last reset.
+ *
+ * @return Number of times this stage was executed.
+ */
+ @IgniteMBeanDescription("Number of times this stage was executed.")
+ public long getTotalExecutionCount();
+
+ /**
+ * Gets stage failure count.
+ *
+ * @return Stage failure count.
+ */
+ @IgniteMBeanDescription("Stage failure count.")
+ public int getFailuresCount();
+
+ /**
+ * Gets flag indicating if stage is being currently executed by at least one thread on current node.
+ *
+ * @return {@code True} if stage is executing now.
+ */
+ @IgniteMBeanDescription("Whether stage is currently being executed.")
+ public boolean isExecuting();
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStageMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStageMetrics.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStageMetrics.java
new file mode 100644
index 0000000..c623399
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStageMetrics.java
@@ -0,0 +1,85 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+/**
+ * Streamer stage metrics.
+ */
+public interface StreamerStageMetrics {
+ /**
+ * Gets stage name.
+ *
+ * @return Stage name.
+ */
+ public String name();
+
+ /**
+ * Gets stage minimum execution time.
+ *
+ * @return Stage minimum execution time.
+ */
+ public long minimumExecutionTime();
+
+ /**
+ * Gets stage maximum execution time.
+ *
+ * @return Stage maximum execution time.
+ */
+ public long maximumExecutionTime();
+
+ /**
+ * Gets stage average execution time.
+ *
+ * @return Stage average execution time.
+ */
+ public long averageExecutionTime();
+
+ /**
+ * Gets stage minimum waiting time.
+ *
+ * @return Stage minimum waiting time.
+ */
+ public long minimumWaitingTime();
+
+ /**
+ * Gets stage maximum waiting time.
+ *
+ * @return Stage maximum waiting time.
+ */
+ public long maximumWaitingTime();
+
+ /**
+ * Stage average waiting time.
+ *
+ * @return Stage average waiting time.
+ */
+ public long averageWaitingTime();
+
+ /**
+ * Gets total stage execution count since last reset.
+ *
+ * @return Number of times this stage was executed.
+ */
+ public long totalExecutionCount();
+
+ /**
+ * Gets stage failure count.
+ *
+ * @return Stage failure count.
+ */
+ public int failuresCount();
+
+ /**
+ * Gets flag indicating if stage is being currently executed by at least one thread on current node.
+ *
+ * @return {@code True} if stage is executing now.
+ */
+ public boolean executing();
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java
new file mode 100644
index 0000000..69f5344
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java
@@ -0,0 +1,198 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.gridgain.grid.*;
+import org.gridgain.grid.streamer.index.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Streamer rolling window. Rolling windows allow new event to come in, as well as automatically
+ * evicting obsolete events on the other side. Windows allow to query into specific time-frame
+ * or specific sample size of the events. With windows, you can answer questions like "What
+ * are my top 10 best selling products over last 24 hours?", or "Who are my top 10 users out of
+ * last 1,000,000 users who logged in?"
+ * <p>
+ * GridGain comes with following rolling windows implementations out of the box:
+ * <ul>
+ * <li>{@link org.gridgain.grid.streamer.window.StreamerUnboundedWindow}</li>
+ * <li>{@link org.gridgain.grid.streamer.window.StreamerBoundedSizeWindow}</li>
+ * <li>{@link org.gridgain.grid.streamer.window.StreamerBoundedSizeBatchWindow}</li>
+ * <li>{@link org.gridgain.grid.streamer.window.StreamerBoundedSizeSortedWindow}</li>
+ * <li>{@link org.gridgain.grid.streamer.window.StreamerBoundedTimeWindow}</li>
+ * <li>{@link org.gridgain.grid.streamer.window.StreamerBoundedTimeBatchWindow}</li>
+ * </ul>
+ * <p>
+ * Streamer window is configured via {@link StreamerConfiguration#getWindows()} method.
+ */
+public interface StreamerWindow<E> extends Iterable<E> {
+ /**
+ * Gets window name.
+ *
+ * @return Window name.
+ */
+ public String name();
+
+ /**
+ * Gets default index, if default index is not configured then
+ * {@link IllegalArgumentException} will be thrown.
+ *
+ * @param <K> Type of the index key.
+ * @param <V> Type of the index value.
+ * @return Index with default name.
+ */
+ public <K, V> StreamerIndex<E, K, V> index();
+
+ /**
+ * Gets index by name, if not index with such name was configured then
+ * {@link IllegalArgumentException} will be thrown.
+ *
+ * @param name Name of the index, if {@code null} then analogous to {@link #index()}.
+ * @param <K> Type of the index key.
+ * @param <V> Type of the index value.
+ * @return Index with a given name.
+ */
+ public <K, V> StreamerIndex<E, K, V> index(@Nullable String name);
+
+ /**
+ * Gets all indexes configured for this window.
+ *
+ * @return All indexes configured for this window or empty collection, if no
+ * indexes were configured.
+ */
+ public Collection<StreamerIndex<E, ?, ?>> indexes();
+
+ /**
+ * Resets window. Usually will clear all events from window.
+ */
+ public void reset();
+
+ /**
+ * Gets number of events currently stored in window.
+ *
+ * @return Current size of the window.
+ */
+ public int size();
+
+ /**
+ * Gets number of entries available for eviction.
+ *
+ * @return Number of entries available for eviction.
+ */
+ public int evictionQueueSize();
+
+ /**
+ * Adds single event to window.
+ *
+ * @param evt Event to add.
+ * @return {@code True} if event was added.
+ * @throws GridException If index update failed.
+ */
+ public boolean enqueue(E evt) throws GridException;
+
+ /**
+ * Adds events to window.
+ *
+ * @param evts Events to add.
+ * @return {@code}
+ * @throws GridException If index update failed.
+ */
+ public boolean enqueue(E... evts) throws GridException;
+
+ /**
+ * Adds all events to window.
+ *
+ * @param evts Collection of events to add.
+ * @return {@code True} if all events were added, {@code false} if at
+ * least 1 event was skipped.
+ * @throws GridException If index update failed.
+ */
+ public boolean enqueueAll(Collection<E> evts) throws GridException;
+
+ /**
+ * Dequeues last element from windows. Will return {@code null} if window is empty.
+ *
+ * @return Dequeued element.
+ * @throws GridException If index update failed.
+ */
+ @Nullable public E dequeue() throws GridException;
+
+ /**
+ * Dequeues up to {@code cnt} elements from window. If current window size is less than {@code cnt},
+ * will dequeue all elements from window.
+ *
+ * @param cnt Count to dequeue.
+ * @return Collection of dequeued elements.
+ * @throws GridException If index update failed.
+ */
+ public Collection<E> dequeue(int cnt) throws GridException;
+
+ /**
+ * Dequeues all elements from window.
+ *
+ * @return Collection of dequeued elements.
+ * @throws GridException If index update failed.
+ */
+ public Collection<E> dequeueAll() throws GridException;
+
+ /**
+ * If window supports eviction, this method will return next evicted element.
+ *
+ * @return Polls and returns next evicted event or {@code null} if eviction queue is empty or if
+ * window does not support eviction.
+ * @throws GridException If index update failed.
+ */
+ @Nullable public E pollEvicted() throws GridException;
+
+ /**
+ * If window supports eviction, this method will return up to {@code cnt} evicted elements.
+ *
+ * @param cnt Number of elements to evict.
+ * @return Collection of evicted elements.
+ * @throws GridException If index update failed.
+ */
+ public Collection<E> pollEvicted(int cnt) throws GridException;
+
+ /**
+ * If window supports batch eviction, this method will poll next evicted batch from window.
+ * If windows does not support batch eviction but supports eviction, will return collection of single
+ * last evicted element.
+ * If window does not support eviction, will return empty collection.
+ *
+ * @return Next evicted batch.
+ * @throws GridException If index update failed.
+ */
+ public Collection<E> pollEvictedBatch() throws GridException;
+
+ /**
+ * If window supports eviction, this method will return all available evicted elements.
+ *
+ * @return Collection of evicted elements.
+ * @throws GridException If index update failed.
+ */
+ public Collection<E> pollEvictedAll() throws GridException;
+
+ /**
+ * Clears all evicted entries.
+ *
+ * @throws GridException If index update failed.
+ */
+ public void clearEvicted() throws GridException;
+
+ /**
+ * Create window snapshot. Evicted entries are not included.
+ *
+ * @param includeIvicted Whether to include evicted entries or not.
+ * @return Window snapshot.
+ */
+ public Collection<E> snapshot(boolean includeIvicted);
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindowMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindowMBean.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindowMBean.java
new file mode 100644
index 0000000..89441fc
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindowMBean.java
@@ -0,0 +1,50 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+import org.apache.ignite.mbean.*;
+
+/**
+ * Streamer window MBean.
+ */
+@IgniteMBeanDescription("MBean that provides access to streamer window description.")
+public interface StreamerWindowMBean {
+ /**
+ * Gets window name.
+ *
+ * @return Window name.
+ */
+ @IgniteMBeanDescription("Window name.")
+ public String getName();
+
+ /**
+ * Gets window class name.
+ *
+ * @return Window class name.
+ */
+ @IgniteMBeanDescription("Window class name.")
+ public String getClassName();
+
+ /**
+ * Gets current window size.
+ *
+ * @return Current window size.
+ */
+ @IgniteMBeanDescription("Window size.")
+ public int getSize();
+
+ /**
+ * Gets estimate for window eviction queue size.
+ *
+ * @return Eviction queue size estimate.
+ */
+ @IgniteMBeanDescription("Eviction queue size estimate.")
+ public int getEvictionQueueSize();
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindowMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindowMetrics.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindowMetrics.java
new file mode 100644
index 0000000..d2443d4
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindowMetrics.java
@@ -0,0 +1,36 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.streamer;
+
+/**
+ * Streamer window metrics.
+ */
+public interface StreamerWindowMetrics {
+ /**
+ * Gets window name.
+ *
+ * @return Window name.
+ */
+ public String name();
+
+ /**
+ * Gets window size.
+ *
+ * @return Window size.
+ */
+ public int size();
+
+ /**
+ * Gets eviction queue size.
+ *
+ * @return Eviction queue size.
+ */
+ public int evictionQueueSize();
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/apache/ignite/streamer/package.html
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/package.html b/modules/core/src/main/java/org/apache/ignite/streamer/package.html
new file mode 100644
index 0000000..055bbb9
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/streamer/package.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+ @html.file.header
+ _________ _____ __________________ _____
+ __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+-->
+<html>
+<body>
+ Contains main <b>Streaming APIs.</b>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
index 0851977..b00126a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
@@ -20,6 +20,7 @@ import org.apache.ignite.marshaller.*;
import org.apache.ignite.marshaller.jdk.*;
import org.apache.ignite.marshaller.optimized.*;
import org.apache.ignite.mbean.*;
+import org.apache.ignite.streamer.*;
import org.apache.ignite.thread.*;
import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
@@ -54,7 +55,6 @@ import org.gridgain.grid.spi.securesession.noop.*;
import org.gridgain.grid.spi.swapspace.*;
import org.gridgain.grid.spi.swapspace.file.*;
import org.gridgain.grid.spi.swapspace.noop.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java
index 6a2de15..b28378d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java
@@ -11,11 +11,11 @@ package org.gridgain.grid.kernal.processors.streamer;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.*;
import org.gridgain.grid.kernal.processors.license.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.streamer.index.*;
import org.gridgain.grid.streamer.window.*;
import org.gridgain.grid.util.typedef.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerAttributes.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerAttributes.java
index 18b0701..e00f1f4 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerAttributes.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerAttributes.java
@@ -10,7 +10,7 @@
package org.gridgain.grid.kernal.processors.streamer;
import org.apache.ignite.lang.*;
-import org.gridgain.grid.streamer.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.jetbrains.annotations.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java
index 064e3db..b3edf48 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java
@@ -11,8 +11,8 @@ package org.gridgain.grid.kernal.processors.streamer;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.streamer.*;
import org.jetbrains.annotations.*;
import java.util.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java
index e9c64ca..30061ec 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java
@@ -11,10 +11,10 @@ package org.gridgain.grid.kernal.processors.streamer;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.streamer.task.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.jdk8.backport.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java
index 37798f7..482a02e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java
@@ -12,8 +12,8 @@ package org.gridgain.grid.kernal.processors.streamer;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java
index fc51a0e..983449d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java
@@ -10,9 +10,9 @@
package org.gridgain.grid.kernal.processors.streamer;
import org.apache.ignite.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.streamer.*;
import org.jetbrains.annotations.*;
import java.util.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java
index 9884977..3586b07 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java
@@ -13,13 +13,13 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.streamer.*;
import org.apache.ignite.thread.*;
import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.managers.communication.*;
import org.gridgain.grid.kernal.managers.deployment.*;
import org.gridgain.grid.kernal.managers.eventstorage.*;
-import org.gridgain.grid.streamer.*;
import org.gridgain.grid.streamer.router.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.direct.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMBeanAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMBeanAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMBeanAdapter.java
index a0476b4..07d6495 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMBeanAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMBeanAdapter.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.kernal.processors.streamer;
-import org.gridgain.grid.streamer.*;
+import org.apache.ignite.streamer.*;
import org.jetbrains.annotations.*;
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsAdapter.java
index 445bf9a..2e4cba7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsAdapter.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.kernal.processors.streamer;
-import org.gridgain.grid.streamer.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.gridgain.grid.util.tostring.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsHolder.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsHolder.java
index 3ad6b2b..1bdfbd8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsHolder.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerMetricsHolder.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.kernal.processors.streamer;
-import org.gridgain.grid.streamer.*;
+import org.apache.ignite.streamer.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.jdk8.backport.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/42704cb9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageMBeanAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageMBeanAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageMBeanAdapter.java
index a6101f9..9e8bfaf 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageMBeanAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageMBeanAdapter.java
@@ -9,7 +9,7 @@
package org.gridgain.grid.kernal.processors.streamer;
-import org.gridgain.grid.streamer.*;
+import org.apache.ignite.streamer.*;
/**
* Streamer stage MBean adapter.