Java Code Examples for org.apache.ignite.configuration.DataStorageConfiguration#setDataRegionConfigurations()
The following examples show how to use
org.apache.ignite.configuration.DataStorageConfiguration#setDataRegionConfigurations() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CacheDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 6 votes |
/** * Verifies that {@link IgniteCheckedException} is thrown when swap and persistence are enabled at the same time * for a data region. */ @Test public void testSetPersistenceAndSwap() { DataRegionConfiguration invCfg = new DataRegionConfiguration(); invCfg.setName("invCfg"); invCfg.setInitialSize(DFLT_MEM_PLC_SIZE); invCfg.setMaxSize(DFLT_MEM_PLC_SIZE); // Enabling the persistence. invCfg.setPersistenceEnabled(true); // Enabling the swap space. invCfg.setSwapPath("/path/to/some/directory"); memCfg = new DataStorageConfiguration(); memCfg.setDataRegionConfigurations(invCfg); ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setDataRegionName("ccfg"); checkStartGridException(IgniteCheckedException.class, "Failed to start processor: GridProcessorAdapter []"); }
Example 2
Source File: BaselineAutoAdjustTest.java From ignite with Apache License 2.0 | 6 votes |
/** * @throws Exception if failed. */ private IgniteConfiguration persistentRegionConfiguration(int id) throws Exception { IgniteConfiguration conf = getConfiguration(getTestIgniteInstanceName(id)); DataStorageConfiguration storageCfg = new DataStorageConfiguration(); storageCfg.getDefaultDataRegionConfiguration() .setPersistenceEnabled(false) .setMaxSize(500L * 1024 * 1024); storageCfg.setDataRegionConfigurations(new DataRegionConfiguration() .setName("PersistentRegion") .setPersistenceEnabled(true) .setMaxSize(500L * 1024 * 1024)); conf.setDataStorageConfiguration(storageCfg); return conf; }
Example 3
Source File: CacheDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 6 votes |
/** * Verifies that {@link IgniteCheckedException} is thrown when page eviction threshold is less than 0.5. */ @Test public void testSetSmallInvalidEviction() { final double SMALL_EVICTION_THRESHOLD = 0.1D; DataRegionConfiguration invCfg = new DataRegionConfiguration(); invCfg.setName("invCfg"); invCfg.setInitialSize(DFLT_MEM_PLC_SIZE); invCfg.setMaxSize(DFLT_MEM_PLC_SIZE); invCfg.setPageEvictionMode(DataPageEvictionMode.RANDOM_LRU); // Setting the page eviction threshold less than 0.5 invCfg.setEvictionThreshold(SMALL_EVICTION_THRESHOLD); memCfg = new DataStorageConfiguration(); memCfg.setDataRegionConfigurations(invCfg); ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); checkStartGridException(IgniteCheckedException.class, "Failed to start processor: GridProcessorAdapter []"); }
Example 4
Source File: CacheDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 6 votes |
/** * Verifies that {@link IgniteCheckedException} is thrown when page eviction threshold is greater than 0.999. */ @Test public void testSetBigInvalidEviction() { final double BIG_EVICTION_THRESHOLD = 1.0D; DataRegionConfiguration invCfg = new DataRegionConfiguration(); invCfg.setName("invCfg"); invCfg.setInitialSize(DFLT_MEM_PLC_SIZE); invCfg.setMaxSize(DFLT_MEM_PLC_SIZE); invCfg.setPageEvictionMode(DataPageEvictionMode.RANDOM_LRU); // Setting the page eviction threshold greater than 0.999 invCfg.setEvictionThreshold(BIG_EVICTION_THRESHOLD); memCfg = new DataStorageConfiguration(); memCfg.setDataRegionConfigurations(invCfg); ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); checkStartGridException(IgniteCheckedException.class, "Failed to start processor: GridProcessorAdapter []"); }
Example 5
Source File: CacheDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 6 votes |
/** * Verifies that {@link IgniteCheckedException} is thrown when empty pages pool size is less than 10 */ @Test public void testInvalidSmallEmptyPagesPoolSize() { final int SMALL_PAGES_POOL_SIZE = 5; DataRegionConfiguration invCfg = new DataRegionConfiguration(); invCfg.setName("invCfg"); invCfg.setInitialSize(DFLT_MEM_PLC_SIZE); invCfg.setMaxSize(DFLT_MEM_PLC_SIZE); invCfg.setPageEvictionMode(DataPageEvictionMode.RANDOM_LRU); // Setting the pages pool size less than 10 invCfg.setEmptyPagesPoolSize(SMALL_PAGES_POOL_SIZE); memCfg = new DataStorageConfiguration(); memCfg.setDataRegionConfigurations(invCfg); ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); checkStartGridException(IgniteCheckedException.class, "Failed to start processor: GridProcessorAdapter []"); }
Example 6
Source File: BaselineAutoAdjustTest.java From ignite with Apache License 2.0 | 6 votes |
/** * @throws Exception if failed. */ private IgniteConfiguration inMemoryConfiguration(int id) throws Exception { IgniteConfiguration conf = getConfiguration(getTestIgniteInstanceName(id)); DataStorageConfiguration storageCfg = new DataStorageConfiguration(); storageCfg.getDefaultDataRegionConfiguration() .setPersistenceEnabled(false) .setMaxSize(500L * 1024 * 1024); storageCfg.setDataRegionConfigurations(new DataRegionConfiguration() .setName("InMemoryRegion") .setPersistenceEnabled(false) .setMaxSize(500L * 1024 * 1024)); conf.setDataStorageConfiguration(storageCfg); return conf; }
Example 7
Source File: CacheDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 6 votes |
/** * Verifies that {@link IgniteCheckedException} is thrown when IgniteCheckedException if validation of * memory metrics properties fails. Metrics rate time interval must not be less than 1000ms. */ @Test public void testInvalidMetricsProperties() { final long SMALL_RATE_TIME_INTERVAL_MS = 999; DataRegionConfiguration invCfg = new DataRegionConfiguration(); invCfg.setName("invCfg"); invCfg.setInitialSize(DFLT_MEM_PLC_SIZE); invCfg.setMaxSize(DFLT_MEM_PLC_SIZE); invCfg.setPageEvictionMode(DataPageEvictionMode.RANDOM_LRU); // Setting the metrics rate time less then 1000ms invCfg.setMetricsRateTimeInterval(SMALL_RATE_TIME_INTERVAL_MS); memCfg = new DataStorageConfiguration(); memCfg.setDataRegionConfigurations(invCfg); ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); checkStartGridException(IgniteCheckedException.class, "Failed to start processor: GridProcessorAdapter []"); }
Example 8
Source File: CacheDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 6 votes |
/** * Verifies that {@link IgniteCheckedException} is thrown when IgniteCheckedException if validation of * memory metrics properties fails. Metrics sub interval count must be positive. */ @Test public void testInvalidSubIntervalCount() { final int NEG_SUB_INTERVAL_COUNT = -1000; DataRegionConfiguration invCfg = new DataRegionConfiguration(); invCfg.setName("invCfg"); invCfg.setInitialSize(DFLT_MEM_PLC_SIZE); invCfg.setMaxSize(DFLT_MEM_PLC_SIZE); invCfg.setPageEvictionMode(DataPageEvictionMode.RANDOM_LRU); // Setting the metrics sub interval count as negative invCfg.setMetricsSubIntervalCount(NEG_SUB_INTERVAL_COUNT); memCfg = new DataStorageConfiguration(); memCfg.setDataRegionConfigurations(invCfg); ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); checkStartGridException(IgniteCheckedException.class, "Failed to start processor: GridProcessorAdapter []"); }
Example 9
Source File: CacheWithDifferentDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 6 votes |
/** Start node from builder */ public IgniteEx start() throws Exception { IgniteConfiguration cfg = getConfiguration(gridName); cfg.setConsistentId(gridName); DataStorageConfiguration storageCfg = new DataStorageConfiguration(); storageCfg.setDataRegionConfigurations(regions.toArray(new DataRegionConfiguration[regions.size()])); cfg.setDataStorageConfiguration(storageCfg); if (dfltRegionConfiguration != null) storageCfg.setDefaultDataRegionConfiguration(dfltRegionConfiguration); cfg.setCacheConfiguration(caches.toArray(new CacheConfiguration[caches.size()])); return startGrid(cfg); }
Example 10
Source File: IgnitePdsCacheRestoreTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); if (ccfgs != null) { cfg.setCacheConfiguration(ccfgs); ccfgs = null; } long regionMaxSize = 20L * 1024 * 1024; DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(regionMaxSize).setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY); memCfg.setDataRegionConfigurations(new DataRegionConfiguration() .setMaxSize(regionMaxSize) .setName(NO_PERSISTENCE_REGION) .setPersistenceEnabled(false)); cfg.setDataStorageConfiguration(memCfg); return cfg; }
Example 11
Source File: JettyRestProcessorAuthenticationAbstractTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setAuthenticationEnabled(true); // For now persistence is needed because of current authentication implementation. DataStorageConfiguration dsCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration() .setMaxSize(100 * 1024 * 1024)) .setWalMode(NONE); DataRegionConfiguration testDataRegionCfg = new DataRegionConfiguration(); testDataRegionCfg.setName("testDataRegion"); testDataRegionCfg.setMaxSize(10 * 1024 * 1024); DataRegionConfiguration authDataRegionCfg = new DataRegionConfiguration(); authDataRegionCfg.setName("authDataRegion") .setMaxSize(10 * 1024 * 1024) .setPersistenceEnabled(true); dsCfg.setDataRegionConfigurations(testDataRegionCfg, authDataRegionCfg); cfg.setDataStorageConfiguration(dsCfg); return cfg; }
Example 12
Source File: EncryptedCacheCreateTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); DataStorageConfiguration memCfg = cfg.getDataStorageConfiguration(); memCfg.setDataRegionConfigurations(new DataRegionConfiguration() .setMaxSize(10L * 1024 * 1024) .setName(NO_PERSISTENCE_REGION) .setPersistenceEnabled(false)); return cfg; }
Example 13
Source File: WalModeChangeCommonAbstractSelfTest.java From ignite with Apache License 2.0 | 5 votes |
/** * Create node configuration. * * @param name Name. * @param cli Client flag. * @param filter Whether node should be filtered out. * @return Node configuration. */ protected IgniteConfiguration config(String name, boolean cli, boolean filter) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); cfg.setIgniteInstanceName(name); cfg.setClientMode(cli); cfg.setLocalHost("127.0.0.1"); DataRegionConfiguration regionCfg = new DataRegionConfiguration() .setPersistenceEnabled(true) .setMaxSize(DataStorageConfiguration.DFLT_DATA_REGION_INITIAL_SIZE); DataRegionConfiguration volatileRegionCfg = new DataRegionConfiguration().setName(REGION_VOLATILE) .setPersistenceEnabled(false); DataStorageConfiguration storageCfg = new DataStorageConfiguration(); storageCfg.setDefaultDataRegionConfiguration(regionCfg); storageCfg.setDataRegionConfigurations(volatileRegionCfg); cfg.setDataStorageConfiguration(storageCfg); if (filter) cfg.setUserAttributes(Collections.singletonMap(FILTER_ATTR, true)); return cfg; }
Example 14
Source File: IgnitePdsExchangeDuringCheckpointTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(800L * 1024 * 1024).setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY) .setCheckpointThreads(1) .setCheckpointFrequency(1); memCfg.setDataRegionConfigurations(new DataRegionConfiguration() .setMaxSize(200L * 1024 * 1024) .setName(NO_PERSISTENCE_REGION) .setPersistenceEnabled(false)); cfg.setDataStorageConfiguration(memCfg); CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); CacheConfiguration ccfgNp = new CacheConfiguration("nonPersistentCache"); ccfgNp.setDataRegionName(NO_PERSISTENCE_REGION); ccfgNp.setDiskPageCompression(null); ccfg.setAffinity(new RendezvousAffinityFunction(false, 4096)); cfg.setCacheConfiguration(ccfg, ccfgNp); return cfg; }
Example 15
Source File: CacheDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 5 votes |
/** * Verifies that {@link IgniteCheckedException} is thrown when empty pages pool size is greater than * DataRegionConfiguration.getMaxSize() / DataStorageConfiguration.getPageSize() / 10. */ @Test public void testInvalidBigEmptyPagesPoolSize() { final int DFLT_PAGE_SIZE = 1024; long expectedMaxPoolSize; DataRegionConfiguration invCfg = new DataRegionConfiguration(); invCfg.setName("invCfg"); invCfg.setInitialSize(DFLT_MEM_PLC_SIZE); invCfg.setMaxSize(DFLT_MEM_PLC_SIZE); invCfg.setPageEvictionMode(DataPageEvictionMode.RANDOM_LRU); memCfg = new DataStorageConfiguration(); memCfg.setDataRegionConfigurations(invCfg); memCfg.setPageSize(DFLT_PAGE_SIZE); ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); expectedMaxPoolSize = invCfg.getMaxSize() / memCfg.getPageSize() / 10; if (expectedMaxPoolSize < Integer.MAX_VALUE) { // Setting the empty pages pool size greater than // DataRegionConfiguration.getMaxSize() / DataStorageConfiguration.getPageSize() / 10 invCfg.setEmptyPagesPoolSize((int)expectedMaxPoolSize + 1); memCfg.setDataRegionConfigurations(invCfg); checkStartGridException(IgniteCheckedException.class, "Failed to start processor: GridProcessorAdapter []"); } }
Example 16
Source File: IgniteTwoRegionsRebuildIndexTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); boolean client = igniteInstanceName.startsWith("client"); DataStorageConfiguration dsCfg = new DataStorageConfiguration(); if (!client) { DataRegionConfiguration drCfg1 = new DataRegionConfiguration(); drCfg1.setMaxSize(16 * 1024 * 1024); drCfg1.setName("nopersistence"); drCfg1.setInitialSize(drCfg1.getMaxSize()); drCfg1.setPersistenceEnabled(false); DataRegionConfiguration drCfg2 = new DataRegionConfiguration(); drCfg2.setMaxSize(16 * 1024 * 1024); drCfg2.setName("persistence"); drCfg2.setInitialSize(drCfg2.getMaxSize()); drCfg2.setPersistenceEnabled(true); dsCfg.setDataRegionConfigurations(drCfg1, drCfg2); cfg.setDataStorageConfiguration(dsCfg); } else { CacheConfiguration ccfg1 = new CacheConfiguration(PERSISTED_CACHE); CacheConfiguration ccfg2 = new CacheConfiguration(INMEMORY_CACHE); ccfg1.setDataRegionName("persistence"); ccfg2.setDataRegionName("nopersistence"); cfg.setCacheConfiguration(ccfg1, ccfg2); } return cfg; }
Example 17
Source File: CacheDataRegionConfigurationTest.java From ignite with Apache License 2.0 | 4 votes |
/** * Verifies that warning message is printed to the logs if user tries to start a dynamic cache in data region which * overhead (e.g. metapages for partitions) occupies more space of the region than a defined threshold. * * @throws Exception If failed. */ @Test public void testWarningIfDynamicCacheOverheadExceedsThreshold() throws Exception { String filteredSrvName = "srv2"; int numOfPartitions = 512; int partitionsMetaMemoryChunk = U.sizeInMegabytes(512 * DFLT_PAGE_SIZE); DataRegionConfiguration smallRegionCfg = new DataRegionConfiguration(); smallRegionCfg.setName("smallRegion"); smallRegionCfg.setInitialSize(DFLT_MEM_PLC_SIZE); smallRegionCfg.setMaxSize(DFLT_MEM_PLC_SIZE); smallRegionCfg.setPersistenceEnabled(true); //explicit default data region configuration to test possible NPE case DataRegionConfiguration defaultRegionCfg = new DataRegionConfiguration(); defaultRegionCfg.setName("defaultRegion"); defaultRegionCfg.setInitialSize(DFLT_MEM_PLC_SIZE); defaultRegionCfg.setMaxSize(DFLT_MEM_PLC_SIZE); defaultRegionCfg.setPersistenceEnabled(true); memCfg = new DataStorageConfiguration(); memCfg.setDefaultDataRegionConfiguration(defaultRegionCfg); memCfg.setDataRegionConfigurations(smallRegionCfg); //one hour to guarantee that checkpoint will be triggered by 'dirty pages amount' trigger memCfg.setCheckpointFrequency(60 * 60 * 1000); ListeningTestLogger srv0Logger = new ListeningTestLogger(false, null); LogListener cacheGrpLsnr0 = matches("Cache group 'default' brings high overhead").build(); LogListener dataRegLsnr0 = matches("metainformation in data region 'defaultRegion'").build(); LogListener partsInfoLsnr0 = matches(numOfPartitions + " partitions, " + DFLT_PAGE_SIZE + " bytes per partition, " + partitionsMetaMemoryChunk + " MBs total").build(); srv0Logger.registerAllListeners(cacheGrpLsnr0, dataRegLsnr0, partsInfoLsnr0); logger = srv0Logger; IgniteEx ignite0 = startGrid("srv0"); ListeningTestLogger srv1Logger = new ListeningTestLogger(false, null); LogListener cacheGrpLsnr1 = matches("Cache group 'default' brings high overhead").build(); LogListener dataRegLsnr1 = matches("metainformation in data region 'defaultRegion'").build(); LogListener partsInfoLsnr1 = matches(numOfPartitions + " partitions, " + DFLT_PAGE_SIZE + " bytes per partition, " + partitionsMetaMemoryChunk + " MBs total").build(); srv1Logger.registerAllListeners(cacheGrpLsnr1, dataRegLsnr1, partsInfoLsnr1); logger = srv1Logger; startGrid("srv1"); ListeningTestLogger srv2Logger = new ListeningTestLogger(false, null); LogListener cacheGrpLsnr2 = matches("Cache group 'default' brings high overhead").build(); srv2Logger.registerListener(cacheGrpLsnr2); logger = srv2Logger; startGrid("srv2"); ignite0.cluster().active(true); IgniteEx cl = startGrid("client01"); CacheConfiguration<Object, Object> manyPartitionsCache = new CacheConfiguration<>(DEFAULT_CACHE_NAME); manyPartitionsCache.setAffinity(new RendezvousAffinityFunction(false, numOfPartitions)); manyPartitionsCache.setNodeFilter(new NodeNameNodeFilter(filteredSrvName)); manyPartitionsCache.setBackups(1); cl.createCache(manyPartitionsCache); //srv0 and srv1 print warning into the log as the threshold for cache in default cache group is broken assertTrue(cacheGrpLsnr0.check()); assertTrue(dataRegLsnr0.check()); assertTrue(partsInfoLsnr0.check()); assertTrue(cacheGrpLsnr1.check()); assertTrue(dataRegLsnr1.check()); assertTrue(partsInfoLsnr1.check()); //srv2 doesn't print the warning as it is filtered by node filter from affinity nodes assertFalse(cacheGrpLsnr2.check()); }
Example 18
Source File: GridCommandHandlerAbstractTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); if (atomicConfiguration != null) cfg.setAtomicConfiguration(atomicConfiguration); cfg.setCommunicationSpi(new TestRecordingCommunicationSpi()); cfg.setConnectorConfiguration(new ConnectorConfiguration().setSslEnabled(sslEnabled())); if (sslEnabled()) cfg.setSslContextFactory(GridTestUtils.sslFactory()); DataStorageConfiguration dsCfg = new DataStorageConfiguration() .setWalMode(WALMode.LOG_ONLY) .setCheckpointFrequency(checkpointFreq) .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(50L * 1024 * 1024).setPersistenceEnabled(persistent) ); if (dataRegionConfiguration != null) dsCfg.setDataRegionConfigurations(dataRegionConfiguration); cfg.setDataStorageConfiguration(dsCfg); cfg.setConsistentId(igniteInstanceName); cfg.setClientMode(igniteInstanceName.startsWith(CLIENT_NODE_NAME_PREFIX)); if (encriptionEnabled) { KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi(); encSpi.setKeyStorePath(KEYSTORE_PATH); encSpi.setKeyStorePassword(KEYSTORE_PASSWORD.toCharArray()); cfg.setEncryptionSpi(encSpi); } return cfg; }
Example 19
Source File: IgniteWalRecoveryPPCTest.java From ignite with Apache License 2.0 | 2 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); CacheConfiguration<Integer, IndexedObject> ccfg = new CacheConfiguration<>(CACHE_NAME_1); ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC); ccfg.setRebalanceMode(CacheRebalanceMode.SYNC); ccfg.setAffinity(new RendezvousAffinityFunction(false, 32)); cfg.setCacheConfiguration(ccfg); CacheConfiguration<Integer, IndexedObject> ccfg2 = new CacheConfiguration<>(CACHE_NAME_2); ccfg2.setAtomicityMode(CacheAtomicityMode.ATOMIC); ccfg2.setRebalanceMode(CacheRebalanceMode.SYNC); ccfg2.setAffinity(new RendezvousAffinityFunction(false, 32)); ccfg2.setDataRegionName(MEM_PLC_NO_PDS); cfg.setCacheConfiguration(ccfg, ccfg2); DataStorageConfiguration dbCfg = new DataStorageConfiguration(); dbCfg.setPageSize(4 * 1024); DataRegionConfiguration memPlcCfg = new DataRegionConfiguration(); memPlcCfg.setInitialSize(256L * 1024 * 1024); memPlcCfg.setMaxSize(256L * 1024 * 1024); memPlcCfg.setPersistenceEnabled(true); dbCfg.setDefaultDataRegionConfiguration(memPlcCfg); DataRegionConfiguration memPlcCfg2 = new DataRegionConfiguration(); memPlcCfg2.setName(MEM_PLC_NO_PDS); memPlcCfg2.setInitialSize(256L * 1024 * 1024); memPlcCfg2.setMaxSize(256L * 1024 * 1024); memPlcCfg2.setPersistenceEnabled(false); dbCfg.setDataRegionConfigurations(memPlcCfg2); dbCfg.setWalRecordIteratorBufferSize(1024 * 1024); dbCfg.setWalHistorySize(2); dbCfg.setWalMode(WALMode.LOG_ONLY); if (walSegmentSize != 0) dbCfg.setWalSegmentSize(walSegmentSize); cfg.setDataStorageConfiguration(dbCfg); cfg.setMarshaller(null); BinaryConfiguration binCfg = new BinaryConfiguration(); binCfg.setCompactFooter(false); cfg.setBinaryConfiguration(binCfg); return cfg; }