ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsetrak...@apache.org
Subject incubator-ignite git commit: # ignite-45 - fixing streaming.
Date Thu, 19 Mar 2015 06:57:40 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 10b971b81 -> 3d6534f73


# ignite-45 - fixing streaming.


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

Branch: refs/heads/ignite-45
Commit: 3d6534f735935a9bed6d83d98f4ea592a8056fea
Parents: 10b971b
Author: Dmitiry Setrakyan <dsetrakyan@gridgain.com>
Authored: Thu Mar 19 02:56:44 2015 -0400
Committer: Dmitiry Setrakyan <dsetrakyan@gridgain.com>
Committed: Thu Mar 19 02:57:37 2015 -0400

----------------------------------------------------------------------
 .../java8/streaming/numbers/QueryPopularNumbers.java     |  1 +
 .../java8/streaming/numbers/StreamRandomNumbers.java     | 11 ++---------
 2 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3d6534f7/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/QueryPopularNumbers.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/QueryPopularNumbers.java
b/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/QueryPopularNumbers.java
index c531bf1..92f6425 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/QueryPopularNumbers.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/QueryPopularNumbers.java
@@ -44,6 +44,7 @@ public class QueryPopularNumbers {
                 if (!ExamplesUtils.hasServerNodes(ignite))
                     return;
 
+                // Query top 10 popular numbers every 5 seconds.
                 while (true) {
                     // Select top 10 words.
                     SqlFieldsQuery top10 = new SqlFieldsQuery(

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3d6534f7/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/StreamRandomNumbers.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/StreamRandomNumbers.java
b/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/StreamRandomNumbers.java
index a7dcef7..c635c43 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/StreamRandomNumbers.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/java8/streaming/numbers/StreamRandomNumbers.java
@@ -24,7 +24,7 @@ import org.apache.ignite.stream.*;
 import java.util.*;
 
 /**
- * Real time popular numbers counter.
+ * Stream random numbers into the streaming cache.
  * <p>
  * Remote nodes should always be started with special configuration file which
  * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
@@ -39,17 +39,11 @@ public class StreamRandomNumbers {
     /** Range within which to generate numbers. */
     private static final int RANGE = 1000;
 
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
     public static void main(String[] args) throws Exception {
         // Mark this cluster member as client.
         Ignition.setClientMode(true);
 
-        try (Ignite ignite = Ignition.start()) {
+        try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
             // Create new cache or get existing one.
             // The cache is configured with sliding window holding 1 second of the streaming
data.
             try (IgniteCache<Integer, Long> stmCache = ignite.createCache(CacheConfig.configure()))
{
@@ -69,7 +63,6 @@ public class StreamRandomNumbers {
                         return null;
                     }));
 
-
                     // Stream random numbers into the streamer cache.
                     while (true)
                         stmr.addData(RAND.nextInt(RANGE), 1L);


Mime
View raw message