Suppose I have the following configuration file for standalone Ignite server nodes:
<?xml version="1.0" encoding="UTF-8"?> <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"> <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> <property name="peerClassLoadingEnabled" value="true"/> <property name="cacheConfiguration"> <list> <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="my-cache" /> <property name="cacheMode" value="PARTITIONED"/> <property name="backups" value="1"/> </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.vm.TcpDiscoveryVmIpFinder"> <property name="addresses"> <bean class="org.springframework.util.StringUtils" factory-method="commaDelimitedListToSet"> <constructor-arg type="java.lang.String" value="10.22.3.30,10.22.3.31,10.22.3.32,10.22.3.33"/> </bean> </property> </bean> </property> </bean> </property> </bean> </beans> Now instead of "10.22.3.30,10.22.3.31,10.22.3.32,10.22.3.33", I would like to give a different set of IPs to the fail-over cluser, for example, "10.22.4.30,10.22.4.31,10.22.4.32,10.22.4.33". Is it possible to just specify a variable in the configuration file, such as: <bean class="org.springframework.util.StringUtils" factory-method="commaDelimitedListToSet"> <constructor-arg type="java.lang.String" value="${nodeIpAddresses}"/> </bean> And then pass the specific IP addresses to the configuration when we starting Ignite? Somehow like: bin/ignite.sh conf/apache-ignite-server.xml -DnodeIpAddresses="10.22.3.30,10.22.3.31,10.22.3.32,10.22.3.33" bin/ignite.sh conf/apache-ignite-server.xml -DnodeIpAddresses="10.22.4.30,10.22.4.31,10.22.4.32,10.22.4.33" Thank you, Yuci -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-pass-variable-to-the-configuration-file-tp9402.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
