Here are the examples of the java api org.apache.ignite.configuration.IgniteConfiguration taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
155 Examples
19
View Complete Implementation : GridCacheAffinityRoutingBinarySelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
BinaryTypeConfiguration typeCfg = new BinaryTypeConfiguration();
typeCfg.setTypeName(AffinityTestKey.clreplaced.getName());
CacheKeyConfiguration keyCfg = new CacheKeyConfiguration(AffinityTestKey.clreplaced.getName(), "affKey");
cfg.setCacheKeyConfiguration(keyCfg);
BinaryConfiguration bCfg = new BinaryConfiguration();
bCfg.setTypeConfigurations(Collections.singleton(typeCfg));
cfg.setBinaryConfiguration(bCfg);
cfg.setMarshaller(new BinaryMarshaller());
return cfg;
}
19
View Complete Implementation : PartitionsExchangeOnDiscoveryHistoryOverflowTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
Map<IgnitePredicate<? extends Event>, int[]> map = new HashMap<>();
// To make parreplacedions exchanges longer.
map.put(new P1<Event>() {
@Override
public boolean apply(Event evt) {
try {
Thread.sleep(10);
} catch (InterruptedException e) {
// No op.
}
return false;
}
}, new int[] { EVT_NODE_JOINED, EVT_NODE_FAILED, EVT_NODE_LEFT, EVT_DISCOVERY_CUSTOM_EVT });
cfg.setLocalEventListeners(map);
return cfg;
}
19
View Complete Implementation : IgniteCacheAtomicMessageRecoveryPairedConnectionsTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpCommunicationSpi commSpi = (TcpCommunicationSpi) cfg.getCommunicationSpi();
replacedertFalse(commSpi.isUsePairedConnections());
commSpi.setUsePairedConnections(true);
return cfg;
}
19
View Complete Implementation : IgniteClientReconnectQueriesTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
CacheConfiguration<Integer, Person> ccfg = new CacheConfiguration<Integer, Person>(QUERY_CACHE).setCacheMode(PARreplacedIONED).setAtomicityMode(ATOMIC).setBackups(1).setIndexedTypes(Integer.clreplaced, Person.clreplaced);
cfg.setCacheConfiguration(ccfg);
return cfg;
}
19
View Complete Implementation : JmxExporterSpiTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)));
JmxMetricExporterSpi jmxSpi = new JmxMetricExporterSpi();
jmxSpi.setExportFilter(mgrp -> !mgrp.name().startsWith(FILTERED_PREFIX));
cfg.setMetricExporterSpi(jmxSpi);
cfg.setClientMode(igniteInstanceName.startsWith("client"));
return cfg;
}
18
View Complete Implementation : TcpClientDiscoveryUnresolvedHostTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
spi = new TestTcpDiscoverySpi();
cfg.setDiscoverySpi(spi.setJoinTimeout(5000).setIpFinder(new TcpDiscoveryVmIpFinder().setAddresses(Collections.singletonList("test:47500"))));
cfg.setCacheConfiguration();
cfg.setClientMode(true);
return cfg;
}
18
View Complete Implementation : GridCacheDhtLockBackupSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration());
cfg.setMarshaller(marsh);
replacedert commSpi != null;
cfg.setCommunicationSpi(commSpi);
return cfg;
}
18
View Complete Implementation : IgnitePdsWithTtlTest2.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
final IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(100L * 1024 * 1024).setPersistenceEnabled(true)));
cfg.setCacheConfiguration(getCacheConfiguration("cache_1"), getCacheConfiguration("cache_2"), getCacheConfiguration("cache_3"), getCacheConfiguration("cache_4"), getCacheConfiguration("cache_5"), getCacheConfiguration("cache_6"), getCacheConfiguration("cache_7"), getCacheConfiguration("cache_8"), getCacheConfiguration("cache_9"), getCacheConfiguration("cache_10"), getCacheConfiguration("cache_11"), getCacheConfiguration("cache_12"), getCacheConfiguration("cache_13"), getCacheConfiguration("cache_14"), getCacheConfiguration("cache_15"), getCacheConfiguration("cache_16"), getCacheConfiguration("cache_17"), getCacheConfiguration("cache_18"), getCacheConfiguration("cache_19"), getCacheConfiguration("cache_20"));
cfg.setFailureHandler(new CustomStopNodeOrHaltFailureHandler());
return cfg;
}
18
View Complete Implementation : TcpCommunicationSpiHalfOpenedConnectionTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (igniteInstanceName.contains("client")) {
cfg.setClientMode(true);
clientSpi = (TcpCommunicationSpi) cfg.getCommunicationSpi();
}
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setUsePairedConnections(pairedConnections);
return cfg;
}
18
View Complete Implementation : IgniteCacheClientNearCacheExpiryTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (igniteInstanceName.equals(getTestIgniteInstanceName(NODES - 1)))
cfg.setClientMode(true);
return cfg;
}
18
View Complete Implementation : CheckpointFreeListTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setConsistentId(igniteInstanceName);
DataStorageConfiguration storageCfg = new DataStorageConfiguration();
storageCfg.setCheckpointThreads(2);
storageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(300L * 1024 * 1024);
cfg.setDataStorageConfiguration(storageCfg).setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(IP_FINDER)).setCacheConfiguration(cacheConfiguration(CACHE_NAME, CacheAtomicityMode.TRANSACTIONAL));
return cfg;
}
18
View Complete Implementation : AuthenticationOnNotActiveClusterTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (getTestIgniteInstanceIndex(igniteInstanceName) == CLI_NODE)
cfg.setClientMode(true);
cfg.setAuthenticationEnabled(true);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(200L * 1024 * 1024).setPersistenceEnabled(true)));
return cfg;
}
18
View Complete Implementation : GridCacheAbstractLocalStoreSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
CacheConfiguration cacheCfg = cache(igniteInstanceName, DEFAULT_CACHE_NAME, 0);
cacheCfg.setAffinity(new RendezvousAffinityFunction());
CacheConfiguration cacheBackup1Cfg = cache(igniteInstanceName, BACKUP_CACHE_1, 1);
cacheBackup1Cfg.setAffinity(new RendezvousAffinityFunction());
CacheConfiguration cacheBackup2Cfg = cache(igniteInstanceName, BACKUP_CACHE_2, 2);
cacheBackup2Cfg.setAffinity(new RendezvousAffinityFunction());
cfg.setCacheConfiguration(cacheCfg, cacheBackup1Cfg, cacheBackup2Cfg);
cfg.setIncludeEventTypes(EventType.EVTS_ALL);
return cfg;
}
18
View Complete Implementation : GridTcpCommunicationSpiSkipWaitHandshakeOnClientTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setGridLogger(log);
cfg.setClientMode(client);
return cfg;
}
18
View Complete Implementation : FailureProcessorLoggingTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TestFailureHandler hnd = new TestFailureHandler(false);
testLog = new CustomTestLogger(false, log);
hnd.setIgnoredFailureTypes(ImmutableSet.of(FailureType.SYSTEM_CRITICAL_OPERATION_TIMEOUT, FailureType.SYSTEM_WORKER_BLOCKED));
cfg.setFailureHandler(hnd);
cfg.setGridLogger(testLog);
return cfg;
}
18
View Complete Implementation : P2PGridifySelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
// Override P2P configuration to exclude Task and Job clreplacedes
cfg.setPeerClreplacedLoadingLocalClreplacedPathExclude(GridP2PTestTask.clreplaced.getName(), GridP2PTestJob.clreplaced.getName());
cfg.setDeploymentMode(depMode);
return cfg;
}
18
View Complete Implementation : IgnitePdsCacheDestroyDuringCheckpointTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setDataStorageConfiguration(createDbConfig());
if (getTestIgniteInstanceIndex(gridName) == 1)
cfg.setClientMode(true);
return cfg;
}
18
View Complete Implementation : CacheContinuousBatchAckTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (igniteInstanceName.endsWith(CLIENT)) {
cfg.setClientMode(true);
cfg.setCommunicationSpi(new FailedTcpCommunicationSpi(true, false));
} else if (igniteInstanceName.endsWith(SERVER2))
cfg.setCommunicationSpi(new FailedTcpCommunicationSpi(false, true));
else
cfg.setCommunicationSpi(new FailedTcpCommunicationSpi(false, false));
return cfg;
}
18
View Complete Implementation : DataStreamProcessorMvccSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration igniteConfiguration = super.getConfiguration(igniteInstanceName);
CacheConfiguration[] ccfgs = igniteConfiguration.getCacheConfiguration();
if (ccfgs != null) {
for (CacheConfiguration ccfg : ccfgs) ccfg.setNearConfiguration(null);
}
replacedert ccfgs == null || ccfgs.length == 0 || (ccfgs.length == 1 && ccfgs[0].getAtomicityMode() == TRANSACTIONAL_SNAPSHOT);
return igniteConfiguration;
}
18
View Complete Implementation : ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setLocalHost("127.0.0.1");
replacedert cfg.getConnectorConfiguration() == null;
ConnectorConfiguration clientCfg = new ConnectorConfiguration();
clientCfg.setPort(PORT);
cfg.setConnectorConfiguration(clientCfg);
return cfg;
}
18
View Complete Implementation : GridP2PComputeWithNestedEntryProcessorTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName).setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME)).setDeploymentMode(depMode);
if (igniteInstanceName.startsWith("client"))
cfg.setClientMode(true);
return cfg;
}
18
View Complete Implementation : GridP2PHotRedeploymentSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
// Override P2P configuration to exclude Task and Job clreplacedes
cfg.setPeerClreplacedLoadingLocalClreplacedPathExclude(TASK_NAME);
cfg.setDeploymentMode(depMode);
cfg.setNetworkTimeout(P2P_TIMEOUT);
return cfg;
}
18
View Complete Implementation : RestProcessorMultiStartSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setConnectorConfiguration(new ConnectorConfiguration());
cfg.setClientMode(client);
return cfg;
}
18
View Complete Implementation : IgniteCacheSerializationSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (getTestIgniteInstanceName(CLIENT).equals(igniteInstanceName))
cfg.setClientMode(true);
return cfg;
}
18
View Complete Implementation : AbstractAopTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDeploymentSpi(new LocalDeploymentSpi());
cfg.setMetricsUpdateFrequency(500);
cfg.setDeploymentMode(depMode);
cfg.setIncludeEventTypes(EventType.EVTS_ALL);
return cfg;
}
18
View Complete Implementation : IgniteCacheAtomicProtocolTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setConsistentId(gridName);
cfg.setClientFailureDetectionTimeout(Integer.MAX_VALUE);
TestRecordingCommunicationSpi commSpi = new TestRecordingCommunicationSpi();
cfg.setCommunicationSpi(commSpi);
cfg.setClientMode(client);
if (ccfg != null)
cfg.setCacheConfiguration(ccfg);
return cfg;
}
18
View Complete Implementation : GridCacheNearClientHitTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* @param igniteInstanceName Node name.
* @return Configuration.
* @throws Exception If failed.
*/
private IgniteConfiguration getClientConfiguration(final String igniteInstanceName) throws Exception {
final IgniteConfiguration cfg = getConfiguration(igniteInstanceName);
cfg.setClientMode(true);
return cfg;
}
18
View Complete Implementation : ClientTcpConnectivitySelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected Ignite startRestNode(String name, @Nullable String addr, @Nullable Integer port) throws Exception {
IgniteConfiguration cfg = getConfiguration(name);
replacedert cfg.getConnectorConfiguration() == null;
ConnectorConfiguration clientCfg = new ConnectorConfiguration();
if (addr != null)
clientCfg.setHost(addr);
if (port != null)
clientCfg.setPort(port);
cfg.setConnectorConfiguration(clientCfg);
return G.start(cfg);
}
18
View Complete Implementation : JdbcConnectionSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME), cacheConfiguration(CUSTOM_CACHE_NAME));
replacedert cfg.getConnectorConfiguration() == null;
ConnectorConfiguration clientCfg = new ConnectorConfiguration();
if (!igniteInstanceName.endsWith("0"))
clientCfg.setPort(CUSTOM_PORT);
cfg.setConnectorConfiguration(clientCfg);
return cfg;
}
18
View Complete Implementation : JdbcComplexQuerySelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration("pers", AffinityKey.clreplaced, Person.clreplaced), cacheConfiguration("org", String.clreplaced, Organization.clreplaced));
cfg.setConnectorConfiguration(new ConnectorConfiguration());
return cfg;
}
18
View Complete Implementation : GridSpiExceptionSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setEventStorageSpi(new GridTestRuntimeExceptionSpi());
cfg.setDeploymentSpi(new GridTestCheckedExceptionSpi());
// Disable cache since it can deploy some clreplacedes during start process.
cfg.setCacheConfiguration();
return cfg;
}
18
View Complete Implementation : AuthenticationConfigurationClusterTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* @param idx Node index.
* @param authEnabled Authentication enabled.
* @param client Client node flag.
* @return Ignite configuration.
* @throws Exception On error.
*/
private IgniteConfiguration configuration(int idx, boolean authEnabled, boolean client) throws Exception {
IgniteConfiguration cfg = getConfiguration(getTestIgniteInstanceName(idx));
cfg.setClientMode(client);
cfg.setAuthenticationEnabled(authEnabled);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(200L * 1024 * 1024).setPersistenceEnabled(true)));
return cfg;
}
18
View Complete Implementation : IgniteCacheP2pUnmarshallingErrorTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (getTestIgniteInstanceName(0).equals(igniteInstanceName)) {
cfg.setClientMode(true);
cfg.setCacheConfiguration();
}
if (getTestIgniteInstanceName(10).equals(igniteInstanceName)) {
CacheConfiguration cc = cfg.getCacheConfiguration()[0];
cc.setRebalanceDelay(-1);
}
return cfg;
}
18
View Complete Implementation : PageEvictionMultinodeAbstractTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration configuration = super.getConfiguration(gridName);
if (gridName.startsWith("client"))
configuration.setClientMode(true);
return configuration;
}
18
View Complete Implementation : IgniteCacheStoreSessionWriteBehindAbstractTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
replacedert cfg.getCacheConfiguration().length == 1;
CacheConfiguration ccfg0 = cacheConfiguration(igniteInstanceName);
ccfg0.setName(DEFAULT_CACHE_NAME);
CacheConfiguration ccfg1 = cacheConfiguration(igniteInstanceName);
ccfg1.setName(CACHE_NAME1);
cfg.setCacheConfiguration(ccfg0, ccfg1);
return cfg;
}
18
View Complete Implementation : ClusterGroupHostsSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
Collection<String> hostNames = Arrays.asList("h_1", "h_2", "h_3");
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi disco = (TcpDiscoverySpi) cfg.getDiscoverySpi();
cfg.setDiscoverySpi(new CustomHostsTcpDiscoverySpi(hostNames).setIpFinder(disco.getIpFinder()));
return cfg;
}
18
View Complete Implementation : IgniteSequentialNodeCrashRecoveryTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
DataStorageConfiguration dsCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(512 * 1024 * 1024).setPersistenceEnabled(true)).setCheckpointFrequency(getTestTimeout()).setPageSize(PAGE_SIZE);
if (fileIoFactory != null)
dsCfg.setFileIOFactory(fileIoFactory);
cfg.setDataStorageConfiguration(dsCfg).setConsistentId(igniteInstanceName);
if (failureHnd != null)
cfg.setFailureHandler(failureHnd);
return cfg;
}
18
View Complete Implementation : TcpDiscoveryNodeConfigConsistentIdSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setLocalHost("0.0.0.0");
cfg.setConsistentId(igniteInstanceName);
return cfg;
}
18
View Complete Implementation : CacheContinuousQueryLostPartitionTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cache(TX_CACHE_NAME), cache(CACHE_NAME), cache(MVCC_TX_CACHE_NAME));
if (igniteInstanceName.endsWith("3"))
cfg.setClientMode(true);
return cfg;
}
18
View Complete Implementation : ClusterNodeMetricsUpdateTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setMetricsUpdateFrequency(500);
cfg.setClientMode(client);
return cfg;
}
18
View Complete Implementation : IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration ccfg = new CacheConfiguration(CACHE_NAME).setRebalanceMode(CacheRebalanceMode.NONE);
CacheConfiguration mvccCfg = new CacheConfiguration(MVCC_CACHE_NAME).setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT).setRebalanceDelay(Long.MAX_VALUE);
cfg.setCacheConfiguration(ccfg, mvccCfg);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setCheckpointFrequency(500).setWalMode(WALMode.LOG_ONLY).setAlwaysWriteFullPages(true).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(DataStorageConfiguration.DFLT_DATA_REGION_INITIAL_SIZE)));
return cfg;
}
18
View Complete Implementation : IgniteCacheNearOnlyTxTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (getTestIgniteInstanceName(1).equals(igniteInstanceName)) {
cfg.setClientMode(true);
cfg.setCacheConfiguration();
}
return cfg;
}
18
View Complete Implementation : GridTaskJobRejectSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
FifoQueueCollisionSpi collision = new FifoQueueCollisionSpi();
collision.setParallelJobsNumber(1);
cfg.setCollisionSpi(collision);
cfg.setIncludeEventTypes(EventType.EVTS_ALL);
return cfg;
}
18
View Complete Implementation : GridCachePartitionedNodeFailureSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
c.getTransactionConfiguration().setTxSerializableEnabled(true);
CacheConfiguration cc = defaultCacheConfiguration();
cc.setCacheMode(PARreplacedIONED);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setAtomicityMode(TRANSACTIONAL);
cc.setBackups(1);
c.setCacheConfiguration(cc);
return c;
}
18
View Complete Implementation : Config.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
*/
public static IgniteConfiguration getServerConfiguration() {
TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi();
discoverySpi.setIpFinder(ipFinder);
IgniteConfiguration igniteCfg = new IgniteConfiguration();
igniteCfg.setDiscoverySpi(discoverySpi);
CacheConfiguration<Integer, Person> dfltCacheCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
dfltCacheCfg.setIndexedTypes(Integer.clreplaced, Person.clreplaced);
igniteCfg.setCacheConfiguration(dfltCacheCfg);
igniteCfg.setIgniteInstanceName(UUID.randomUUID().toString());
return igniteCfg;
}
18
View Complete Implementation : IgniteClientCacheStartFailoverTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setClientMode(client);
cfg.setCommunicationSpi(new TestRecordingCommunicationSpi());
return cfg;
}
18
View Complete Implementation : IndexStoragePageMemoryImplTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* @param clean Clean flag. If {@code true}, will clean previous memory state and allocate
* new empty page memory.
* @return Page memory instance.
*/
@Override
protected PageMemory memory(boolean clean) throws Exception {
long[] sizes = new long[10];
for (int i = 0; i < sizes.length; i++) sizes[i] = 1024 * 1024;
DirectMemoryProvider provider = new MappedFileMemoryProvider(log(), allocationPath);
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setEncryptionSpi(new NoopEncryptionSpi());
cfg.setMetricExporterSpi(new NoopMetricExporterSpi());
cfg.setSystemViewExporterSpi(new JmxSystemViewExporterSpi());
GridTestKernalContext cctx = new GridTestKernalContext(log, cfg);
cctx.add(new IgnitePluginProcessor(cctx, cfg, Collections.emptyList()));
cctx.add(new GridInternalSubscriptionProcessor(cctx));
cctx.add(new GridEncryptionManager(cctx));
cctx.add(new GridMetricManager(cctx));
cctx.add(new GridSystemViewManager(cctx));
GridCacheSharedContext<Object, Object> sharedCtx = new GridCacheSharedContext<>(cctx, null, null, null, new NoOpPageStoreManager(), new NoOpWALManager(), null, new IgniteCacheDatabaseSharedManager(), null, null, null, null, null, null, null, null, null, null, null, new CacheDiagnosticManager());
return new PageMemoryImpl(provider, sizes, sharedCtx, PAGE_SIZE, (fullPageId, byteBuf, tag) -> {
replacedert false : "No page replacement (rotation with disk) should happen during the test";
}, new GridInClosure3X<Long, FullPageId, PageMemoryEx>() {
@Override
public void applyx(Long page, FullPageId fullId, PageMemoryEx pageMem) {
}
}, () -> true, new DataRegionMetricsImpl(new DataRegionConfiguration(), cctx.metric(), NO_OP_METRICS), PageMemoryImpl.ThrottlingPolicy.DISABLED, Mockito.mock(CheckpointWriteProgressSupplier.clreplaced));
}
18
View Complete Implementation : IgniteCachingProviderSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
replacedert igniteInstanceName == null;
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
CacheConfiguration cache1 = cacheConfiguration(null);
cache1.setName("cache1");
CacheConfiguration cache2 = cacheConfiguration(null);
cache2.setName("cache2");
cfg.setCacheConfiguration(cacheConfiguration(null), cache1, cache2);
return cfg;
}
18
View Complete Implementation : CacheEntryProcessorCopySelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setIncludeEventTypes(EMPTY_ARR);
cfg.setPeerClreplacedLoadingEnabled(p2pEnabled);
return cfg;
}
18
View Complete Implementation : GridP2PTimeoutSelfTest.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
// Override P2P configuration to exclude Task and Job clreplacedes
cfg.setPeerClreplacedLoadingLocalClreplacedPathExclude(GridP2PTestTask.clreplaced.getName(), GridP2PTestJob.clreplaced.getName());
cfg.setDeploymentMode(depMode);
cfg.setNetworkTimeout(1000);
return cfg;
}