/** * @param relativePath {@code True} - if wal archive path should be relative, {@code false} - for absolute path. * @return Ignite configuration with the same path to wal store and wal archive. * @throws Exception If failed. */ private IgniteConfiguration getConfig(boolean relativePath) throws Exception { IgniteConfiguration cfg = getConfiguration(); DataStorageConfiguration dsCfg = new DataStorageConfiguration(); dsCfg.setDefaultDataRegionConfiguration(new DataRegionConfiguration() .setPersistenceEnabled(true) .setMaxSize(200 * 1024 * 1024)); walDir = new File(U.defaultWorkDirectory(), getClass().getSimpleName()); dsCfg.setWalPath(walDir.getAbsolutePath()); dsCfg.setWalArchivePath(relativePath ? getClass().getSimpleName() : walDir.getAbsolutePath()); cfg.setDataStorageConfiguration(dsCfg); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { final IgniteConfiguration cfg = super.getConfiguration(gridName); if (configuredConsistentId != null) cfg.setConsistentId(configuredConsistentId); final DataStorageConfiguration dsCfg = new DataStorageConfiguration(); if (placeStorageInTemp) { final File tempDir = new File(System.getProperty("java.io.tmpdir")); pstStoreCustomPath = new File(tempDir, "Store"); pstWalStoreCustomPath = new File(tempDir, "WalStore"); pstWalArchCustomPath = new File(tempDir, "WalArchive"); dsCfg.setStoragePath(pstStoreCustomPath.getAbsolutePath()); dsCfg.setWalPath(pstWalStoreCustomPath.getAbsolutePath()); dsCfg.setWalArchivePath(pstWalArchCustomPath.getAbsolutePath()); } dsCfg.setDefaultDataRegionConfiguration(new DataRegionConfiguration() .setMaxSize(32L * 1024 * 1024) .setPersistenceEnabled(true)); cfg.setDataStorageConfiguration(dsCfg); if (strLog != null) cfg.setGridLogger(strLog); return cfg; }
cfg.getDataStorageConfiguration().setWalArchivePath(new File(store, FLAKY_WAL_ARCHIVE_PATH).getAbsolutePath()); cfg.getDataStorageConfiguration().setStoragePath(new File(store, FLAKY_STORAGE_PATH).getAbsolutePath());
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); cfg.setConsistentId(name); String storePath = getClass().getSimpleName().toLowerCase() + "/" + getName(); cfg.setDataStorageConfiguration( new DataStorageConfiguration() .setWalMode(WALMode.LOG_ONLY) .setStoragePath(storePath) .setWalPath(storePath + "/wal") .setWalArchivePath(storePath + "/archive") .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setPersistenceEnabled(true) .setMaxSize(2L * 1024 * 1024 * 1024) ) ); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); cfg.setDataStorageConfiguration(new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)) .setWalMode(FSYNC) .setWalArchivePath(DFLT_WAL_PATH)); return cfg; }
dsCfg.setWalArchivePath(walAbsPath); dsCfg.setWalArchivePath(new File(wal, "archive").getAbsolutePath());
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); cfg.setDataStorageConfiguration(new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration() .setPersistenceEnabled(true) .setMaxSize(20 * 1024 * 1024)) .setWalMode(walMode) .setWalArchivePath(disableWALArchiving ? DFLT_WAL_PATH : DFLT_WAL_ARCHIVE_PATH) .setWalSegmentSize(4 * 1024 * 1024)) .setCheckpointSpi(new NoopCheckpointSpi()) ; return cfg; }
@Override protected IgniteConfiguration prepareIgniteConfiguration() { IgniteConfiguration cfg = super.prepareIgniteConfiguration(); cfg.setDataStorageConfiguration( new DataStorageConfiguration() .setWalSegmentSize(SEGMENT_SIZE) .setWalRecordIteratorBufferSize(SEGMENT_SIZE / 2) .setWalMode(WALMode.FSYNC) .setWalPath(workDir + WORK_SUB_DIR) .setWalArchivePath(workDir + ARCHIVE_SUB_DIR) .setFileIOFactory(new RandomAccessFileIOFactory()) ); cfg.setEventStorageSpi(new NoopEventStorageSpi()); return cfg; }
dsCfg.setWalArchivePath(walAbsPath); dsCfg.setWalArchivePath(new File(wal, "archive").getAbsolutePath());
dsCfg.setMetricsSubIntervalCount(psCfg.getSubIntervals()); dsCfg.setWalThreadLocalBufferSize(psCfg.getTlbSize()); dsCfg.setWalArchivePath(psCfg.getWalArchivePath()); dsCfg.setWalAutoArchiveAfterInactivity(psCfg.getWalAutoArchiveAfterInactivity()); dsCfg.setWalFlushFrequency(psCfg.getWalFlushFrequency());
/** {@inheritDoc} */ @SuppressWarnings("deprecation") @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName, IgniteTestResources rsrcs) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName, rsrcs); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(300L * 1024 * 1024).setPersistenceEnabled(true)) .setStoragePath(workSubdir() + "/db") .setWalArchivePath(workSubdir() + "/db/wal/archive") .setWalPath(workSubdir() + "/db/wal") .setWalMode(WALMode.LOG_ONLY); cfg.setDataStorageConfiguration(memCfg); cfg.setMarshaller(new OptimizedMarshaller()); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setConsistentId("ConsId" + (condId++)); ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(primaryIpFinder); DataStorageConfiguration pCfg = new DataStorageConfiguration(); pCfg.setStoragePath(testName + "/db"); pCfg.setWalArchivePath(testName + "/db/wal/archive"); pCfg.setWalPath(testName + "/db/wal"); pCfg.setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(200L * 1024 * 1024).setPersistenceEnabled(true)); pCfg.setWalMode(WALMode.LOG_ONLY); pCfg.setPageSize(1024); pCfg.setConcurrencyLevel(64); cfg.setDataStorageConfiguration(pCfg); return cfg; }
/** * @param gridName Grid name. */ @Override protected IgniteConfiguration getConfiguration(final String gridName) throws Exception { final IgniteConfiguration cfg = super.getConfiguration(gridName); DataStorageConfiguration pCfg = new DataStorageConfiguration(); pCfg.setStoragePath(testName() + "/db"); pCfg.setWalArchivePath(testName() + "/db/wal/archive"); pCfg.setWalPath(testName() + "/db/wal"); pCfg.setPageSize(1024); pCfg.setConcurrencyLevel(64); pCfg.setWalMode(WALMode.LOG_ONLY); pCfg.setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(200L * 1024 * 1024).setPersistenceEnabled(true)); cfg.setDataStorageConfiguration(pCfg); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); cfg.setConsistentId(name); cfg.setDataStorageConfiguration( new DataStorageConfiguration() .setWalPath(walPath(name)) .setWalArchivePath(walArchivePath(name)) .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setMaxSize(DataStorageConfiguration.DFLT_DATA_REGION_INITIAL_SIZE) .setPersistenceEnabled(true) ) ); cfg.setCacheConfiguration( new CacheConfiguration(DEFAULT_CACHE_NAME) .setAtomicityMode(atomicityMode) .setAffinity(new RendezvousAffinityFunction(false, 3)) ); return cfg; }
.setWalSegmentSize(in.readInt()) .setWalPath(in.readString()) .setWalArchivePath(in.readString()) .setWalMode(WALMode.fromOrdinal(in.readInt())) .setWalThreadLocalBufferSize(in.readInt())
dsCfg.setMetricsSubIntervalCount(psCfg.getSubIntervals()); dsCfg.setWalThreadLocalBufferSize(psCfg.getTlbSize()); dsCfg.setWalArchivePath(psCfg.getWalArchivePath()); dsCfg.setWalAutoArchiveAfterInactivity(psCfg.getWalAutoArchiveAfterInactivity()); dsCfg.setWalFlushFrequency(psCfg.getWalFlushFrequency());
.setWalSegmentSize(in.readInt()) .setWalPath(in.readString()) .setWalArchivePath(in.readString()) .setWalMode(WALMode.fromOrdinal(in.readInt())) .setWalThreadLocalBufferSize(in.readInt())