ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsetrak...@apache.org
Subject [1/2] incubator-ignite git commit: # ignite-45 - fixing streaming.
Date Thu, 19 Mar 2015 04:41:10 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45-streaming [created] 888f0a3d1


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/888f0a3d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 5494000..181e15d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -2086,7 +2086,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
         cacheAsync.getAndReplace("key", 2);
 
-        assert cacheAsync.future().get() == 1;
+        assert cacheAsync.<Integer>future().get() == 1;
 
         assert cache.get("key") == 2;
 
@@ -2319,7 +2319,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
         cacheAsync.getAndRemove("key2");
 
-        assert cacheAsync.future().get() == 2;
+        assert cacheAsync.<Integer>future().get() == 2;
 
         assert cache.get("key2") == null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/888f0a3d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
index 7324754..706a4e3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
@@ -24,6 +24,7 @@ import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.stream.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.apache.ignite.transactions.*;
 
@@ -138,7 +139,7 @@ public class GridCachePartitionedHitsAndMissesSelfTest extends GridCommonAbstrac
             ldr.perNodeParallelOperations(1);
 
             // Count closure which increments a count on remote node.
-            ldr.updater(new IncrementingUpdater());
+            ldr.receiver(new IncrementingUpdater());
 
             for (int i = 0; i < CNT; i++)
                 ldr.addData(i % (CNT / 2), 1L);
@@ -148,7 +149,7 @@ public class GridCachePartitionedHitsAndMissesSelfTest extends GridCommonAbstrac
     /**
      * Increments value for key.
      */
-    private static class IncrementingUpdater implements IgniteDataStreamer.Updater<Integer,
Long> {
+    private static class IncrementingUpdater implements StreamReceiver<Integer, Long>
{
         /** */
         private static final EntryProcessor<Integer, Long, Void> INC = new EntryProcessor<Integer,
Long, Void>() {
             @Override public Void process(MutableEntry<Integer, Long> e, Object...
args) {
@@ -161,7 +162,7 @@ public class GridCachePartitionedHitsAndMissesSelfTest extends GridCommonAbstrac
         };
 
         /** {@inheritDoc} */
-        @Override public void update(IgniteCache<Integer, Long> cache, Collection<Map.Entry<Integer,
Long>> entries) {
+        @Override public void receive(IgniteCache<Integer, Long> cache, Collection<Map.Entry<Integer,
Long>> entries) {
             for (Map.Entry<Integer, Long> entry : entries)
                 cache.invoke(entry.getKey(), INC);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/888f0a3d/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
index 331b4a4..f87059d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
@@ -33,6 +33,7 @@ import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.stream.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
@@ -184,7 +185,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest
{
 
             final IgniteDataStreamer<Integer, Integer> ldr = g1.dataStreamer(null);
 
-            ldr.updater(DataStreamerCacheUpdaters.<Integer, Integer>batchedSorted());
+            ldr.receiver(DataStreamerCacheUpdaters.<Integer, Integer>batchedSorted());
 
             final AtomicInteger idxGen = new AtomicInteger();
             final int cnt = 400;
@@ -226,7 +227,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest
{
 
             final IgniteDataStreamer<Integer, Integer> rmvLdr = g2.dataStreamer(null);
 
-            rmvLdr.updater(DataStreamerCacheUpdaters.<Integer, Integer>batchedSorted());
+            rmvLdr.receiver(DataStreamerCacheUpdaters.<Integer, Integer>batchedSorted());
 
             final CountDownLatch l2 = new CountDownLatch(threads);
 
@@ -425,7 +426,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest
{
             // Get and configure loader.
             final IgniteDataStreamer<Integer, Integer> ldr = g1.dataStreamer(null);
 
-            ldr.updater(DataStreamerCacheUpdaters.<Integer, Integer>individual());
+            ldr.receiver(DataStreamerCacheUpdaters.<Integer, Integer>individual());
             ldr.perNodeBufferSize(2);
 
             // Define count of puts.
@@ -891,8 +892,9 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest
{
             try (IgniteDataStreamer<String, TestObject> ldr = ignite.dataStreamer(null))
{
                 ldr.allowOverwrite(true);
 
-                ldr.updater(new IgniteDataStreamer.Updater<String, TestObject>() {
-                    @Override public void update(IgniteCache<String, TestObject> cache,
+                ldr.receiver(new StreamReceiver<String, TestObject>() {
+                    @Override
+                    public void receive(IgniteCache<String, TestObject> cache,
                         Collection<Map.Entry<String, TestObject>> entries) {
                         for (Map.Entry<String, TestObject> e : entries) {
                             assertTrue(e.getKey() instanceof String);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/888f0a3d/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java
index bf5707e..642e98e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java
@@ -137,7 +137,7 @@ public class IgniteDataStreamerPerformanceTest extends GridCommonAbstractTest
{
             final IgniteDataStreamer<Integer, String> ldr = ignite.dataStreamer(null);
 
             ldr.perNodeBufferSize(8192);
-            ldr.updater(DataStreamerCacheUpdaters.<Integer, String>batchedSorted());
+            ldr.receiver(DataStreamerCacheUpdaters.<Integer, String>batchedSorted());
             ldr.autoFlushFrequency(0);
 
             final LongAdder cnt = new LongAdder();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/888f0a3d/modules/core/src/test/java/org/apache/ignite/loadtests/streamer/IndexUpdater.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/streamer/IndexUpdater.java
b/modules/core/src/test/java/org/apache/ignite/loadtests/streamer/IndexUpdater.java
index 95d76f5..e7884be 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/streamer/IndexUpdater.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/streamer/IndexUpdater.java
@@ -21,7 +21,7 @@ import org.apache.ignite.streamer.index.*;
 import org.jetbrains.annotations.*;
 
 /**
- * Streamer benchmark window index updater.
+ * Streamer benchmark window index receiver.
  */
 class IndexUpdater implements StreamerIndexUpdater<Integer, Integer, Long> {
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/888f0a3d/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExternalAffinityFunction.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExternalAffinityFunction.java
b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExternalAffinityFunction.java
index 543e779..dbb93b9 100644
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExternalAffinityFunction.java
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExternalAffinityFunction.java
@@ -151,7 +151,7 @@ public class GridExternalAffinityFunction implements CacheAffinityFunction
{
 
     /** {@inheritDoc} */
     @Override public int partition(Object key) {
-        return key instanceof Integer ? 0 == key ? 0 : 1 : 1;
+        return key instanceof Integer ? 0 == (Integer)key ? 0 : 1 : 1;
     }
 
     /** {@inheritDoc}


Mime
View raw message