use of org.apache.ignite.igfs.IgfsIpcEndpointConfiguration in project ignite by apache.
the class IgfsModesSelfTest method startUpSecondary.
/**
* Startup secondary file system.
*
* @throws Exception If failed.
*/
private void startUpSecondary() throws Exception {
FileSystemConfiguration igfsCfg = new FileSystemConfiguration();
igfsCfg.setName("igfs-secondary");
igfsCfg.setBlockSize(512 * 1024);
igfsCfg.setDefaultMode(PRIMARY);
IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();
endpointCfg.setType(IgfsIpcEndpointType.TCP);
endpointCfg.setPort(11500);
CacheConfiguration dataCacheCfg = defaultCacheConfiguration();
dataCacheCfg.setCacheMode(PARTITIONED);
dataCacheCfg.setNearConfiguration(null);
dataCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(128));
dataCacheCfg.setBackups(0);
dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
metaCacheCfg.setCacheMode(REPLICATED);
metaCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
metaCacheCfg.setAtomicityMode(TRANSACTIONAL);
igfsCfg.setMetaCacheConfiguration(metaCacheCfg);
igfsCfg.setDataCacheConfiguration(dataCacheCfg);
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setIgniteInstanceName("igfs-grid-secondary");
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true));
cfg.setDiscoverySpi(discoSpi);
cfg.setFileSystemConfiguration(igfsCfg);
cfg.setLocalHost("127.0.0.1");
cfg.setConnectorConfiguration(null);
igfsSecondary = (IgfsImpl) G.start(cfg).fileSystem("igfs-secondary");
}
use of org.apache.ignite.igfs.IgfsIpcEndpointConfiguration in project ignite by apache.
the class IgniteHadoopFileSystemIpcCacheSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
FileSystemConfiguration igfsCfg = new FileSystemConfiguration();
igfsCfg.setName("igfs");
igfsCfg.setManagementPort(FileSystemConfiguration.DFLT_MGMT_PORT + cnt);
igfsCfg.setDataCacheConfiguration(dataCacheConfiguration());
igfsCfg.setMetaCacheConfiguration(metaCacheConfiguration());
IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();
endpointCfg.setType(IgfsIpcEndpointType.SHMEM);
endpointCfg.setPort(IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + cnt);
igfsCfg.setIpcEndpointConfiguration(endpointCfg);
// Together with group blocks mapper will yield 64M per node groups.
igfsCfg.setBlockSize(512 * 1024);
cfg.setFileSystemConfiguration(igfsCfg);
cfg.setCacheConfiguration(dataCacheConfiguration());
cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED);
TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
commSpi.setSharedMemoryPort(-1);
cfg.setCommunicationSpi(commSpi);
cnt++;
return cfg;
}
use of org.apache.ignite.igfs.IgfsIpcEndpointConfiguration in project ignite by apache.
the class IgniteHadoopFileSystemLoopbackExternalToClientAbstractSelfTest method primaryIpcEndpointConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgfsIpcEndpointConfiguration primaryIpcEndpointConfiguration(final String gridName) {
IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();
endpointCfg.setType(IgfsIpcEndpointType.TCP);
endpointCfg.setPort(DFLT_IPC_PORT + getTestIgniteInstanceIndex(gridName));
return endpointCfg;
}
use of org.apache.ignite.igfs.IgfsIpcEndpointConfiguration in project ignite by apache.
the class HadoopIgfs20FileSystemLoopbackPrimarySelfTest method primaryIpcEndpointConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgfsIpcEndpointConfiguration primaryIpcEndpointConfiguration(final String igniteInstanceName) {
IgfsIpcEndpointConfiguration cfg = new IgfsIpcEndpointConfiguration();
cfg.setType(IgfsIpcEndpointType.TCP);
cfg.setPort(DFLT_IPC_PORT + getTestIgniteInstanceIndex(igniteInstanceName));
return cfg;
}
use of org.apache.ignite.igfs.IgfsIpcEndpointConfiguration in project ignite by apache.
the class HadoopSecondaryFileSystemConfigurationTest method primaryIpcEndpointConfiguration.
/**
* Get primary IPC endpoint configuration.
*
* @param igniteInstanceName Ignite instance name.
* @return IPC primary endpoint configuration.
*/
protected IgfsIpcEndpointConfiguration primaryIpcEndpointConfiguration(final String igniteInstanceName) {
IgfsIpcEndpointConfiguration cfg = new IgfsIpcEndpointConfiguration();
cfg.setType(IgfsIpcEndpointType.TCP);
cfg.setPort(DFLT_IPC_PORT + getTestIgniteInstanceIndex(igniteInstanceName));
return cfg;
}
Aggregations