当前位置: 首页>>代码示例>>Java>>正文


Java IgniteConfiguration.setDataStorageConfiguration方法代码示例

本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setDataStorageConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setDataStorageConfiguration方法的具体用法?Java IgniteConfiguration.setDataStorageConfiguration怎么用?Java IgniteConfiguration.setDataStorageConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.configuration.IgniteConfiguration的用法示例。


在下文中一共展示了IgniteConfiguration.setDataStorageConfiguration方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDataStorageConfiguration(
        new DataStorageConfiguration()
            .setDefaultDataRegionConfiguration(
                new DataRegionConfiguration()
                    .setPersistenceEnabled(true)
                    .setInitialSize(200 * 1024 * 1024)
                    .setMaxSize(200 * 1024 * 1024)
                    .setCheckpointPageBufferSize(200 * 1024 * 1024)
            )
    );

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:18,代码来源:IgniteChangingBaselineUpCachePutAllFailoverTest.java

示例2: apply

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void apply(IgniteConfiguration cfg) {
    cfg.setLocalHost("127.0.0.1");

    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(GridCacheAbstractFullApiSelfTest.LOCAL_IP_FINDER);

    cfg.setDiscoverySpi(disco);

    cfg.setPeerClassLoadingEnabled(false);

    DataStorageConfiguration memCfg = new DataStorageConfiguration()
        .setDefaultDataRegionConfiguration(
            new DataRegionConfiguration().setPersistenceEnabled(true))
        .setWalSegmentSize(WAL_SEGMENT_SIZE)
        .setWalMode(WALMode.LOG_ONLY)
        .setWalHistorySize(100);

    cfg.setDataStorageConfiguration(memCfg);
}
 
开发者ID:apache,项目名称:ignite,代码行数:21,代码来源:MigratingToWalV2SerializerWithCompactionTest.java

示例3: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    DataStorageConfiguration memCfg = new DataStorageConfiguration()
        .setDefaultDataRegionConfiguration(
            new DataRegionConfiguration().setMaxSize(400 * 1024 * 1024).setPersistenceEnabled(true))
        .setWalMode(WALMode.LOG_ONLY)
        .setCheckpointFrequency(checkpointDelay);

    cfg.setDataStorageConfiguration(memCfg);

    CacheConfiguration ccfg1 = new CacheConfiguration();

    ccfg1.setName(CACHE_NAME);
    ccfg1.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
    ccfg1.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
    ccfg1.setAffinity(new RendezvousAffinityFunction(false, 128));
    ccfg1.setBackups(2);

    cfg.setCacheConfiguration(ccfg1);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:25,代码来源:IgnitePdsContinuousRestartTest.java

示例4: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    cfg.setPublicThreadPoolSize(THREAD_COUNT);

    DataStorageConfiguration mem = new DataStorageConfiguration();

    mem.setPageSize(PAGE_SIZE);

    cfg.setDataStorageConfiguration(mem);

    CacheConfiguration[] ccfgs = new CacheConfiguration[CACHE_COUNT];

    for (int i = 0; i < CACHE_COUNT; ++i) {
        CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
        ccfg.setName(CACHE_PREFIX + i);
        ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
        ccfg.setCacheMode(CacheMode.PARTITIONED);
        ccfgs[i] = ccfg;
    }

    cfg.setCacheConfiguration(ccfgs);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:27,代码来源:LargeEntryUpdateTest.java

示例5: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDataStorageConfiguration(
        new DataStorageConfiguration()
            .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
                .setPersistenceEnabled(true)
                .setInitialSize(512 * 1024 * 1024)
                .setMaxSize(512 * 1024 * 1024)
                .setCheckpointPageBufferSize(512 * 1024 * 1024)
            )
    );

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:17,代码来源:IgniteStableBaselineCacheRemoveFailoverTest.java

示例6: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    cfg.setConsistentId(gridName);

    DataStorageConfiguration memCfg = new DataStorageConfiguration()
        .setDefaultDataRegionConfiguration(
            new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true))
        .setPageSize(1024)
        .setWalMode(WALMode.LOG_ONLY);

    cfg.setDataStorageConfiguration(memCfg);

    cfg.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(false));

    ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);

    if (ccfgs != null) {
        cfg.setCacheConfiguration(ccfgs);

        ccfgs = null;
    }

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:27,代码来源:IgnitePersistentStoreCacheGroupsTest.java

