Search in sources :

Example 1 with HadoopConfiguration

use of org.apache.ignite.configuration.HadoopConfiguration in project ignite by apache.

the class HadoopProcessor method start.

/** {@inheritDoc} */
@Override
public void start(boolean activeOnStart) throws IgniteCheckedException {
    if (ctx.isDaemon())
        return;
    HadoopConfiguration cfg = ctx.config().getHadoopConfiguration();
    if (cfg == null)
        cfg = new HadoopConfiguration();
    else
        cfg = new HadoopConfiguration(cfg);
    initializeDefaults(cfg);
    hctx = new HadoopContext(ctx, cfg, new HadoopJobTracker(), new HadoopEmbeddedTaskExecutor(), //cfg.isExternalExecution() ? new HadoopExternalTaskExecutor() : new HadoopEmbeddedTaskExecutor(),
    new HadoopShuffle());
    for (HadoopComponent c : hctx.components()) c.start(hctx);
    hadoop = new HadoopImpl(this);
    ctx.addNodeAttribute(HadoopAttributes.NAME, new HadoopAttributes(cfg));
}
Also used : HadoopShuffle(org.apache.ignite.internal.processors.hadoop.shuffle.HadoopShuffle) HadoopJobTracker(org.apache.ignite.internal.processors.hadoop.jobtracker.HadoopJobTracker) HadoopEmbeddedTaskExecutor(org.apache.ignite.internal.processors.hadoop.taskexecutor.HadoopEmbeddedTaskExecutor) HadoopConfiguration(org.apache.ignite.configuration.HadoopConfiguration)

Example 2 with HadoopConfiguration

use of org.apache.ignite.configuration.HadoopConfiguration in project ignite by apache.

the class HadoopWeightedPlannerMapReduceTest method createHadoopConfiguration.

/** {@inheritDoc} */
@Override
protected HadoopConfiguration createHadoopConfiguration() {
    HadoopConfiguration hadoopCfg = new HadoopConfiguration();
    // Use weighted planner with default settings:
    IgniteHadoopWeightedMapReducePlanner planner = new IgniteHadoopWeightedMapReducePlanner();
    hadoopCfg.setMapReducePlanner(planner);
    return hadoopCfg;
}
Also used : IgniteHadoopWeightedMapReducePlanner(org.apache.ignite.hadoop.mapreduce.IgniteHadoopWeightedMapReducePlanner) HadoopConfiguration(org.apache.ignite.configuration.HadoopConfiguration)

Example 3 with HadoopConfiguration

use of org.apache.ignite.configuration.HadoopConfiguration in project ignite by apache.

the class HadoopTaskExecutionSelfTest method hadoopConfiguration.

/** {@inheritDoc} */
@Override
public HadoopConfiguration hadoopConfiguration(String igniteInstanceName) {
    HadoopConfiguration cfg = super.hadoopConfiguration(igniteInstanceName);
    cfg.setMaxParallelTasks(5);
    return cfg;
}
Also used : HadoopConfiguration(org.apache.ignite.configuration.HadoopConfiguration)

Example 4 with HadoopConfiguration

use of org.apache.ignite.configuration.HadoopConfiguration in project ignite by apache.

the class HadoopTeraSortTest method createHadoopConfiguration.

/**
     * Creates Hadoop configuration for the test.
     * @return The {@link HadoopConfiguration}.
     */
protected HadoopConfiguration createHadoopConfiguration() {
    HadoopConfiguration hadoopCfg = new HadoopConfiguration();
    // See org.apache.ignite.configuration.HadoopConfiguration.DFLT_MAX_TASK_QUEUE_SIZE
    hadoopCfg.setMaxTaskQueueSize(30_000);
    return hadoopCfg;
}
Also used : HadoopConfiguration(org.apache.ignite.configuration.HadoopConfiguration)

Example 5 with HadoopConfiguration

use of org.apache.ignite.configuration.HadoopConfiguration in project ignite by apache.

the class HadoopAbstractMapReduceTest method startGridWithIgfs.

/**
     * Start grid with IGFS.
     *
     * @param igniteInstanceName Ignite instance name.
     * @param igfsName IGFS name
     * @param mode IGFS mode.
     * @param secondaryFs Secondary file system (optional).
     * @param restCfg Rest configuration string (optional).
     * @return Started grid instance.
     * @throws Exception If failed.
     */
protected Ignite startGridWithIgfs(String igniteInstanceName, String igfsName, IgfsMode mode, @Nullable IgfsSecondaryFileSystem secondaryFs, @Nullable IgfsIpcEndpointConfiguration restCfg) throws Exception {
    FileSystemConfiguration igfsCfg = new FileSystemConfiguration();
    igfsCfg.setName(igfsName);
    igfsCfg.setBlockSize(IGFS_BLOCK_SIZE);
    igfsCfg.setDefaultMode(mode);
    igfsCfg.setIpcEndpointConfiguration(restCfg);
    igfsCfg.setSecondaryFileSystem(secondaryFs);
    igfsCfg.setPrefetchBlocks(PREFETCH_BLOCKS);
    igfsCfg.setSequentialReadsBeforePrefetch(SEQ_READS_BEFORE_PREFETCH);
    CacheConfiguration dataCacheCfg = defaultCacheConfiguration();
    dataCacheCfg.setName("dataCache");
    dataCacheCfg.setCacheMode(PARTITIONED);
    dataCacheCfg.setNearConfiguration(null);
    dataCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
    dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
    dataCacheCfg.setBackups(0);
    dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
    CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
    metaCacheCfg.setName("metaCache");
    metaCacheCfg.setCacheMode(REPLICATED);
    metaCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
    metaCacheCfg.setAtomicityMode(TRANSACTIONAL);
    igfsCfg.setDataCacheConfiguration(dataCacheCfg);
    igfsCfg.setMetaCacheConfiguration(metaCacheCfg);
    IgniteConfiguration cfg = new IgniteConfiguration();
    cfg.setIgniteInstanceName(igniteInstanceName);
    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
    discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true));
    cfg.setDiscoverySpi(discoSpi);
    cfg.setFileSystemConfiguration(igfsCfg);
    cfg.setLocalHost("127.0.0.1");
    cfg.setConnectorConfiguration(null);
    HadoopConfiguration hadoopCfg = createHadoopConfiguration();
    if (hadoopCfg != null)
        cfg.setHadoopConfiguration(hadoopCfg);
    return G.start(cfg);
}
Also used : IgfsGroupDataBlocksKeyMapper(org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoveryVmIpFinder(org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder) HadoopConfiguration(org.apache.ignite.configuration.HadoopConfiguration) FileSystemConfiguration(org.apache.ignite.configuration.FileSystemConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

HadoopConfiguration (org.apache.ignite.configuration.HadoopConfiguration)8 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)2 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)1 FileSystemConfiguration (org.apache.ignite.configuration.FileSystemConfiguration)1 IgniteHadoopWeightedMapReducePlanner (org.apache.ignite.hadoop.mapreduce.IgniteHadoopWeightedMapReducePlanner)1 HadoopTestRoundRobinMrPlanner (org.apache.ignite.hadoop.planner.HadoopTestRoundRobinMrPlanner)1 IgfsGroupDataBlocksKeyMapper (org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper)1 HadoopJobTracker (org.apache.ignite.internal.processors.hadoop.jobtracker.HadoopJobTracker)1 HadoopShuffle (org.apache.ignite.internal.processors.hadoop.shuffle.HadoopShuffle)1 HadoopEmbeddedTaskExecutor (org.apache.ignite.internal.processors.hadoop.taskexecutor.HadoopEmbeddedTaskExecutor)1 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)1 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)1