如何将gridgain与两个节点一起使用,其中每个节点都在自己不同的主机上



有人能帮我指导使用网格增益吗?网站上的文档不够,令人困惑。我们必须在局域网中运行数千个模拟。有人能帮我在局域网的多台主机上运行计算网格吗。我能够在同一主机上的多个节点上运行计算示例,但不能在多个主机上的几个节点上运行。请帮忙。

计算示例被配置为使用本地主机设置。您所要做的就是将examples/config/example-compute.xml文件中的IP地址更新为环境中的IP。您只需要提供计划首先启动的节点的至少1个IP地址,但您可以提供更多以备不时之需。

以下是您必须进行的配置更改:

<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>

最新更新