示例7: apply

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
@Override
public Ignite apply(ExtendedActorSystem system) {
    final IgniteProperties properties = igniteConfigProvider.apply(system);
    final IgniteConfiguration igniteConfiguration = new IgniteConfiguration();
    igniteConfiguration.setClientMode(properties.isClientNode());
    // durable file memory persistence
    if (properties.isEnableFilePersistence()) {
        DataStorageConfiguration persistentStoreConfiguration = new DataStorageConfiguration();
        persistentStoreConfiguration.setStoragePath(properties.getIgnitePersistenceFilePath() + "/data/store");
        persistentStoreConfiguration.setWalArchivePath(properties.getIgnitePersistenceFilePath() + "./data/walArchive");
        igniteConfiguration.setDataStorageConfiguration(persistentStoreConfiguration);
    }
    // connector configuration
    final ConnectorConfiguration connectorConfiguration = new ConnectorConfiguration();
    connectorConfiguration.setPort(properties.getIgniteConnectorPort());
    // common ignite configuration
    igniteConfiguration.setMetricsLogFrequency(properties.getMetricsLogFrequency());
    igniteConfiguration.setQueryThreadPoolSize(properties.getQueryThreadPoolSize());
    igniteConfiguration.setDataStreamerThreadPoolSize(properties.getDataStreamerThreadPoolSize());
    igniteConfiguration.setManagementThreadPoolSize(properties.getManagementThreadPoolSize());
    igniteConfiguration.setPublicThreadPoolSize(properties.getPublicThreadPoolSize());
    igniteConfiguration.setSystemThreadPoolSize(properties.getSystemThreadPoolSize());
    igniteConfiguration.setRebalanceThreadPoolSize(properties.getRebalanceThreadPoolSize());
    igniteConfiguration.setAsyncCallbackPoolSize(properties.getAsyncCallbackPoolSize());
    igniteConfiguration.setPeerClassLoadingEnabled(properties.isPeerClassLoadingEnabled());

    final BinaryConfiguration binaryConfiguration = new BinaryConfiguration();
    binaryConfiguration.setCompactFooter(false);
    igniteConfiguration.setBinaryConfiguration(binaryConfiguration);
    // cluster tcp configuration
    final TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();
    final TcpDiscoveryVmIpFinder tcpDiscoveryVmIpFinder = new TcpDiscoveryVmIpFinder();
    // need to be changed when it come to real cluster configuration
    tcpDiscoveryVmIpFinder.setAddresses(Arrays.asList(properties.getTcpDiscoveryAddresses() + properties.getIgniteServerPortRange()));
    tcpDiscoverySpi.setIpFinder(tcpDiscoveryVmIpFinder);
    igniteConfiguration.setDiscoverySpi(new TcpDiscoverySpi());
    final Ignite ignite = Ignition.start(igniteConfiguration);
    Runtime.getRuntime().addShutdownHook(new Thread(ignite::close));
    return ignite;
}
 
开发者ID:Romeh,项目名称:akka-persistance-ignite,代码行数:41,代码来源:IgniteFactoryByConfig.java

示例8: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    cfg.setCacheConfiguration(
        new CacheConfiguration()
            .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
            .setBackups(1)
            .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
            .setRebalanceMode(CacheRebalanceMode.SYNC)
    );

    DataStorageConfiguration memCfg = new DataStorageConfiguration()
        .setDefaultDataRegionConfiguration(
            new DataRegionConfiguration()
                .setMaxSize(100 * 1024 * 1024)
                .setPersistenceEnabled(true)
                .setSwapPath(DFLT_STORE_DIR))
        .setWalMode(WALMode.LOG_ONLY)
        .setPageSize(1024)
        .setConcurrencyLevel(Runtime.getRuntime().availableProcessors() * 4);

    cfg.setDataStorageConfiguration(memCfg);

    cfg.setDiscoverySpi(
        new TcpDiscoverySpi()
        .setIpFinder(IP_FINDER)
    );

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:32,代码来源:IgnitePdsRemoveDuringRebalancingTest.java

