use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteCacheConfigurationPrimitiveTypesSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
cfg.setDiscoverySpi(disco);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteCacheCrossCacheJoinRandomTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = ((TcpDiscoverySpi) cfg.getDiscoverySpi());
spi.setIpFinder(IP_FINDER);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgfsProcessorValidationSelfTest method testRemoteIfDataBlockSizeDiffers.
/**
* @throws Exception If failed.
*/
public void testRemoteIfDataBlockSizeDiffers() throws Exception {
IgniteConfiguration g2Cfg = getConfiguration("g2");
FileSystemConfiguration g2IgfsCfg1 = new FileSystemConfiguration(g1IgfsCfg1);
g2IgfsCfg1.setBlockSize(g2IgfsCfg1.getBlockSize() + 100);
g2Cfg.setFileSystemConfiguration(g2IgfsCfg1, g1IgfsCfg2);
G.start(g1Cfg);
checkGridStartFails(g2Cfg, "Data block size should be the same on all nodes in grid for IGFS", false);
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class HadoopCommandLineTest method beforeTest.
/**
* {@inheritDoc}
*/
@Override
protected void beforeTest() throws Exception {
String cfgPath = "config/hadoop/default-config.xml";
IgniteBiTuple<IgniteConfiguration, GridSpringResourceContext> tup = IgnitionEx.loadConfiguration(cfgPath);
IgniteConfiguration cfg = tup.get1();
// Avoid connecting to other nodes.
cfg.setLocalHost("127.0.0.1");
igfs = (IgfsEx) Ignition.start(cfg).fileSystem(igfsName);
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class ApplicationConfiguration method igniteInstance.
@Bean
public Ignite igniteInstance() {
IgniteConfiguration cfg = new IgniteConfiguration();
CacheConfiguration ccfg = new CacheConfiguration("PersonCache");
ccfg.setIndexedTypes(Integer.class, Person.class);
cfg.setCacheConfiguration(ccfg);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(new TcpDiscoveryVmIpFinder(true));
cfg.setDiscoverySpi(spi);
return Ignition.start(cfg);
}
Aggregations