我在单节点/单实例安装上使用Ignite作为Hibernate L2缓存提供程序,因此我不希望任何群集或网络通信继续进行。我可以在XML中的IgniteConfiguration中设置一个属性来禁用网络/集群吗?
是否可以仅将Apache Ignite作为单个实例运行?
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<!--
Specify the name of the caching grid (should correspond to the
one in Hibernate configuration).
-->
<property name="gridName" value="hibernate-grid"/>
<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="dataRegionName" value="object"/>
<property name="name" value="object"/>
<property name="cacheMode" value="LOCAL"/>
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Enabling on-heap caching for this cache. -->
<property name="onheapCacheEnabled" value="true"/>
<property name="evictionPolicy">
<!-- LRU eviction policy. -->
<bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
<property name="maxSize" value="5000"/>
</bean>
</property>
</bean>
</list>
</property>
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="dataRegionConfigurations">
<list>
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="object"/>
<property name="initialSize" value="#{1L * 1024 * 1024 * 1024}"/>
<property name="maxSize" value="#{4L * 1024 * 1024 * 1024}"/>
</bean>
</list>
</property>
</bean>
</property>
</bean>
我一直这样:
严重:无法请求节点地址。 java.net.SocketException:IP_MULTICAST_IF的错误参数:未绑定到任何接口的地址 at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method) at java.net.AbstractPlainDatagramSocketImpl.setOption(AbstractPlainDatagramSocketImpl.java:309) 在java.net.MulticastSocket.setInterface(MulticastSocket.java:466) at org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:565) at org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.access $ 700(TcpDiscoveryMulticastIpFinder.java:80) at org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder $ AddressReceiver.body(TcpDiscoveryMulticastIpFinder.java:780) 在org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
答案 0 :(得分:2)
为什么不将org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
与127.0.0.1
地址一起使用?
<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</value>
</list>
</property>
</bean>
</property>
</bean>
</property>