I guess I was doing the same.
Only change I could see is, you were enabling setMetrcis for both regionCfg
and storageCng

       regionCfg.setMetricsEnabled(true);
        // Setting the data region configuration.
        storageCfg.setDataRegionConfigurations(regionCfg);
        storageCfg.setMetricsEnabled(true);

I have attached, wont be able to upload the files..

But here the content, server-config.xml we use to start the Ignite node
Begin serve XML ===========================================
<?xml version="1.0" encoding="UTF-8"?>
<beans
    xmlns="http://www.springframework.org/schema/beans";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:util="http://www.springframework.org/schema/util";
        xsi:schemaLocation="http://www.springframework.org/schema/beans         
                  
http://www.springframework.org/schema/beans/spring-beans.xsd                    
       
http://www.springframework.org/schema/util                           
http://www.springframework.org/schema/util/spring-util.xsd";>
    
    <bean id="placeholderConfig"
        
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location" value="file:${PROPERTY_FILE_PATH}" />
    </bean>
    <bean id="cache-template"
                class="org.apache.ignite.configuration.CacheConfiguration"
                abstract="true">
        <property name="name" value="EDIFCache*" />
        <property name="writeSynchronizationMode"
                        value="PRIMARY_SYNC " />
        <property name="affinity">
            <bean
                        
class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                <property name="excludeNeighbors" value="true" />
            </bean>
        </property>
    </bean>
    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="igniteInstanceName" value="${IGNITE_INSTANCE_NAME}"
/>
        <property name="metricsLogFrequency" value="0" />
        <property name="failureDetectionTimeout" value="120000" />
        <property name="clientFailureDetectionTimeout" value="120000" />
        <property name="networkTimeout" value="120000" />
        
        <property name="gridLogger">
            <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
                <constructor-arg type="java.lang.String"
value="${IGNITE_SCRIPT}/ignite-log4j2.xml" />
            </bean>
        </property>
        <property name="dataStorageConfiguration">
            <bean
                                
class="org.apache.ignite.configuration.DataStorageConfiguration">
                <property name="defaultDataRegionConfiguration">
                    <bean
                                                
class="org.apache.ignite.configuration.DataRegionConfiguration">
                        <property name="persistenceEnabled" value="true" />
                        
                        <property name="maxSize" value="${maxSize}" />
                        
                        <property name="checkpointPageBufferSize"
                                                        
value="${checkpointPageBufferSize}" />
                    </bean>
                </property>
                <property name="storagePath" value="${storagePath}" />
                <property name="walPath" value="${walPath}" />
                <property name="walArchivePath" value="${walArchivePath}" />
                <property name="walMode" value="LOG_ONLY" />
                <property name="pageSize" value="${pageSize}" />        
                
                <property name="writeThrottlingEnabled" value="true" />
            </bean>
        </property>
        <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">
                            <bean
class="org.springframework.util.StringUtils"
                                                                
factory-method="commaDelimitedListToSet">
                                <constructor-arg type="java.lang.String"
                                                                        
value="${nodeIpAddresses}" />
                            </bean>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

End serve XML ===========================================

XML used for creating the cache where metric enabled flag is set at cache
level.


Begin ====================================
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:util="http://www.springframework.org/schema/util";
        xsi:schemaLocation="http://www.springframework.org/schema/beans
                          
http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/util
                          
http://www.springframework.org/schema/util/spring-util.xsd";>
        
         <bean id="placeholderConfig"
        
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
                <property name="location" value="file:${PROPERTY_FILE_PATH}" />
        </bean> 
        <bean id="cache-template"
                class="org.apache.ignite.configuration.CacheConfiguration"
                abstract="true">
        <property name="name" value="EDIFCache*" />
        <property name="writeSynchronizationMode"
                        value="PRIMARY_SYNC " />
        <property name="affinity">
            <bean
                               
class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                <property name="excludeNeighbors" value="true" />
            </bean>
        </property>
    </bean>
    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
                <property name="clientMode" value="true" />
                <property name="igniteInstanceName" 
value="EDIFCustomer-Client-Local" />
                <property name="metricsLogFrequency" value="0" />
                <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">
                                                        <bean 
class="org.springframework.util.StringUtils"
factory-method="commaDelimitedListToSet">
                                                                
<constructor-arg type="java.lang.String" value="${nodeIpAddresses}"
/>
                                                        </bean>
                                                </property>
                                        </bean>
                                </property>
                        </bean>
                </property>
                <property name="cacheConfiguration">
            <list>
                <bean
class="org.apache.ignite.configuration.CacheConfiguration"
parent="cache-template">
                    <property name="name" value="CustomerCache" />
                    <property name="cacheMode" value="PARTITIONED" />
                    <property name="atomicityMode" value="ATOMIC" />
                    <property name="statisticsEnabled" value="true"/>
                    <property name="backups" value="1" />
                    <property name="queryEntities">
                        <list>
                            <bean
class="org.apache.ignite.cache.QueryEntity">
                                <property name="keyType"
value="java.lang.String" />
                                <property name="valueType"
value="com.jio.digitalapi.edif.customer.model.Customer" />
                                <property name="keyFieldName"
value="partyId" />
                                <property name="keyFields">
                                    <list>
                                        <value>partyId</value>
                                    </list>
                                </property>
                                <property name="fields">
                                    <map>
                                        <entry key="accountIdList"
value="java.lang.String" />
                                        <entry key="custAddressIdList"
value="java.lang.String" />
                                        <entry key="partyrole"
value="java.lang.String" />
                                        <entry key="partyStatusCode"
value="java.lang.String" />
                                    </map>
                                </property>
                                <property name="aliases">
                                    <map>
                                        <entry key="partyId"
value="PARTY_ID" />
                                        <entry key="accountIdList"
value="ACCOUNT_ID_LIST" />
                                        <entry key="custAddressIdList"
value="CUST_ADDRESS_ID_LIST" />
                                        <entry key="partyStatusCode"
value="PARTY_STATUS_CODE" />
                                    </map>
                                </property>
                            </bean>
                        </list>
                    </property>
                </bean>
                         </list>
                    </property>
                </bean>
            </list>
        </property>
        </bean>
</beans>

End  ====================================

Please let me know if you need anything further to reproduce the issue

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to