示例9: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDataStorageConfiguration(
        new DataStorageConfiguration()
            .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
                .setPersistenceEnabled(true)
                .setInitialSize(200 * 1024 * 1024)
                .setMaxSize(200 * 1024 * 1024)
                .setCheckpointPageBufferSize(200 * 1024 * 1024)
            )
    );

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:16,代码来源:IgniteChangingBaselineUpCacheRemoveFailoverTest.java

示例10: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);

    cfg.setConsistentId(gridName);

    DataStorageConfiguration memCfg = new DataStorageConfiguration()
        .setDefaultDataRegionConfiguration(
            new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true))
        .setPageSize(1024)
        .setWalMode(WALMode.LOG_ONLY);

    cfg.setDataStorageConfiguration(memCfg);

    CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);

    ccfg.setWriteSynchronizationMode(FULL_SYNC);
    ccfg.setAtomicityMode(TRANSACTIONAL);
    ccfg.setAffinity(new RendezvousAffinityFunction(false, 32));
    ccfg.setRebalanceMode(ASYNC);
    ccfg.setCacheMode(REPLICATED);

    cfg.setCacheConfiguration(ccfg);

    cfg.setIndexingSpi(new ErrorOnRebalanceIndexingSpi());

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:31,代码来源:IgniteErrorOnRebalanceTest.java

示例11: commonConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
 * Create common node configuration.
 *
 * @param idx Index.
 * @return Configuration.
 * @throws Exception If failed.
 */
private IgniteConfiguration commonConfiguration(int idx) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(getTestIgniteInstanceName(idx));

    DataRegionConfiguration dataRegionCfg = new DataRegionConfiguration().setName(DATA_REGION_NAME);

    cfg.setMarshaller(new BinaryMarshaller());
    cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDataRegionConfigurations(dataRegionCfg));

    return optimize(cfg);
}
 
开发者ID:apache,项目名称:ignite,代码行数:18,代码来源:H2DynamicTableSelfTest.java

示例12: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDataStorageConfiguration(new DataStorageConfiguration()
        .setDefaultDataRegionConfiguration(
            new DataRegionConfiguration()
                .setMaxSize(200 * 1024 * 1024)
                .setPersistenceEnabled(true)));

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:13,代码来源:IgniteBaselineAbstractFullApiSelfTest.java

示例13: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    CacheConfiguration ccfg = new CacheConfiguration(CACHE_NAME);

    ccfg.setCacheMode(PARTITIONED);
    ccfg.setAtomicityMode(ATOMIC);
    ccfg.setWriteSynchronizationMode(FULL_SYNC);
    ccfg.setBackups(1);

    cfg.setCacheConfiguration(ccfg);

    cfg.setClientMode(client);

    ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);

    DataStorageConfiguration memCfg = new DataStorageConfiguration();
    memCfg.setPageSize(16 * 1024);

    cfg.setDataStorageConfiguration(memCfg);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:25,代码来源:IgniteCacheContinuousQueryBackupQueueTest.java

示例14: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);

    cfg.setCacheConfiguration(cacheCfg(CACHE_NAME));

    DataStorageConfiguration pCfg = new DataStorageConfiguration();

    pCfg.setCheckpointFrequency(1000);

    cfg.setDataStorageConfiguration(pCfg);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:17,代码来源:IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest.java

示例15: getConfiguration

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);

    cfg.setCacheConfiguration(cacheCfg(TMPL_NAME));

    DataStorageConfiguration pCfg = new DataStorageConfiguration();

    pCfg.setDefaultDataRegionConfiguration(new DataRegionConfiguration()
        .setPersistenceEnabled(true)
        .setMaxSize(100 * 1024 * 1024));

    pCfg.setCheckpointFrequency(1000);

    cfg.setDataStorageConfiguration(pCfg);

    return cfg;
}
 
开发者ID:apache,项目名称:ignite,代码行数:21,代码来源:IgnitePersistentStoreSchemaLoadTest.java


注:本文中的org.apache.ignite.configuration.IgniteConfiguration.setDataStorageConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。