/** * Constructor. * * @param cfg Configuration. */ public HadoopAttributes(HadoopConfiguration cfg) { assert cfg != null; assert cfg.getMapReducePlanner() != null; plannerCls = cfg.getMapReducePlanner().getClass().getName(); // TODO: IGNITE-404: Get from configuration when fixed. extExec = false; maxParallelTasks = cfg.getMaxParallelTasks(); maxTaskQueueSize = cfg.getMaxTaskQueueSize(); libNames = cfg.getNativeLibraryNames(); // Cores count already passed in other attributes, we add it here for convenience. cores = Runtime.getRuntime().availableProcessors(); }
/** * Copy constructor. * * @param cfg Configuration to copy. */ public HadoopConfiguration(HadoopConfiguration cfg) { // Preserve alphabetic order. // TODO: IGNITE-404: Uncomment when fixed. //extExecution = cfg.isExternalExecution(); finishedJobInfoTtl = cfg.getFinishedJobInfoTtl(); planner = cfg.getMapReducePlanner(); maxParallelTasks = cfg.getMaxParallelTasks(); maxTaskQueueSize = cfg.getMaxTaskQueueSize(); libNames = cfg.getNativeLibraryNames(); }
/** {@inheritDoc} */ @Override public HadoopClassLoader commonClassLoader() { HadoopClassLoader res = ldr; if (res == null) { synchronized (this) { res = ldr; if (res == null) { String[] libNames = null; if (ctx != null && ctx.config().getHadoopConfiguration() != null) libNames = ctx.config().getHadoopConfiguration().getNativeLibraryNames(); res = new HadoopClassLoader(null, "hadoop-common", libNames, this); ldr = res; } } } return res; }
/** * Create data transfer object for hadoop configuration. * * @param src Hadoop configuration. */ public VisorHadoopConfiguration(HadoopConfiguration src) { planner = compactClass(src.getMapReducePlanner()); // TODO: IGNITE-404: Uncomment when fixed. //extExecution = cfg.isExternalExecution(); finishedJobInfoTtl = src.getFinishedJobInfoTtl(); maxParallelTasks = src.getMaxParallelTasks(); maxTaskQueueSize = src.getMaxTaskQueueSize(); libNames = U.sealList(src.getNativeLibraryNames()); }
job = jobInfo.createJob(jobCls, jobId, log, ctx.configuration().getNativeLibraryNames(), ctx.kernalContext().hadoopHelper());
/** * Copy constructor. * * @param cfg Configuration to copy. */ public HadoopConfiguration(HadoopConfiguration cfg) { // Preserve alphabetic order. // TODO: IGNITE-404: Uncomment when fixed. //extExecution = cfg.isExternalExecution(); finishedJobInfoTtl = cfg.getFinishedJobInfoTtl(); planner = cfg.getMapReducePlanner(); maxParallelTasks = cfg.getMaxParallelTasks(); maxTaskQueueSize = cfg.getMaxTaskQueueSize(); libNames = cfg.getNativeLibraryNames(); }
/** * Create data transfer object for hadoop configuration. * * @param src Hadoop configuration. */ public VisorHadoopConfiguration(HadoopConfiguration src) { planner = compactClass(src.getMapReducePlanner()); // TODO: IGNITE-404: Uncomment when fixed. //extExecution = cfg.isExternalExecution(); finishedJobInfoTtl = src.getFinishedJobInfoTtl(); maxParallelTasks = src.getMaxParallelTasks(); maxTaskQueueSize = src.getMaxTaskQueueSize(); libNames = U.sealList(src.getNativeLibraryNames()); }