当前位置: 首页 > 知识库问答 >
问题:

apche为生产点燃客户端和服务器配置

龙越彬
2023-03-14

我已经做了以下的服务器配置为点燃。

<?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>
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):

这里是说非堆内存空闲为-1%。在数据区域配置中,我给出了最小1 gb和最大2 gb内存。知道如何处理这些非堆内存吗?

共有1个答案

艾自强
2023-03-14

类似于以下问题:https://issues.apache.org/jira/browse/ignite-6818

它在2.4中得到了修正,很快就会发布。我建议监视点火开发人员列表以获得进一步的公告。您也可以从master构建它来检查它是否解决了问题。

 类似资料:
  • 我想知道以下问题的答案: 1)如果Ignite服务器重新启动,我需要重新启动客户端(web应用程序)。是否有任何方法可以在服务器重新启动时重新连接到服务器。我知道当服务器重新启动时,它分配了一个不同的ID,因此当前现有的连接变得过时。是否有方法克服这个问题,如果是的话,哪一个版本的Ignite支持这个功能。目前我使用1.7版本 3)如果我有一个大对象要缓存,我发现序列化和反序列化在Ignite中需

  • 我是ignite的新手,并尝试使用示例https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/client/clientputgetexample.java null

  • 我正在尝试构建一个apache ignite thinclient poc,并且能够连接到集群,还可以使用ScanQuery读取数据。但我仍然停留在为任何缓存更新创建一个监听器上。我翻阅了一下,但找不到瘦客户机的任何东西。ignite瘦客户端是否支持侦听缓存更新?我该怎么做?

  • 我试图在Kubernetes环境中通过瘦客户机使用Ignite和我的java应用程序设置一个分布式缓存。 在我的Kubernetes集群中,我有两个带有java应用程序的pods和两个Ignite的pods。为了让java Pod与ignite Pod通信,我配置了一个瘦客户机来连接ignite kubernetes服务。通过这种配置,我希望负载平衡在kubernetes一侧。下面是我在java代

  • 我想在一些计算机之间建立点对点连接,这样用户就可以在没有外部服务器的情况下聊天和交换文件。我最初的想法如下: 我在服务器上制作了一个中央服务器插座,所有应用程序都可以连接到该插座。此ServerSocket跟踪已连接的套接字(客户端),并将新连接的客户端的IP和端口提供给所有其他客户端。每个客户端都会创建一个新的ServerSocket,所有客户端都可以连接到它。 换句话说:每个客户端都有一个Se