Search in sources :

Example 16 with DataRegionConfiguration

use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.

the class AuthenticationProcessorNodeRestartTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    if (getTestIgniteInstanceIndex(igniteInstanceName) == CLI_NODE)
        cfg.setClientMode(true);
    TcpDiscoverySpi spi = new TcpDiscoverySpi();
    spi.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(spi);
    cfg.setAuthenticationEnabled(true);
    cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)));
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 17 with DataRegionConfiguration

use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.

the class IgnitePdsCheckpointSimpleTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    DataRegionConfiguration regCfg = new DataRegionConfiguration().setPersistenceEnabled(true);
    DataStorageConfiguration dsCfg = new DataStorageConfiguration().setPageSize(4 * 1024).setDefaultDataRegionConfiguration(regCfg).setCheckpointFrequency(TimeUnit.SECONDS.toMillis(10));
    return cfg.setDataStorageConfiguration(dsCfg);
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration)

Example 18 with DataRegionConfiguration

use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.

the class IgnitePdsCheckpointSimulationWithRealCpDisabledTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);
    CacheConfiguration ccfg = new CacheConfiguration(cacheName);
    ccfg.setRebalanceMode(CacheRebalanceMode.NONE);
    cfg.setCacheConfiguration(ccfg);
    cfg.setDataStorageConfiguration(new DataStorageConfiguration().setCheckpointFrequency(500).setWalMode(WALMode.LOG_ONLY).setAlwaysWriteFullPages(true).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)));
    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
    discoSpi.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(discoSpi);
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 19 with DataRegionConfiguration

use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.

the class IgnitePdsThreadInterruptionTest method storageConfiguration.

/**
 * @return DataStorage configuration.
 */
private DataStorageConfiguration storageConfiguration() {
    DataRegionConfiguration regionCfg = new DataRegionConfiguration().setInitialSize(10L * 1024L * 1024L).setMaxSize(10L * 1024L * 1024L).setPageEvictionMode(DataPageEvictionMode.RANDOM_LRU);
    DataStorageConfiguration cfg = new DataStorageConfiguration().setWalMode(WALMode.LOG_ONLY).setWalFsyncDelayNanos(0).setPageSize(PAGE_SIZE).setFileIOFactory(new AsyncFileIOFactory());
    cfg.setDefaultDataRegionConfiguration(regionCfg);
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) AsyncFileIOFactory(org.apache.ignite.internal.processors.cache.persistence.file.AsyncFileIOFactory)

Example 20 with DataRegionConfiguration

use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.

the class IgniteUidAsConsistentIdMigrationTest method getConfiguration.

/**
 * {@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(32 * 1024 * 1024).setPersistenceEnabled(true));
    cfg.setDataStorageConfiguration(dsCfg);
    if (strLog != null)
        cfg.setGridLogger(strLog);
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) File(java.io.File)

Aggregations

DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)147 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)119 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)108 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)48 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)45 RendezvousAffinityFunction (org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction)33 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)16 DataRegionMetricsImpl (org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl)15 UnsafeMemoryProvider (org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider)10 PageMemory (org.apache.ignite.internal.pagemem.PageMemory)9 DirectMemoryProvider (org.apache.ignite.internal.mem.DirectMemoryProvider)8 File (java.io.File)7 PageMemoryNoStoreImpl (org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl)7 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)5 MappedFileMemoryProvider (org.apache.ignite.internal.mem.file.MappedFileMemoryProvider)5 FullPageId (org.apache.ignite.internal.pagemem.FullPageId)5 GridCacheSharedContext (org.apache.ignite.internal.processors.cache.GridCacheSharedContext)5 IgniteCacheDatabaseSharedManager (org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager)5 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)4 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)4