ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [46/50] incubator-ignite git commit: # ignite-648: nodes can find each others
Date Tue, 21 Apr 2015 11:01:49 GMT
# ignite-648: nodes can find each others


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

Branch: refs/heads/ignite-648
Commit: 54365d9176ef2f1d924d0d5b8730b3027215a19b
Parents: 005637c
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Mon Apr 20 20:31:58 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Mon Apr 20 20:31:58 2015 +0300

----------------------------------------------------------------------
 ...CachePartitionedMultiJvmFullApiSelfTest.java |  7 +++-
 .../cache/multijvm/IgniteNodeRunner.java        | 40 ++++++++++----------
 2 files changed, 26 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54365d91/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedMultiJvmFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedMultiJvmFullApiSelfTest.java
index b9cad74..8243053 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedMultiJvmFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedMultiJvmFullApiSelfTest.java
@@ -22,6 +22,7 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
 import org.apache.ignite.internal.processors.resource.*;
+import org.apache.ignite.spi.discovery.tcp.*;
 
 import java.util.*;
 
@@ -58,7 +59,11 @@ public class GridCachePartitionedMultiJvmFullApiSelfTest extends GridCachePartit
 
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
-        return super.getConfiguration(gridName);
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+        
+        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IgniteNodeRunner.ipFinder);
+        
+        return cfg;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54365d91/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/IgniteNodeRunner.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/IgniteNodeRunner.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/IgniteNodeRunner.java
index 7f40a00..9976cd7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/IgniteNodeRunner.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/IgniteNodeRunner.java
@@ -22,6 +22,8 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+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.multicast.*;
 import org.apache.ignite.testframework.junits.*;
@@ -34,11 +36,7 @@ import java.util.*;
  */
 public class IgniteNodeRunner {
     /** VM ip finder for TCP discovery. */
-    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryMulticastIpFinder(){{
-        setAddresses(Collections.singleton("127.0.0.1:47500..47509"));
-    }};
-
-//    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+    public static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryMulticastIpFinder();
 
     public static final char DELIM = ' ';
     
@@ -74,22 +72,22 @@ public class IgniteNodeRunner {
         
         IgniteConfiguration cfg = GridAbstractTest.getConfiguration0(gridName, new IgniteTestResources(),
             GridCachePartitionedMultiJvmFullApiSelfTest.class, isDebug());
-////      ---------------
-//        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-//
+//      ---------------
+        TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
 //        disco.setMaxMissedHeartbeats(Integer.MAX_VALUE);
-//
-//        disco.setIpFinder(ipFinder);
-//
-////        if (isDebug())
-////            disco.setAckTimeout(Integer.MAX_VALUE);
-//
-//        cfg.setDiscoverySpi(disco);
+
+        disco.setIpFinder(ipFinder);
+
+//        if (isDebug())
+//            disco.setAckTimeout(Integer.MAX_VALUE);
+
+        cfg.setDiscoverySpi(disco);
 //
 //        // TODO
 ////        cfg.setCacheConfiguration(cacheConfiguration());
 //
-//        cfg.setMarshaller(new OptimizedMarshaller(false));
+        cfg.setMarshaller(new OptimizedMarshaller(false));
 ////        ----------------
 ////        if (offHeapValues())
 ////            cfg.setSwapSpaceSpi(new GridTestSwapSpaceSpi());
@@ -97,10 +95,12 @@ public class IgniteNodeRunner {
 //        cfg.getTransactionConfiguration().setTxSerializableEnabled(true);
 //
 ////        ---------------
-////        Special.
-//        cfg.setLocalHost("127.0.0.1");
-//
-//        cfg.setNodeId(nodeId);
+//        Special.
+        cfg.setLocalHost("127.0.0.1");
+
+        cfg.setIncludeProperties();
+
+        cfg.setNodeId(nodeId);
 
         return cfg;
     }


Mime
View raw message