26 Ekim 2021 Salı

XML DataStorageConfiguration Bean

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>
walSegmentSize Alanı
Ö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

Ignite Transaction Kullanımı

Giriş Bir tablo 3 tane atomicity değerinden birisine sahip olabilir. 1. ATOMIC 2. TRANSACTIONAL 3. TRANSACTIONAL_SNAPSHOT ATOMIC Açıklaması ...