/** {@inheritDoc} */ @Override public void onKernalStop(boolean cancel) { super.onKernalStop(cancel); if (hctx == null) return; List<HadoopComponent> components = hctx.components(); for (ListIterator<HadoopComponent> it = components.listIterator(components.size()); it.hasPrevious();) { HadoopComponent c = it.previous(); c.onKernalStop(cancel); } }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { super.stop(cancel); if (hctx == null) return; List<HadoopComponent> components = hctx.components(); for (ListIterator<HadoopComponent> it = components.listIterator(components.size()); it.hasPrevious();) { HadoopComponent c = it.previous(); c.stop(cancel); } }
/** {@inheritDoc} */ @Override public void onKernalStart(boolean active) throws IgniteCheckedException { super.onKernalStart(active); if (hctx == null) return; for (HadoopComponent c : hctx.components()) c.onKernalStart(); }
/** {@inheritDoc} */ @Override public void start() 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(), // TODO: IGNITE-404: Uncomment when fixed. //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)); }