Hi here is my cache store configuration <?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="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" /> <property name="searchSystemEnvironment" value="true" /> </bean> <bean id="dsHive_DB" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true"> <property name="driverClassName" value="org.apache.hive.jdbc.HiveDriver"/> <property name="url" value="jdbc:hive2://X.X.X.X:abcd/ignite_ps"/> <property name="username" value="hive"/> <property name="password" value="hive"/> </bean> <bean class="org.apache.ignite.configuration.IgniteConfiguration"> <property name="clientMode" value="true"/> <property name="igniteInstanceName" value="ImportedCluster"/> <property name="discoverySpi"> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> <property name="ipFinder"> <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"> <property name="addresses"> <list> <value>y.y.y.y:47500..47509</value> </list> </property> </bean> </property> </bean> </property> <property name="peerClassLoadingEnabled" value="true"/> <property name="cacheConfiguration"> <list> <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="ApnDiameter5MinCache"/> <property name="cacheMode" value="PARTITIONED"/> <property name="atomicityMode" value="ATOMIC"/> <property name="cacheStoreFactory"> <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory"> <property name="dataSourceBean" value="dsHive_DB"/> <property name="dialect"> <bean class="org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect"> </bean> </property> <property name="types"> <list> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType"> <property name="cacheName" value="ApnDiameter5MinCache"/> <property name="keyType" value="com.mycomp.ignite_user.model.ApnDiameter5MinKey"/> <property name="valueType" value="com.mycomp.ignite_user.model.ApnDiameter5Min"/> <property name="databaseSchema" value="ignite_ps"/> <property name="databaseTable" value="apn_diameter_5_min"/> <property name="valueFields"> <list> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.VARCHAR"/> </property> <property name="databaseFieldName" value="id"/> <property name="javaFieldType" value="java.lang.String"/> <property name="javaFieldName" value="id"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.TIMESTAMP"/> </property> <constructor-arg value="report_start_time"/> <constructor-arg value="java.sql.Timestamp"/> <constructor-arg value="reportStartTime"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.TIMESTAMP"/> </property> <constructor-arg value="report_end_time"/> <constructor-arg value="java.sql.Timestamp"/> <constructor-arg value="reportEndTime"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.VARCHAR"/> </property> <constructor-arg value="apn_id"/> <constructor-arg value="java.lang.String"/> <constructor-arg value="apnId"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </property> <constructor-arg value="ggsn_diameter_total_events"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="ggsnDiameterTotalEvents"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </property> <constructor-arg value="apn_id_vector_item_count"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="apnIdVectorItemCount"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </property> <constructor-arg value="request_type"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="requestType"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </property> <constructor-arg value="request_type_number_events"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="requestTypeNumberEvents"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.VARCHAR"/> </property> <constructor-arg value="request_type_imsi"/> <constructor-arg value="java.lang.String"/> <constructor-arg value="requestTypeImsi"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </property> <constructor-arg value="request_type_imsi_vector_item_count"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="requestTypeImsiVectorItemCount"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="request_type_success_events"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="requestTypeSuccessEvents"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.VARCHAR"/> </constructor-arg> <constructor-arg value="imsi_diameter_success"/> <constructor-arg value="java.lang.String"/> <constructor-arg value="imsiDiameterSuccess"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="imsi_diameter_success_vector_item_count"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="imsiDiameterSuccessVectorItemCount"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="diameter_requests_unsuccessful"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="diameterRequestsUnsuccessful"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.VARCHAR"/> </constructor-arg> <constructor-arg value="imsi_diameter_unsuccessful"/> <constructor-arg value="java.lang.String"/> <constructor-arg value="imsiDiameterUnsuccessful"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="imsi_diameter_unsuccessful_vector_item_count"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="imsiDiameterUnsuccessfulVectorItemCount"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.DOUBLE"/> </constructor-arg> <constructor-arg value="request_delay_sum"/> <constructor-arg value="java.lang.Double"/> <constructor-arg value="requestDelaySum"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="request_delay_events"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="requestDelayEvents"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="result_code"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="resultCode"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="result_code_events"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="resultCodeEvents"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.VARCHAR"/> </constructor-arg> <constructor-arg value="result_code_imsi"/> <constructor-arg value="java.lang.String"/> <constructor-arg value="resultCodeImsi"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="result_code_imsi_vector_item_count"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="resultCodeImsiVectorItemCount"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="termination_cause"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="terminationCause"/> </bean> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.BIGINT"/> </constructor-arg> <constructor-arg value="termination_cause_event"/> <constructor-arg value="java.lang.Long"/> <constructor-arg value="terminationCauseEvent"/> </bean> </list> </property> </bean> </list> </property> </bean> </property> <property name="writeThrough" value="true"/> <property name="WriteBehindEnabled" value="true"/> <property name="WriteBehindFlushFrequency" value="2000"/> <property name="queryEntities"> <list> <bean class="org.apache.ignite.cache.QueryEntity"> <property name="keyType" value="com.mycomp.ignite_user.model.ApnDiameter5MinKey"/> <property name="valueType" value="com.mycomp.ignite_user.model.ApnDiameter5Min"/> <property name="tableName" value="apn_diameter_5_min"/> <property name="fields"> <map> <entry key="id" value="java.lang.String"/> <entry key="reportStartTime" value="java.sql.Timestamp"/> <entry key="reportEndTime" value="java.sql.Timestamp"/> <entry key="apnId" value="java.lang.String"/> <entry key="ggsnDiameterTotalEvents" value="java.lang.Long"/> <entry key="apnIdVectorItemCount" value="java.lang.Long"/> <entry key="requestType" value="java.lang.Long"/> <entry key="requestTypeNumberEvents" value="java.lang.Long"/> <entry key="requestTypeImsi" value="java.lang.String"/> <entry key="requestTypeImsiVectorItemCount" value="java.lang.Long"/> <entry key="requestTypeSuccessEvents" value="java.lang.Long"/> <entry key="imsiDiameterSuccess" value="java.lang.String"/> <entry key="imsiDiameterSuccessVectorItemCount" value="java.lang.Long"/> <entry key="diameterRequestsUnsuccessful" value="java.lang.Long"/> <entry key="imsiDiameterUnsuccessful" value="java.lang.String"/> <entry key="imsiDiameterUnsuccessfulVectorItemCount" value="java.lang.Long"/> <entry key="requestDelaySum" value="java.lang.Double"/> <entry key="requestDelayEvents" value="java.lang.Long"/> <entry key="resultCode" value="java.lang.Long"/> <entry key="resultCodeEvents" value="java.lang.Long"/> <entry key="resultCodeImsi" value="java.lang.String"/> <entry key="resultCodeImsiVectorItemCount" value="java.lang.Long"/> <entry key="terminationCause" value="java.lang.Long"/> <entry key="terminationCauseEvent" value="java.lang.Long"/> </map> </property> <property name="keyFields"> <list> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> <property name="databaseFieldType"> <util:constant static-field="java.sql.Types.VARCHAR"/> </property> <property name="databaseFieldName" value="id"/> <property name="javaFieldType" value="java.lang.String"/> <property name="javaFieldName" value="id"/> </bean> </list> </property> <property name="aliases"> <map> <entry key="reportStartTime" value="report_start_time"/> <entry key="reportEndTime" value="report_end_time"/> <entry key="apnId" value="apn_id"/> <entry key="ggsnDiameterTotalEvents" value="ggsn_diameter_total_events"/> <entry key="apnIdVectorItemCount" value="apn_id_vector_item_count"/> <entry key="requestType" value="request_type"/> <entry key="requestTypeNumberEvents" value="request_type_number_events"/> <entry key="requestTypeImsi" value="request_type_imsi"/> <entry key="requestTypeImsiVectorItemCount" value="request_type_imsi_vector_item_count"/> <entry key="requestTypeSuccessEvents" value="request_type_success_events"/> <entry key="imsiDiameterSuccess" value="imsi_diameter_success"/> <entry key="imsiDiameterSuccessVectorItemCount" value="imsi_diameter_success_vector_item_count"/> <entry key="diameterRequestsUnsuccessful" value="diameter_requests_unsuccessful"/> <entry key="imsiDiameterUnsuccessful" value="imsi_diameter_unsuccessful"/> <entry key="imsiDiameterUnsuccessfulVectorItemCount" value="imsi_diameter_unsuccessful_vector_item_count"/> <entry key="requestDelaySum" value="request_delay_sum"/> <entry key="requestDelayEvents" value="request_delay_events"/> <entry key="resultCode" value="result_code"/> <entry key="resultCodeEvents" value="result_code_events"/> <entry key="resultCodeImsi" value="result_code_imsi"/> <entry key="resultCodeImsiVectorItemCount" value="result_code_imsi_vector_item_count"/> <entry key="terminationCause" value="termination_cause"/> <entry key="terminationCauseEvent" value="termination_cause_event"/> </map> </property> </bean> </list> </property> </bean> </list> </property> </bean> </beans> -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
