<?xml version="1.0" encoding="UTF-8"?>

<!-- This file was generated by Ignite Web Console (01/13/2019, 12:23) -->

<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://10.76.93.17:8009/ignite_hive_int2"/>
         <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="connectorConfiguration">
              <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
                   <property name="jettyPath" value="/etc/ignite/jetty-server.xml" />
              </bean>
        </property>
        <property name="sslContextFactory">
              <bean class="org.apache.ignite.ssl.SslContextFactory">
                  <property name="protocol" value="SSL"/>
                  <property name="keyStoreFilePath" value="/etc/ignite/ssl/ignite-ssl/keyStorePath"/>
                  <property name="keyStorePassword" value="${IGNITE_KEYSTORE_PASSWORD}"/>
                  <property name="trustManagers">
                       <bean class="org.apache.ignite.ssl.SslContextFactory" factory-method="getDisabledTrustManager"/>
                  </property>
              </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.kubernetes.TcpDiscoveryKubernetesIpFinder">
                     <property name="serviceName" value="i-shive-cinder"/>
                     <property name="namespace" value="cign"/>
                 </bean>
              </property>
            </bean>

        </property>





        <property name="peerClassLoadingEnabled" value="true"/>

        <!--property name="discoverySpi">
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
              <property name="ipFinder">
                 <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
                     <property name="serviceName" value="i-shive-cinder"/>
                     <property name="namespace" value="cign"/>
                 </bean>
              </property>
            </bean>
        </property-->

        <property name="cacheConfiguration">
            <list>
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="ApnDiameter5MinCache162"/>
                    <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="ApnDiameter5MinCache162"/>
                                        <property name="keyType" value="com.nokia.ignite_user.model.ApnDiameter5MinKey"/>
                                        <property name="valueType" value="com.nokia.ignite_user.model.ApnDiameter5Min"/>
                                        <property name="databaseSchema" value="ignite_hive_int2"/>
                                        <property name="databaseTable" value="apn_diameter_5_min"/>

                              <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="valueFields">
                                            <list>
                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.VARCHAR"/>
                                                    </constructor-arg>
                                                    <constructor-arg value="id"/>
                                                    <constructor-arg value="java.lang.String"/>
                                                    <constructor-arg value="id"/>
                                                </bean>

                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
                                                    </constructor-arg>
                                                    <constructor-arg value="report_start_time"/>
                                                    <constructor-arg value="java.lang.Long"/>
                                                    <constructor-arg value="reportStartTime"/>
                                                </bean>

                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
                                                    </constructor-arg>
                                                    <constructor-arg value="report_end_time"/>
                                                    <constructor-arg value="java.lang.Long"/>
                                                    <constructor-arg value="reportEndTime"/>
                                                </bean>

                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.VARCHAR"/>
                                                    </constructor-arg>
                                                    <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">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.BIGINT"/>
                                                    </constructor-arg>
                                                    <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">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.BIGINT"/>
                                                    </constructor-arg>
                                                    <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">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.BIGINT"/>
                                                    </constructor-arg>
                                                    <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">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.BIGINT"/>
                                                    </constructor-arg>
                                                    <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">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.VARCHAR"/>
                                                    </constructor-arg>
                                                    <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">
                                                    <constructor-arg>
                                                        <util:constant static-field="java.sql.Types.BIGINT"/>
                                                    </constructor-arg>
                                                    <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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">
                                                    <constructor-arg>
                                                        <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="false"/>
                    <property name="WriteBehindEnabled" value="true"/>
                    <property name="WriteBehindFlushFrequency" value="5000"/>
                    <!--property name="WriteBehindBatchSize" value="20480"/-->
                    <property name="WriteBehindFlushSize" value="0"/>
                    <property name="queryEntities">
                        <list>
                            <bean class="org.apache.ignite.cache.QueryEntity">
                                <property name="keyType" value="com.nokia.ignite_user.model.ApnDiameter5MinKey"/>
                                <property name="valueType" value="com.nokia.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">
                                  <set>
                                      <value>id</value>
                                      <value>apnId</value>
                                   </set>
                                </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>
