点燃没有驱逐

时间:2017-12-12 08:42:57

标签: ignite

在Ignite缓存中,我们无法存储超过1百万条记录。每当计数超过100万时,记录就会被逐出。

点燃配置

    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="dataStorageConfiguration">
          <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
            <property name="defaultDataRegionConfiguration">
              <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
              <property name="maxSize" value="#{30L * 1024 * 1024 * 1024}"/>
              <property name="name" value="500MB_Region"/>
              <property name="persistenceEnabled" value="true"/>
              </bean>
            </property>
          </bean>
        </property>
        <property name="clientMode" value="false"/>
        <property name="peerClassLoadingEnabled" value="true"/>
        <property name="networkTimeout" value="10000000"/>
        <property name="networkSendRetryCount" value="50"/>
        <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>cluster.node.host1:47500</value>
                                <value>cluster.node.host2:47500</value>
                                <value>cluster.node.host3:47500</value>
                                <value>cluster.node.host4:47500</value>
                                <value>cluster.node.host5:47500</value>
                            </list>
                        </property>
                    </bean>
                </property>
                <property name="networkTimeout" value="10000000"/>
                <property name="joinTimeout" value="10000000"/>
                <property name="maxAckTimeout" value="10000000"/>
                <property name="reconnectCount" value="50"/>
                <property name="socketTimeout" value="10000000"/>
            </bean>
        </property>
    </bean>
</beans>

缓存配置:

var cache: CacheConfiguration[Long, String] = new CacheConfiguration[Long, String]("NAME_CACHE")
cache.setCacheMode(CacheMode.PARTITIONED)    
cache.setBackups(0)
cache.setOnheapCacheEnabled(true)
cache.setDataRegionName("500MB_Region")

我们需要缓存来存储高达30 GB的数据,并在超过大小时移动到Ignite本机持久性。应该没有数据驱逐。

提前致谢!!!

0 个答案:

没有答案