Search code examples
javaignite

Ignite ClusterNode.consistendId() returns value different from one that is defined in configuration


ClusterNode.consistentId() returns UUID instead of node name defined in configuration xml

Discovery spi configuration is this:

<property name="discoverySpi">
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="localAddress" value="myNode"/>
        <property name="localPort" value="48800"/>
        <property name="localPortRange" value="1"/>
        <property name="ipFinder">
            <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                <property name="addresses">
                    <list>
                        <value>myNode</value>
                    </list>
                </property>
            </bean>
        </property>
    </bean>
</property>

I also have dataRegionConfigurations of dataStorageConfiguration defined in the xml, and when i remove this property, ClusterNode.consistentId() returns 127.0.0.1:48800 instead of UUID


Solution

  • I think this is by design. When node is persistent, default consistentId is calculated differently than on non-persistent node.

    Why don't you specify consistentId explicitly if you want it be set to any specific value?