Giriş
Bu bean IgniteConfiguration bean'inin dataStorageProperty alanına denk gelir.
defaultDataRegionConfiguration Alanı
Örnek
Şöyle yaparız
<dataStorageConfiguration>
<defaultDataRegionConfiguration
name="Default_Region"
initialSize="104857600"/> <!-- 100*1024*1024 -->
<dataRegionConfigurations>
<dataRegionConfiguration
name="My_Region"
initialSize="104857600"
persistenceEnabled="true"
metricsEnabled="true" />
</dataRegionConfigurations>
</dataStorageConfiguration>
defaultDataRegionConfiguration Alanı
Ne kadar bellek kullanacağını ve persistence kullanılıp kullanılmayacağını belirtiriz.
ÖrnekŞöyle yaparız
<!-- Memory configuration. -->
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<!-- max RAM size -->
<property name="maxSize" value="#{150 * 1024 * 1024}"/>
<!-- memory metrics -->
<property name="metricsEnabled" value="true"/>
<!-- Enabling persistence. -->
<property name="persistenceEnabled" value="true"/>
</bean>
</property>
<!-- persistence metrics -->
<property name="metricsEnabled" value="true"/>
</bean>
</property>
wal Ayarları
- walMode
- walSegmentSize
- writeThrottlingEnabled
- walPath
- walArchivePath
gibi bir sürü ayar yapılabilir.
walMode Alanı
FSYNC değeri alabilir
ÖrnekŞöyle yaparız
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="metricsEnabled" value="true"/>
<property name="walMode" value="FSYNC"/>
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="persistenceEnabled" value="true"/>
<property name="metricsEnabled" value="true"/>
</bean>
</property>
<property name="walPath" value="/gridgain-dev/wal"/>
<property name="walArchivePath" value="/gridgain-dev/walarchive"/>
</bean>
Örnek
Şöyle yaparız
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<!-- set the size of wal segments to 128MB -->
<property name="walSegmentSize" value="#{128 * 1024 * 1024}"/>
<property name="writeThrottlingEnabled" value="true"/>
<!-- Set the page size to 8 KB -->
<property name="pageSize" value="#{8 * 1024}"/>
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="Default_Region"/>
<!-- Memory region of 20 MB initial size. -->
<property name="initialSize" value="#{20 * 1024 * 1024}"/>
<!-- Memory region of 8 GB max size. -->
<property name="maxSize" value="#{8L * 1024 * 1024 * 1024}"/>
<!-- Enabling eviction for this memory region. -->
<property name="pageEvictionMode" value="RANDOM_2_LRU"/>
<property name="persistenceEnabled" value="true"/>
<!-- Increasing the buffer size to 1 GB. -->
<property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
</bean>
</property>
<property name="walPath" value="/gridgain/wal"/>
<property name="walArchivePath" value="/gridgain/walarchive"/>
</bean>
</property>
Hiç yorum yok:
Yorum Gönder