ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Setting Up Ignite Grids on the Same Netmask
Date Thu, 03 Dec 2015 21:32:34 GMT
Hi Kevin,

Grid name is actually just a local name of your Ignite instance, it can be
used to get this instance via Ignition.ignite(..) method. It's useful when
you have several nodes in one JVM (such deployment is usually used only in
testing environment).

To create two isolated clusters, you have to properly configure discovery IP
finder. E.g., in case of multicast you can provide different multicast
groups. Nodes with different groups will never discover each other:

<property name="discoverySpi">
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="ipFinder">
            <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                <property name="multicastGroup" value="228.1.2.4"/>
            </bean>
        </property>
    </bean>
</property>

If you're using VM IP finder with explicit list of IPs, you can provide
different range of ports. E.g., for the first cluster:

<property name="discoverySpi">
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="ipFinder">
            <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                <property name="addresses">
                    <list>
                        <value>127.0.0.1:47500..47509</value>
                    </list>
                </property>
            </bean>
        </property>
    </bean>
</property>

And for the second one:

<property name="discoverySpi">
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="ipFinder">
            <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                <property name="addresses">
                    <list>
                        <value>127.0.0.1:47600..47609</value>
                    </list>
                </property>
            </bean>
        </property>
    </bean>
</property>

Hope this helps.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Setting-Up-Ignite-Grids-on-the-Same-Netmask-tp2133p2135.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message