How to use gridgain with two nodes where each node on its own different host

▼魔方 西西 提交于 2019-12-06 16:15:29

问题


Can anyone help me in guiding to use grid gain, The documentation on website is not enough and confusing. We have to run thousands of simulations in the LAN. can anyone help me in running compute grid on multiple hosts in a LAN. I am able to run compute example on multiple nodes on same host, but not on multiple nodes on multiple hosts. Kindly help.


回答1:


Compute examples are configured to work with local host settings. All you have to do is update IP addresses in examples/config/example-compute.xml file to the IP addresses in your environment. You only need to provide at least 1 IP address of the node you plan to start first, but you can provide more just in case.

Here are the configuration changes you have to make:

<bean id="grid.cfg" class="org.gridgain.grid.GridConfiguration">
    <!-- Remove this configuration property. -->
    <!--<property name="localHost" value="127.0.0.1"/>-->

    ...

    <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
    <property name="discoverySpi">
        <bean class="org.gridgain.grid.spi.discovery.tcp.GridTcpDiscoverySpi">
            <property name="ipFinder">
                <!-- Uncomment multicast IP finder to enable multicast-based discovery of initial nodes. -->
    <bean class="org.gridgain.grid.spi.discovery.tcp.ipfinder.multicast.GridTcpDiscoveryMulticastIpFinder">
                    <property name="addresses">
                        <list>
                            <!-- In distributed environment, replace with actual host IP address. -->
                            <value>127.0.0.1:47500..47509</value>
                        </list>
                    </property>
                </bean>
            </property>
        </bean>
    </property>
</bean>


来源:https://stackoverflow.com/questions/26800090/how-to-use-gridgain-with-two-nodes-where-each-node-on-its-own-different-host

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!