Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-6026

init cluster for Ignite Persistence by xml

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Resolved
    • Priority: Major
    • Resolution: Information Provided
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: cache, examples, persistence
    • Labels:
    • Environment:

      ignite in docker with zk

    • Docs Text:
      Hide
      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans" xmlns:cache="http://www.springframework.org/schema/cache"
             xmlns:context="http://www.springframework.org/schema/context"
             xmlns:mvc="http://www.springframework.org/schema/mvc" 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 http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd ">
          <bean class="org.apache.ignite.configuration.IgniteConfiguration">
              <!-- Enabling Redis. -->
              <property name="connectorConfiguration">
                  <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
                      <property name="port" value="6379"/>
                  </bean>
              </property>

              <!-- Enabling Apache Ignite Persistent Store. -->
              <property name="persistentStoreConfiguration">
                  <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/>
              </property>
              <property name="cacheConfiguration">
                  <list>
                      <!-- for Redis Partitioned cache example configuration (Atomic mode). -->
                      <bean class="org.apache.ignite.configuration.CacheConfiguration">
                          <property name="name" value="default"/>
                          <property name="atomicityMode" value="ATOMIC"/>
                          <property name="backups" value="1"/>
                      </bean>
                      <bean class="org.apache.ignite.configuration.CacheConfiguration">
                          <property name="name" value="cache"/>
                          <property name="cacheMode" value="PARTITIONED"/>
                          <property name="atomicityMode" value="ATOMIC"/>
                          <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
                          <property name="backups" value="0"/>
                          <property name="queryEntities">
                              <list>
                                  <bean class="org.apache.ignite.cache.QueryEntity">
                                      <property name="keyType" value="java.lang.String"/>
                                      <property name="valueType" value="stat_raw"/>
                                      <property name="fields">
                                          <map>
                                              <entry key="Timestamp" value="java.lang.Long"/>
                                              <entry key="ClientId" value="java.lang.String"/>
                                              <entry key="StatId" value="java.lang.String"/>
                                              <entry key="ServiceId" value="java.lang.String"/>
                                              <entry key="TimestampDT" value="java.lang.Date"/>
                                          </map>
                                      </property>
                                  </bean>
                              </list>
                          </property>
                      </bean>
                  </list>
              </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.zk.TcpDiscoveryZookeeperIpFinder">
                              <property name="allowDuplicateRegistrations" value="false"/>
                              <property name="basePath" value="/ignite"/>
                              <property name="serviceName" value="cache"/>
                              <property name="zkConnectionString" value="zk.zookeeper.MY.DISCOVERY.SERVICE:2181"/>
                          </bean>
                      </property>
                  </bean>
              </property>
          </bean>
      </beans>
      Show
      <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=" http://www.springframework.org/schema/beans " xmlns:cache=" http://www.springframework.org/schema/cache "        xmlns:context=" http://www.springframework.org/schema/context "        xmlns:mvc=" http://www.springframework.org/schema/mvc " 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 http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd ">     <bean class="org.apache.ignite.configuration.IgniteConfiguration">         <!-- Enabling Redis. -->         <property name="connectorConfiguration">             <bean class="org.apache.ignite.configuration.ConnectorConfiguration">                 <property name="port" value="6379"/>             </bean>         </property>         <!-- Enabling Apache Ignite Persistent Store. -->         <property name="persistentStoreConfiguration">             <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/>         </property>         <property name="cacheConfiguration">             <list>                 <!-- for Redis Partitioned cache example configuration (Atomic mode). -->                 <bean class="org.apache.ignite.configuration.CacheConfiguration">                     <property name="name" value="default"/>                     <property name="atomicityMode" value="ATOMIC"/>                     <property name="backups" value="1"/>                 </bean>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">                     <property name="name" value="cache"/>                     <property name="cacheMode" value="PARTITIONED"/>                     <property name="atomicityMode" value="ATOMIC"/>                     <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>                     <property name="backups" value="0"/>                     <property name="queryEntities">                         <list>                             <bean class="org.apache.ignite.cache.QueryEntity">                                 <property name="keyType" value="java.lang.String"/>                                 <property name="valueType" value="stat_raw"/>                                 <property name="fields">                                     <map>                                         <entry key="Timestamp" value="java.lang.Long"/>                                         <entry key="ClientId" value="java.lang.String"/>                                         <entry key="StatId" value="java.lang.String"/>                                         <entry key="ServiceId" value="java.lang.String"/>                                         <entry key="TimestampDT" value="java.lang.Date"/>                                     </map>                                 </property>                             </bean>                         </list>                     </property>                 </bean>             </list>         </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.zk.TcpDiscoveryZookeeperIpFinder">                         <property name="allowDuplicateRegistrations" value="false"/>                         <property name="basePath" value="/ignite"/>                         <property name="serviceName" value="cache"/>                         <property name="zkConnectionString" value="zk.zookeeper.MY.DISCOVERY.SERVICE:2181"/>                     </bean>                 </property>             </bean>         </property>     </bean> </beans>

      Description

      Hello! We use Ignite 2.1 and would like to use Ignite Persistence, how i can do this without java code? xml only.
      Example attached.

        Attachments

          Activity

            People

            • Assignee:
              kukushal Alexey Kukushkin
              Reporter:
              negash Alex Negashev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: