Java Code Examples for org.apache.ignite.configuration.IgniteConfiguration#setAutoActivationEnabled()
The following examples show how to use
org.apache.ignite.configuration.IgniteConfiguration#setAutoActivationEnabled() .
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: IgniteDynamicSqlRestoreTest.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.setAutoActivationEnabled(false); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(200 * 1024 * 1024).setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY); cfg.setDataStorageConfiguration(memCfg); cfg.setConsistentId(gridName); return cfg; }
Example 2
Source File: IgniteAbstractStandByClientReconnectTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); cfg.setAutoActivationEnabled(false); if (!nodeClient.equals(name)) cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(vmIpFinder)); else { clientIpFinder.setAddresses(Collections.singletonList("127.0.0.1:47501")); cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(clientIpFinder)); } cfg.setDataStorageConfiguration(new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration() .setMaxSize(100L * 1024 * 1024) .setPersistenceEnabled(true))); cfg.setConsistentId(name); return cfg; }
Example 3
Source File: IgniteNodeStoppedDuringDisableWALTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); cfg.setDataStorageConfiguration( new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setPersistenceEnabled(true) ) ); cfg.setAutoActivationEnabled(false); cfg.setCacheConfiguration(defaultCacheConfiguration()); return cfg; }
Example 4
Source File: IgniteRebalanceScheduleResendPartitionsTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String name) throws Exception { IgniteConfiguration cfg = super.getConfiguration(name); cfg.setConsistentId(name); cfg.setAutoActivationEnabled(false); cfg.setDataStorageConfiguration( new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setPersistenceEnabled(true) .setMaxSize(DataStorageConfiguration.DFLT_DATA_REGION_INITIAL_SIZE) ) ); cfg.setCacheConfiguration( new CacheConfiguration(DEFAULT_CACHE_NAME) .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL) .setAffinity(new RendezvousAffinityFunction(false, 32)) .setBackups(1) ); cfg.setCommunicationSpi(new BlockTcpCommunicationSpi()); return cfg; }
Example 5
Source File: IgnitePersistentStoreDataStructuresTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); DataStorageConfiguration memCfg = new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(200 * 1024 * 1024).setPersistenceEnabled(true)) .setWalMode(WALMode.LOG_ONLY); cfg.setDataStorageConfiguration(memCfg); cfg.setAutoActivationEnabled(autoActivationEnabled); return cfg; }
Example 6
Source File: ClusterStateOnStartPropertyTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName) .setClusterStateOnStart(state) .setCacheConfiguration(new CacheConfiguration().setName(DEFAULT_CACHE_NAME)) .setConsistentId(igniteInstanceName) .setDataStorageConfiguration( new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration().setPersistenceEnabled(persistence) ) ); if (autoActivation != null) cfg.setAutoActivationEnabled(autoActivation); if (activeOnStart != null) cfg.setActiveOnStart(activeOnStart); // Warn messages must be printed only if both options (old and new) are presented. if (autoActivation != null || activeOnStart != null) { ListeningTestLogger testLog = new ListeningTestLogger(false, log); LogListener lsnr = LogListener.matches( persistence ? "Property `autoActivation` will be ignored due to the property `clusterStateOnStart` is presented." : "Property `activeOnStart` will be ignored due to the property `clusterStateOnStart` is presented." ).build(); testLog.registerListener(lsnr); logListeners.put(igniteInstanceName, lsnr); cfg.setGridLogger(testLog); } return cfg; }
Example 7
Source File: TxPartitionCounterStateAbstractTest.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.setActiveOnStart(false); cfg.setAutoActivationEnabled(false); cfg.setConsistentId("node" + igniteInstanceName); cfg.setFailureHandler(new StopNodeFailureHandler()); cfg.setRebalanceThreadPoolSize(4); // Necessary to reproduce some issues. ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER); // TODO set this only for historical rebalance tests. cfg.setCommunicationSpi(new IgniteWalRebalanceTest.WalRebalanceCheckingCommunicationSpi()); cfg.setDataStorageConfiguration(new DataStorageConfiguration(). setWalHistorySize(1000). setWalSegmentSize(8 * MB).setWalMode(LOG_ONLY).setPageSize(1024). setCheckpointFrequency(MILLISECONDS.convert(365, DAYS)). setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(persistenceEnabled()). setInitialSize(100 * MB).setMaxSize(100 * MB))); if (!igniteInstanceName.startsWith(CLIENT_GRID_NAME)) cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME)); return cfg; }
Example 8
Source File: CacheBaselineTopologyTest.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.setConsistentId(igniteInstanceName); if (disableAutoActivation) cfg.setAutoActivationEnabled(false); cfg.setDataStorageConfiguration( new DataStorageConfiguration().setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setPersistenceEnabled(true) .setMaxSize(100L * 1024 * 1024) .setInitialSize(100L * 1024 * 1024) ) .setDataRegionConfigurations( new DataRegionConfiguration() .setName("memory") .setPersistenceEnabled(false) .setMaxSize(100L * 1024 * 1024) .setInitialSize(100L * 1024 * 1024) ) .setWalMode(WALMode.LOG_ONLY) ); if (userAttrs != null) cfg.setUserAttributes(userAttrs); return cfg; }
Example 9
Source File: TcpDiscoveryReconnectUnstableTopologyTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setAutoActivationEnabled(false); BlockTcpDiscoverySpi spi = new BlockTcpDiscoverySpi(); // Guarantees client join to srv2. Field rndAddrsField = U.findField(BlockTcpDiscoverySpi.class, "skipAddrsRandomization"); assertNotNull(rndAddrsField); rndAddrsField.set(spi, true); cfg.setDiscoverySpi(spi.setIpFinder(ipFinder)); cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME)); return cfg; }
Example 10
Source File: IgniteChangeGlobalStateAbstractTest.java From ignite with Apache License 2.0 | 4 votes |
/** * @param idx Index. * @throws Exception If failed. */ void startBackUp(int idx) throws Exception { String node = "node" + idx; String name = node + backUpSuffix; IgniteConfiguration cfg = getConfiguration(name); cfg.setConsistentId(node); cfg.setAutoActivationEnabled(false); ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(backUpIpFinder); Ignite ig = startGrid(name, cfg); nodes.put(name, ig); }