@Before public void startCluster() throws Exception { this.executor = new NepheleMiniCluster(); this.executor.setDefaultOverwriteFiles(true); this.executor.setLazyMemoryAllocation(true); this.executor.setMemorySize(MEMORY_SIZE); this.executor.setNumTaskManager(this.numTaskManager); this.executor.start(); }
/** * Stop the local executor instance. You should not call executePlan after this. */ public void stop() throws Exception { synchronized (this.lock) { if (this.nephele != null) { this.nephele.stop(); this.nephele = null; } else { throw new IllegalStateException("The local executor was not started."); } } }
this.nephele = new NepheleMiniCluster(); nephele.setJobManagerRpcPort(jobManagerRpcPort); nephele.setTaskManagerRpcPort(jobManagerRpcPort); nephele.setTaskManagerDataPort(taskManagerDataPort); nephele.setConfigDir(configDir); nephele.setHdfsConfigFile(hdfsConfigFile); nephele.setDefaultOverwriteFiles(defaultOverwriteFiles); nephele.setDefaultAlwaysCreateDirectory(defaultAlwaysCreateDirectory); this.nephele.start(); } else { throw new IllegalStateException("The local executor was already started.");
@Test public void testEverything() { NepheleMiniCluster cluster = new NepheleMiniCluster(); try { cluster.setNumTaskManager(2); cluster.start(); RemoteExecutor ex = new RemoteExecutor("localhost", 6498); } finally { try { cluster.stop(); } catch (Exception e) { e.printStackTrace();
@Before public void startCluster() throws Exception { verifyJvmOptions(); this.executor = new NepheleMiniCluster(); this.executor.setDefaultOverwriteFiles(true); this.executor.start(); }
JobClient client = this.executor.getJobClient(jobGraph); client.setConsoleStreamForReporting(getNullPrintStream()); this.jobExecutionResult = client.submitJobAndWait();
GlobalConfiguration.loadConfiguration(configDir); } else { Configuration conf = getMiniclusterDefaultConfig(jobManagerRpcPort, taskManagerRpcPort, taskManagerDataPort, memorySize, hdfsConfigFile, lazyMemoryAllocation, defaultOverwriteFiles, defaultAlwaysCreateDirectory, numTaskManager); initializeIOFormatClasses(); waitForJobManagerToBecomeReady(numTaskManager);
this.nephele = new NepheleMiniCluster(); nephele.setJobManagerRpcPort(jobManagerRpcPort); nephele.setTaskManagerRpcPort(jobManagerRpcPort); nephele.setTaskManagerDataPort(taskManagerDataPort); nephele.setConfigDir(configDir); nephele.setHdfsConfigFile(hdfsConfigFile); nephele.setDefaultOverwriteFiles(defaultOverwriteFiles); nephele.setDefaultAlwaysCreateDirectory(defaultAlwaysCreateDirectory); this.nephele.start(); } else { throw new IllegalStateException("The local executor was already started.");
@Override public JobExecutionResult execute(String jobName) throws Exception { try { OptimizedPlan op = compileProgram(jobName); NepheleJobGraphGenerator jgg = new NepheleJobGraphGenerator(); JobGraph jobGraph = jgg.compileJobGraph(op); JobClient client = this.executor.getJobClient(jobGraph); client.setConsoleStreamForReporting(AbstractTestBase.getNullPrintStream()); JobExecutionResult result = client.submitJobAndWait(); this.latestResult = result; return result; } catch (Exception e) { System.err.println(e.getMessage()); e.printStackTrace(); Assert.fail("Job execution failed!"); return null; } }
/** * Stop the local executor instance. You should not call executePlan after this. */ public void stop() throws Exception { synchronized (this.lock) { if (this.nephele != null) { this.nephele.stop(); this.nephele = null; } else { throw new IllegalStateException("The local executor was not started."); } } }
GlobalConfiguration.loadConfiguration(configDir); } else { Configuration conf = getMiniclusterDefaultConfig(jobManagerRpcPort, taskManagerRpcPort, taskManagerDataPort, memorySize, hdfsConfigFile, lazyMemoryAllocation, defaultOverwriteFiles, defaultAlwaysCreateDirectory, numTaskManager); initializeIOFormatClasses(); waitForJobManagerToBecomeReady(numTaskManager);
try { JobClient client = this.executor.getJobClient(this.failingJob); client.setConsoleStreamForReporting(AbstractTestBase.getNullPrintStream()); client.submitJobAndWait(); JobClient client = this.executor.getJobClient(this.job); client.setConsoleStreamForReporting(AbstractTestBase.getNullPrintStream()); client.submitJobAndWait();
@After public void stopCluster() throws Exception { try { if (this.executor != null) { this.executor.stop(); this.executor = null; FileSystem.closeAll(); System.gc(); } } finally { deleteAllTempFiles(); } }
JobGraph jobGraph = jgg.compileJobGraph(op); JobClient jobClient = this.nephele.getJobClient(jobGraph); JobExecutionResult result = jobClient.submitJobAndWait(); return result;
@After public void stopCluster() throws Exception { if (this.executor != null) { this.executor.stop(); this.executor = null; FileSystem.closeAll(); System.gc(); } }
JobGraph jobGraph = jgg.compileJobGraph(op); JobClient jobClient = this.nephele.getJobClient(jobGraph); JobExecutionResult result = jobClient.submitJobAndWait(); return result;
final JobClient client = this.executor.getJobClient(jobGraph); final JobSubmissionResult submissionResult = client.submitJob(); if (submissionResult.getReturnCode() != AbstractJobResult.ReturnCode.SUCCESS) {