Java Code Examples for org.apache.ignite.configuration.IgniteConfiguration#setClusterStateOnStart()
The following examples show how to use
org.apache.ignite.configuration.IgniteConfiguration#setClusterStateOnStart() .
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: IgniteDynamicEnableIndexingRestoreTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setClusterStateOnStart(ClusterState.INACTIVE); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(200 * 1024 * 1024).setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY); cfg.setDataStorageConfiguration(memCfg); cfg.setConsistentId(gridName); cfg.setSqlSchemas(POI_SCHEMA_NAME, WRONG_SCHEMA_NAME); return cfg; }
Example 2
Source File: DynamicEnableIndexingAbstractTest.java From ignite with Apache License 2.0 | 6 votes |
/** */ protected IgniteConfiguration commonConfiguration(int idx) throws Exception { String gridName = getTestIgniteInstanceName(idx); IgniteConfiguration cfg = getConfiguration(gridName); cfg.setClusterStateOnStart(ClusterState.INACTIVE); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(128 * 1024 * 1024)); cfg.setDataStorageConfiguration(memCfg); cfg.setConsistentId(gridName); cfg.setSqlSchemas(POI_SCHEMA_NAME); return optimize(cfg); }
Example 3
Source File: ClusterRebalancedMetricTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @SuppressWarnings("rawtypes") @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setDataStorageConfiguration(new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration() .setPersistenceEnabled(persistenceEnabled))); cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME) .setBackups(1)); cfg.setCommunicationSpi(new TestRecordingCommunicationSpi()); cfg.setClusterStateOnStart(INACTIVE); return cfg; }
Example 4
Source File: GridExchangeFreeCellularSwitchAbstractTest.java From ignite with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); TestRecordingCommunicationSpi commSpi = new TestRecordingCommunicationSpi(); cfg.setCommunicationSpi(commSpi); cfg.setCacheConfiguration(cacheConfiguration()); cfg.setClusterStateOnStart(ClusterState.INACTIVE); DataStorageConfiguration dsCfg = new DataStorageConfiguration(); DataRegionConfiguration drCfg = new DataRegionConfiguration(); drCfg.setPersistenceEnabled(true); dsCfg.setDefaultDataRegionConfiguration(drCfg); cfg.setDataStorageConfiguration(dsCfg); cfg.setGridLogger(listeningLog); return cfg; }
Example 5
Source File: GridExchangeFreeSwitchTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); TestRecordingCommunicationSpi commSpi = new TestRecordingCommunicationSpi(); cfg.setCommunicationSpi(commSpi); cfg.setCacheConfiguration(cacheC != null ? cacheC.apply(igniteInstanceName) : new CacheConfiguration[] {cacheConfiguration()}); cfg.setClusterStateOnStart(ClusterState.INACTIVE); DataStorageConfiguration dsCfg = new DataStorageConfiguration(); DataRegionConfiguration drCfg = new DataRegionConfiguration(); drCfg.setPersistenceEnabled(persistence); dsCfg.setDefaultDataRegionConfiguration(drCfg); cfg.setDataStorageConfiguration(dsCfg); return cfg; }
Example 6
Source File: ClusterStateAbstractTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setClusterStateOnStart(INACTIVE); cfg.setCacheConfiguration(cacheConfiguration(CACHE_NAME)); return cfg; }
Example 7
Source File: IgnitePdsMultiNodePutGetRestartTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setClusterStateOnStart(ClusterState.INACTIVE); cfg.setConsistentId(gridName); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(100L * 1024 * 1024).setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY).setWalSegmentSize(4 * 1024 * 1024); cfg.setDataStorageConfiguration(memCfg); CacheConfiguration ccfg = new CacheConfiguration(CACHE_NAME); ccfg.setIndexedTypes(Integer.class, DbValue.class); ccfg.setRebalanceMode(CacheRebalanceMode.NONE); ccfg.setAffinity(new RendezvousAffinityFunction(false, 32)); ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cfg.setCacheConfiguration(ccfg); cfg.setMarshaller(null); BinaryConfiguration bCfg = new BinaryConfiguration(); bCfg.setCompactFooter(false); cfg.setBinaryConfiguration(bCfg); return cfg; }