我已完成以下服务器配置以进行点火。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
">
<description>Main Spring file for ignite configuration.</description>
<bean id="cacheIgniteBean" class="org.apache.ignite.IgniteSpringBean">
<property name="configuration">
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<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="item_cache_Region"/>
<property name="initialSize" value="${ignite.config.item.cache.initialSize}"/>
<property name="maxSize" value="${ignite.config.item.cache.maxSize}"/>
<property name="pageEvictionMode" value="RANDOM_LRU"/>
</bean>
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="location_cache_Region"/>
<property name="initialSize" value="${ignite.config.location.cache.initialSize}"/>
<property name="maxSize" value="${ignite.config.location.cache.maxSize}"/>
<property name="pageEvictionMode" value="RANDOM_LRU"/>
<property name="persistenceEnabled"
value="${ignite.config.cache.location.native.persistence.enabled}"/>
</bean>
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="order_cache_Region"/>
<property name="initialSize" value="${ignite.config.order.cache.initialSize}"/>
<property name="maxSize" value="${ignite.config.order.cache.maxSize}"/>
<property name="pageEvictionMode" value="RANDOM_LRU"/>
</bean>
</list>
</property>
</bean>
</property>
<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="item"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="backups" value="0"/>
<property name="cacheStoreFactory">
<bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
<constructor-arg value="com.tgt.gom.cacheserver.store.ItemCacheStore"/>
</bean>
</property>
<property name="readThrough" value="${ignite.config.cache.item.readThrough}"/>
<property name="writeThrough" value="${ignite.config.cache.item.writeThrough}"/>
<property name="writeBehindEnabled" value="${ignite.config.cache.item.writeBehindEnabled}"/>
<property name="writeBehindFlushSize"
value="${ignite.config.cache.item.writeBehindFlushSize}"/>
<property name="writeBehindFlushFrequency"
value="${ignite.config.cache.item.writeBehindFlushFrequency}"/>
<property name="writeBehindFlushThreadCount"
value="${ignite.config.cache.item.writeBehindFlushThreadCount}"/>
<property name="writeBehindBatchSize"
value="${ignite.config.cache.item.writeBehindBatchSize}"/>
<property name="dataRegionName" value="item_cache_Region"/>
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="location"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="backups" value="0"/>
<property name="dataRegionName" value="location_cache_Region"/>
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="order"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="backups" value="0"/>
<property name="eagerTtl" value="true"/>
<property name="dataRegionName" value="order_cache_Region"/>
</bean>
</list>
</property>
<property name="failureDetectionTimeout" value="60000"/>
<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..47505</value>
<value>10.60.158.197:47500..47505</value>
<value>10.60.158.196:47500..47505</value>
<value>10.60.158.20:47500..47505</value>
<value>10.60.158.2:47500..47505</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</beans>
以及客户端配置以下。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
">
<description>Main Spring file for ignite configuration.</description>
<bean id="cacheIgniteBean" class="org.apache.ignite.IgniteSpringBean">
<property name="configuration">
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="clientMode" value="true"/>
<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="order_cache_Region"/>
<property name="initialSize" value="${ignite.config.order.cache.initialSize}"/>
<property name="maxSize" value="${ignite.config.order.cache.maxSize}"/>
<property name="pageEvictionMode" value="RANDOM_LRU"/>
</bean>
</list>
</property>
</bean>
</property>
<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="order"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="backups" value="0"/>
<property name="eagerTtl" value="true"/>
<property name="dataRegionName" value="order_cache_Region"/>
</bean>
</list>
</property>
<property name="clientFailureDetectionTimeout" value="50000"/>
<property name="failureDetectionTimeout" value="50000"/>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="networkTimeout" value="20000"/>
<property name="forceServerMode" value="${ignite.client.force.server.mode}"/>
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>10.60.158.197:47500..47505</value>
<value>10.60.158.196:47500..47505</value>
<value>10.60.158.20:47500..47505</value>
<value>10.60.158.2:47500..47505</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</beans>
我有4个服务器节点和2个客户端节点。我在配置中遗漏了任何可能导致性能问题的内容。我在客户端和服务器盒上的某些时候出现了警告。
服务器节点警告 - :
e41fd3-846c-4086-a7bf-486616594368]","logger_name":"org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi","thread_name":"grid-nio-worker-tcp-comm-2-#27","level":"INFO","level_value":20000}
{"@timestamp":"2018-02-08T23:36:22.177-05:00","@version":1,"message":"Accepted incoming communication connection [locAddr=/192.168.208.5:47100, rmtAddr=/192.168.208.10:58392]","logger_name":"org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi","thread_name":"grid-nio-worker-tcp-comm-3-#28","level":"INFO","level_value":20000}
{"@timestamp":"2018-02-08T23:36:22.177-05:00","@version":1,"message":"Received incoming connection when already connected to this node, rejecting [locNode=434ef9a9-eb32-4096-8f80-843486a89137, rmtNode=65e41fd3-846c-4086-a7bf-486616594368]","logger_name":"org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi","thread_name":"grid-nio-worker-tcp-comm-3-#28","level":"INFO","level_value":20000}
提示节点警告 - :
{"@timestamp":"2018-02-08T23:27:30.904-05:00","@version":1,"message":"Found long running cache future [startTime=23:25:45.075, curTime=23:27:30.898, fut=GridPartitionedSingleGetFuture [topVer=AffinityTopologyVersion [topVer=10, minorTopVer=0], key=UserKeyCacheObjectImpl [part=239, val=20170627035520067938, hasValBytes=true], readThrough=true, forcePrimary=false, futId=a63a0367161-9c6368e5-8fa4-4550-abf6-02f8ef50125e, trackable=true, subjId=65e41fd3-846c-4086-a7bf-486616594368, taskName=null, deserializeBinary=true, skipVals=false, expiryPlc=CacheExpiryPolicy [], canRemap=true, needVer=false, keepCacheObjects=false, recovery=false, node=TcpDiscoveryNode [id=434ef9a9-eb32-4096-8f80-843486a89137, addrs=[127.0.0.1, 192.168.208.5], sockAddrs=[/192.168.208.5:47500, /127.0.0.1:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1518106106491, loc=false, ver=2.3.0#20171028-sha1:8add7fd5, isClient=false]]]","logger_name":"org.apache.ignite.internal.diagnostic","thread_name":"grid-timeout-worker-#23","level":"WARN","level_value":30000}
org.apache.ignite.internal.processors.cache.CacheStoppedException: Failed to perform cache operation (cache is stopped):
如果我在生产环境的配置中缺少,可以请任何人建议吗?
关于跟踪metricLog的任何想法。
本地节点的度量标准(禁用set&#39; metricsLogFrequency&#39;为0)\ n ^ - 节点[id = 1c4d9a3e,uptime = 15:49:04.761] \ n ^ - H / N / C [主机= 4,节点= 4,CPU = 16] \ n ^ - CPU [cur = 0.17%,avg = 0.27%,GC = 0%] \ n ^ - PageMemory [pages = 1624] \ n ^ - 堆[used = 510MB,free = 91.55%,comm = 6036MB] \ n ^ - 非堆[used = 117MB,free = -1%,comm = 119MB] \ n ^ - 公共线程池[active = 0,idle = 0,qSize = 0] \ n ^ - 系统线程池[active = 0,idle = 6,qSize = 0] \ n ^ - 出站消息队列[size = 0]&#34;,& #34; logger_name&#34;:&#34; org.apache.ignite.internal.IgniteKernal&#34;&#34; THREAD_NAME&#34;:&#34;网格超时工人─#23&#34 ;, &#34;电平&#34;:&#34; INFO&#34;&#34;&LEVEL_VALUE#34;:20000}
这里说非堆内存空闲是-1%。在dataregion配置中,我已经给出了最小1 gb和最大2 gb内存。任何想法如何处理这个非堆内存?
答案 0 :(得分:0)
这看起来像这个问题:https://issues.apache.org/jira/browse/IGNITE-6818
它已在2.4中修复,即将发布。我建议监视Ignite开发列表以获取进一步的公告。您也可以从master进行构建以检查它是否解决了问题。