Skip to content

Instantly share code, notes, and snippets.

@anupash
Last active February 8, 2018 17:57
Show Gist options
  • Save anupash/e703a5bb6c27c4dba7002dd0ecfc4ba7 to your computer and use it in GitHub Desktop.
Save anupash/e703a5bb6c27c4dba7002dd0ecfc4ba7 to your computer and use it in GitHub Desktop.
Apache Ignite
<?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="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="dataRegionName" value="1000MB_Region"/>
<property name="name" value="configCache"/>
</bean>
</list>
</property>
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<!-- Set concurrency level -->
<property name="concurrencyLevel" value="4"/>
<!-- Set the page size to 8 KB -->
<property name="pageSize" value="8192"/>
<property name="dataRegionConfigurations">
<list>
<!--
Defining a data region that will consume up to 500 MB of RAM and
will have eviction and persistence enabled.
-->
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<!-- Custom region name. -->
<property name="name" value="1000MB_Region"/>
<!-- 100 MB initial size. -->
<property name="initialSize" value="#{500L * 1024 * 1024}"/>
<!-- 500 MB maximum size. -->
<property name="maxSize" value="#{1000L * 1024 * 1024}"/>
<!-- Enabling persistence for the region. -->
<property name="persistenceEnabled" value="true"/>
<!-- Enabling RANDOM_2_LRU eviction for this region. -->
<property name="pageEvictionMode" value="RANDOM_2_LRU"/>
</bean>
</list>
</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="namespace" value="stage-aashish-one"/>
<property name="serviceName" value="ignite-aashish-one-service"/>
<property name="masterUrl" value="https://kube-master.yieldlab.lan:6443"/>
<!-- https://kubernetes.default.svc.cluster.local:443/api/v1/namespaces/stage-aashish-one/endpoints/ignite -->
</bean>
</property>
</bean>
</property>
</bean>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment