Ignite-94 review

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

Branch: refs/heads/ignite-99-2
Commit: 1964f4ab2685a077f6ffd732498df6c32448eb2a
Parents: d08db89
Author: Yakov Zhdanov <yzhda...@gridgain.com>
Authored: Mon Jan 26 13:03:39 2015 +0300
Committer: Yakov Zhdanov <yzhda...@gridgain.com>
Committed: Mon Jan 26 13:03:39 2015 +0300

----------------------------------------------------------------------
 .../examples/IgniteFsExamplesSelfTest.java      | 24 +++--------
 modules/core/src/test/config/ggfs-loopback.xml  | 41 +++----------------
 .../core/src/test/config/ggfs-no-endpoint.xml   | 42 +++-----------------
 modules/core/src/test/config/ggfs-shmem.xml     | 41 +++----------------
 4 files changed, 20 insertions(+), 128 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1964f4ab/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
----------------------------------------------------------------------
diff --git 
a/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
 
b/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
index 303de6d..b183469 100644
--- 
a/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
+++ 
b/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
@@ -27,37 +27,23 @@ import org.apache.ignite.testframework.junits.common.*;
  * IgniteFs examples self test.
  */
 public class IgniteFsExamplesSelfTest extends GridAbstractExamplesTest {
-    /** Grid name for light client example. */
-    private static final String CLIENT_LIGHT_GRID_NAME = "client-light-grid";
-
     /** GGFS config with shared memory IPC. */
     private static final String GGFS_SHMEM_CFG = 
"modules/core/src/test/config/ggfs-shmem.xml";
 
     /** GGFS config with loopback IPC. */
     private static final String GGFS_LOOPBACK_CFG = 
"modules/core/src/test/config/ggfs-loopback.xml";
 
-    /** GGFS no endpoint config. */
-    private static final String GGFS_NO_ENDPOINT_CFG = 
"modules/core/src/test/config/ggfs-no-endpoint.xml";
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
-        String cfgPath = gridName == null ? (U.isWindows() ? GGFS_LOOPBACK_CFG 
: GGFS_SHMEM_CFG) :
-            GGFS_NO_ENDPOINT_CFG;
-
-        IgniteConfiguration cfg = GridGainEx.loadConfiguration(cfgPath).get1();
-
-        cfg.setGridName(gridName);
-
-        return cfg;
-    }
-
     /**
      * @throws Exception If failed.
      */
     public void testGgfsApiExample() throws Exception {
-        startGrids(3);
+        String configPath = U.isWindows() ? GGFS_LOOPBACK_CFG : GGFS_SHMEM_CFG;
 
         try {
+            startGrid("test1", configPath);
+            startGrid("test2", configPath);
+            startGrid("test3", configPath);
+
             GgfsExample.main(EMPTY_ARGS);
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1964f4ab/modules/core/src/test/config/ggfs-loopback.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/ggfs-loopback.xml 
b/modules/core/src/test/config/ggfs-loopback.xml
index 560b5d6..3b6d1d7 100644
--- a/modules/core/src/test/config/ggfs-loopback.xml
+++ b/modules/core/src/test/config/ggfs-loopback.xml
@@ -144,53 +144,22 @@
         </property>
 
         <!--
-            Explicitly set to local host address.
-        -->
-        <property name="localHost" value="127.0.0.1"/>
-
-        <!--
             TCP discovery SPI (uses VM-shared IP-finder).
         -->
         <property name="discoverySpi">
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <!-- Override default IP-finder.-->
                 <property name="ipFinder">
-                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
-                        <property name="addresses">
-                            <list>
-                                <!--
-                                    List all IP/port configurations that 
potentially
-                                    can be started first in examples. We are 
assuming
-                                    grid of size 10 or less.
-                                -->
-                                <value>127.0.0.1:47500</value>
-                                <value>127.0.0.1:47501</value>
-                                <value>127.0.0.1:47502</value>
-                                <value>127.0.0.1:47503</value>
-                                <value>127.0.0.1:47504</value>
-                                <value>127.0.0.1:47505</value>
-                                <value>127.0.0.1:47506</value>
-                                <value>127.0.0.1:47507</value>
-                                <value>127.0.0.1:47508</value>
-                                <value>127.0.0.1:47509</value>
-                            </list>
-                        </property>
-                    </bean>
-                    <!--
-                    Uncomment this to provide IP finder using multicast for 
nodes discovery.
-                    In addition to addresses received via multicast this 
finder can work with pre-configured
-                    list of addresses.
-                    -->
-                    <!--
-                    <bean 
class="org.gridgain.grid.spi.discovery.tcp.ipfinder.multicast.GridTcpDiscoveryMulticastIpFinder">
+                    <!-- Uncomment static IP finder to enable static-based 
discovery of initial nodes. -->
+                    <!--<bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                         <property name="addresses">
                             <list>
-                                <value>host1:port1</value>
-                                <value>host2:port2</value>
+                                <!-- In distributed environment, replace with 
actual host IP address. -->
+                                <value>127.0.0.1:47500..47509</value>
                             </list>
                         </property>
                     </bean>
-                    -->
                 </property>
             </bean>
         </property>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1964f4ab/modules/core/src/test/config/ggfs-no-endpoint.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/ggfs-no-endpoint.xml 
b/modules/core/src/test/config/ggfs-no-endpoint.xml
index 935aa2c..c33ac9b 100644
--- a/modules/core/src/test/config/ggfs-no-endpoint.xml
+++ b/modules/core/src/test/config/ggfs-no-endpoint.xml
@@ -144,54 +144,22 @@
         </property>
 
         <!--
-            Explicitly set to local host address.
-        -->
-        <property name="localHost" value="127.0.0.1"/>
-
-        <!--
             TCP discovery SPI (uses VM-shared IP-finder).
         -->
         <property name="discoverySpi">
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <!-- Override default IP-finder.-->
                 <property name="ipFinder">
-                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+                    <!-- Uncomment static IP finder to enable static-based 
discovery of initial nodes. -->
+                    <!--<bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                         <property name="addresses">
                             <list>
-                                <!--
-                                    List all IP/port configurations that 
potentially
-                                    can be started first in examples. We are 
assuming
-                                    grid of size 10 or less.
-                                -->
-                                <value>127.0.0.1:47500</value>
-                                <value>127.0.0.1:47501</value>
-                                <value>127.0.0.1:47502</value>
-                                <value>127.0.0.1:47503</value>
-                                <value>127.0.0.1:47504</value>
-                                <value>127.0.0.1:47505</value>
-                                <value>127.0.0.1:47506</value>
-                                <value>127.0.0.1:47507</value>
-                                <value>127.0.0.1:47508</value>
-                                <value>127.0.0.1:47509</value>
+                                <!-- In distributed environment, replace with 
actual host IP address. -->
+                                <value>127.0.0.1:47500..47509</value>
                             </list>
                         </property>
                     </bean>
-
-                    <!--
-                    Uncomment this to provide IP finder using multicast for 
nodes discovery.
-                    In addition to addresses received via multicast this 
finder can work with pre-configured
-                    list of addresses.
-                    -->
-                    <!--
-                    <bean 
class="org.gridgain.grid.spi.discovery.tcp.ipfinder.multicast.GridTcpDiscoveryMulticastIpFinder">
-                        <property name="addresses">
-                            <list>
-                                <value>host1:port1</value>
-                                <value>host2:port2</value>
-                            </list>
-                        </property>
-                    </bean>
-                    -->
                 </property>
             </bean>
         </property>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1964f4ab/modules/core/src/test/config/ggfs-shmem.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/ggfs-shmem.xml 
b/modules/core/src/test/config/ggfs-shmem.xml
index 215b77a..22ab3b3 100644
--- a/modules/core/src/test/config/ggfs-shmem.xml
+++ b/modules/core/src/test/config/ggfs-shmem.xml
@@ -144,53 +144,22 @@
         </property>
 
         <!--
-            Explicitly set to local host address.
-        -->
-        <property name="localHost" value="127.0.0.1"/>
-
-        <!--
             TCP discovery SPI (uses VM-shared IP-finder).
         -->
         <property name="discoverySpi">
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <!-- Override default IP-finder.-->
                 <property name="ipFinder">
-                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
-                        <property name="addresses">
-                            <list>
-                                <!--
-                                    List all IP/port configurations that 
potentially
-                                    can be started first in examples. We are 
assuming
-                                    grid of size 10 or less.
-                                -->
-                                <value>127.0.0.1:47500</value>
-                                <value>127.0.0.1:47501</value>
-                                <value>127.0.0.1:47502</value>
-                                <value>127.0.0.1:47503</value>
-                                <value>127.0.0.1:47504</value>
-                                <value>127.0.0.1:47505</value>
-                                <value>127.0.0.1:47506</value>
-                                <value>127.0.0.1:47507</value>
-                                <value>127.0.0.1:47508</value>
-                                <value>127.0.0.1:47509</value>
-                            </list>
-                        </property>
-                    </bean>
-                    <!--
-                    Uncomment this to provide IP finder using multicast for 
nodes discovery.
-                    In addition to addresses received via multicast this 
finder can work with pre-configured
-                    list of addresses.
-                    -->
-                    <!--
-                    <bean 
class="org.gridgain.grid.spi.discovery.tcp.ipfinder.multicast.GridTcpDiscoveryMulticastIpFinder">
+                    <!-- Uncomment static IP finder to enable static-based 
discovery of initial nodes. -->
+                    <!--<bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                         <property name="addresses">
                             <list>
-                                <value>host1:port1</value>
-                                <value>host2:port2</value>
+                                <!-- In distributed environment, replace with 
actual host IP address. -->
+                                <value>127.0.0.1:47500..47509</value>
                             </list>
                         </property>
                     </bean>
-                    -->
                 </property>
             </bean>
         </property>

Reply via email to