Guest User

Apache Ignite configuration

a guest
Nov 13th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.13 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <!--
  3.  Licensed to the Apache Software Foundation (ASF) under one or more
  4.  contributor license agreements.  See the NOTICE file distributed with
  5.  this work for additional information regarding copyright ownership.
  6.  The ASF licenses this file to You under the Apache License, Version 2.0
  7.  (the "License"); you may not use this file except in compliance with
  8.  the License.  You may obtain a copy of the License at
  9.  
  10.       http://www.apache.org/licenses/LICENSE-2.0
  11.  
  12.  Unless required by applicable law or agreed to in writing, software
  13.  distributed under the License is distributed on an "AS IS" BASIS,
  14.  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15.  See the License for the specific language governing permissions and
  16.  limitations under the License.
  17. -->
  18. <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">
  19.     <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
  20.         <property name="cacheConfiguration">
  21.             <bean class="org.apache.ignite.configuration.CacheConfiguration">
  22.                 <property name="name" value="ScenarioCache"/>
  23.                 <property name="queryEntities">
  24.                     <list>
  25.                         <bean class="org.apache.ignite.cache.QueryEntity">
  26.                             <property name="keyType" value="Scenario"/>
  27.                             <propery name="valueType" value="Result"/>
  28.                             <property name="fields">
  29.                                 <map>
  30.                                     <entry key="val1" value="java.lang.Double"/>
  31.                                     <entry key="val2" value="java.lang.Double"/>
  32.                                     <entry key="val3" value="java.lang.Double"/>
  33.                                     <entry key="val4" value="java.lang.Double"/>
  34.                                     <entry key="val5" value="java.lang.Double"/>
  35.                                     <entry key="val6" value="java.lang.Double"/>
  36.                                     <entry key="val7" value="java.lang.Double"/>
  37.                                     <entry key="val8" value="java.lang.Double"/>
  38.                                     <entry key="result" value="java.lang.Boolean"/>
  39.                                     <entry key="isInitialized" value="java.lang.Boolean"/>
  40.                                 </map>
  41.                             </property>
  42.                             <property name="keyField">
  43.                                 <set>
  44.                                     <value>val1</value>
  45.                                     <value>val2</value>
  46.                                     <value>val3</value>
  47.                                     <value>val4</value>
  48.                                     <value>val5</value>
  49.                                     <value>val6</value>
  50.                                     <value>val7</value>
  51.                                     <value>val8</value>
  52.                                 </set>
  53.                             </property>
  54.                         </bean>
  55.                     </list>
  56.                 </property>
  57.             </bean>
  58.         </property>
  59.         <!-- Enabling Apache Ignite Persistent Store. -->
  60.         <property name="dataStorageConfiguration">
  61.             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
  62.                 <!-- set the size of wal segments to 2GB -->
  63.                 <property name="walSegmentSize" value="#{1000 * 1024 * 1024}"/>
  64.                 <property name="defaultDataRegionConfiguration">
  65.                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
  66.                         <property name="persistenceEnabled" value="true"/>
  67.                         <property name="name" value="Default_Region"/>
  68.                         <!-- Setting the size of the default region to 4GB. -->
  69.                         <property name="maxSize" value="#{20L * 1024 * 1024 * 1024}"/>
  70.                     </bean>
  71.                 </property>
  72.                 <property name="storagePath" value="/media/storage/ApacheIgniteStore"/>
  73.             </bean>
  74.         </property>
  75.         <!-- Explicitly configure TCP discovery SPI to provide a list of initial nodes. -->
  76.         <property name="discoverySpi">
  77.             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
  78.                 <property name="ipFinder">
  79.                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
  80.                     <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
  81.                     <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
  82.                         <property name="addresses">
  83.                             <list>
  84.                                 <!-- In distributed environment, replace with actual host IP address. -->
  85.                                 <value>127.0.0.1:47500..47502</value>
  86.                             </list>
  87.                         </property>
  88.                     </bean>
  89.                 </property>
  90.             </bean>
  91.         </property>
  92.     </bean>
  93. </beans>
Advertisement
Add Comment
Please, Sign In to add comment