use of org.apache.ignite.internal.processors.hadoop.taskexecutor.external.HadoopProcessDescriptor in project ignite by apache.
the class HadoopExternalProcessStarter method run.
/**
* Run the process.
*
* @throws Exception If failed.
*/
public void run() throws Exception {
File outputDir = outputDirectory();
initializeStreams(outputDir);
ExecutorService msgExecSvc = Executors.newFixedThreadPool(Integer.getInteger("MSG_THREAD_POOL_SIZE", Runtime.getRuntime().availableProcessors() * 2));
IgniteLogger log = logger(outputDir);
HadoopExternalCommunication comm = new HadoopExternalCommunication(args.nodeId, args.childProcId, new JdkMarshaller(), log, msgExecSvc, "external", args.workDir);
comm.start();
HadoopProcessDescriptor nodeDesc = new HadoopProcessDescriptor(args.nodeId, args.parentProcId);
nodeDesc.address(args.addr);
nodeDesc.tcpPort(args.tcpPort);
nodeDesc.sharedMemoryPort(args.shmemPort);
HadoopChildProcessRunner runner = new HadoopChildProcessRunner();
runner.start(comm, nodeDesc, msgExecSvc, log);
System.err.println("Started");
System.err.flush();
System.setOut(new PrintStream(out));
System.setErr(new PrintStream(err));
}
Aggregations