apache-ignite
133 строки · 5.8 Кб
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4Licensed to the Apache Software Foundation (ASF) under one or more
5contributor license agreements. See the NOTICE file distributed with
6this work for additional information regarding copyright ownership.
7The ASF licenses this file to You under the Apache License, Version 2.0
8(the "License"); you may not use this file except in compliance with
9the License. You may obtain a copy of the License at
10
11http://www.apache.org/licenses/LICENSE-2.0
12
13Unless required by applicable law or agreed to in writing, software
14distributed under the License is distributed on an "AS IS" BASIS,
15WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16See the License for the specific language governing permissions and
17limitations under the License.
18-->
19
20<!--
21Ignite Spring configuration file to startup grid cache.
22
23When starting a standalone Ignite node, you need to execute the following command:
24{IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
25
26When starting Ignite from Java IDE, pass path to this file into Ignition:
27Ignition.start("path-to-this-file/example-benchmark.xml");
28-->
29<beans xmlns="http://www.springframework.org/schema/beans"30xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"31xmlns:util="http://www.springframework.org/schema/util"32xsi:schemaLocation="33http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
34http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">35<!--36Optional description.
37-->
38<description>39Spring file for grid configuration with benchmark.
40</description>41
42<!--43Configuration below demonstrates how to setup caches within grid nodes.
44-->
45<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">46<property name="peerClassLoadingEnabled" value="false"/>47
48<!-- Set to local host address just for examples. -->49<property name="localHost" value="127.0.0.1"/>50
51<property name="connectorConfiguration">52<bean class="org.apache.ignite.configuration.ConnectorConfiguration">53<property name="port" value="11211"/>54</bean>55</property>56
57<!--<property name="peerClassLoadingEnabled" value="false"/>-->58
59<property name="cacheConfiguration">60<!--61Specify list of cache configurations here. Any property from
62CacheConfiguration interface can be configured here.
63Note that absolutely all configuration properties are optional.
64-->
65<list>66<!--67Partitioned cache example configuration.
68-->
69<bean class="org.apache.ignite.configuration.CacheConfiguration">70<property name="name" value="partitioned"/>71
72<property name="cacheMode" value="PARTITIONED"/>73
74<property name="swapEnabled" value="false"/>75
76<property name="writeSynchronizationMode" value="FULL_ASYNC"/>77
78<property name="nearConfiguration">79<bean class="org.apache.ignite.configuration.NearCacheConfiguration" />80</property>81
82<!--83This shows how to configure number of backups. The below configuration
84sets the number of backups to 1 (which is default).
85-->
86<property name="backups" value="1"/>87</bean>88</list>89</property>90
91<property name="includeEventTypes">92<list>93<util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>94<util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>95<util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_MAPPED"/>96</list>97</property>98<property name="includeProperties"><list/></property>99
100<!--101Uncomment this to provide TCP discovery SPI (predefined addresses).
102Use the addresses list to provide IP addresses of initial nodes in the grid
103(at least one address must be provided).
104-->
105<property name="discoverySpi">106<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">107<property name="ipFinder">108<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">109<property name="addresses">110<list>111<!--112List all IP/port configurations that potentially
113can be started first in examples. We are assuming
114grid of size 10 or less.
115-->
116<value>127.0.0.1:47500</value>117<value>127.0.0.1:47501</value>118<value>127.0.0.1:47502</value>119<value>127.0.0.1:47503</value>120<value>127.0.0.1:47504</value>121<value>127.0.0.1:47505</value>122<value>127.0.0.1:47506</value>123<value>127.0.0.1:47507</value>124<value>127.0.0.1:47508</value>125<value>127.0.0.1:47509</value>126</list>127</property>128</bean>129</property>130</bean>131</property>132</bean>133</beans>134