/** * Run the Gobblin job. This call will block until the job is done. * @return a {@link JobExecutionResult} containing the result of the execution. */ @NotOnCli public JobExecutionResult run() throws InterruptedException, TimeoutException, ExecutionException { JobExecutionDriver jobDriver = runAsync(); return jobDriver.get(this.jobTimeout.getTimeout(), this.jobTimeout.getTimeUnit()); }
private void checkLaunchJob(StandardGobblinInstanceLauncher instanceLauncher, JobSpec js1, GobblinInstanceDriver instance) throws TimeoutException, InterruptedException, ExecutionException { JobExecutionDriver jobDriver = null; JobExecutionMonitor monitor = instance.getJobLauncher().launchJob(js1); if (monitor instanceof JobLauncherExecutionDriver.JobExecutionMonitorAndDriver) { jobDriver = ((JobLauncherExecutionDriver.JobExecutionMonitorAndDriver) monitor).getDriver(); } new Thread(jobDriver).run(); JobExecutionResult jobResult = jobDriver.get(5, TimeUnit.SECONDS); Assert.assertTrue(jobResult.isSuccessful()); instanceLauncher.stopAsync(); instanceLauncher.awaitTerminated(5, TimeUnit.SECONDS); Assert.assertEquals(instance.getMetrics().getUpFlag().getValue().intValue(), 0); Assert.assertEquals(instance.getMetrics().getUptimeMs().getValue().longValue(), 0); }
eventBus.post(new MySource.NextWorkUnit()); JobExecutionResult result = driver.get(5, TimeUnit.SECONDS); Assert.assertTrue(result.isSuccessful());
JobExecutionResult jobResult = jobDriver.get(5, TimeUnit.SECONDS);
JobExecutionResult jobResult = jobDriver.get(5, TimeUnit.SECONDS);
JobExecutionResult jobResult = jobDriver.get(5, TimeUnit.SECONDS);
/** * Run the Gobblin job. This call will block until the job is done. * @return a {@link JobExecutionResult} containing the result of the execution. */ @NotOnCli public JobExecutionResult run() throws InterruptedException, TimeoutException, ExecutionException { JobExecutionDriver jobDriver = runAsync(); return jobDriver.get(this.jobTimeout.getTimeout(), this.jobTimeout.getTimeUnit()); }