use of alluxio.job.plan.NoopPlanConfig in project alluxio by Alluxio.
the class StressJobServiceBench method runNoop.
private void runNoop() throws IOException, InterruptedException, TimeoutException {
long jobId = mJobMasterClient.run(new NoopPlanConfig());
// TODO(jianjian): refactor JobTestUtils
ImmutableSet<Status> statuses = ImmutableSet.of(Status.COMPLETED, Status.CANCELED, Status.FAILED);
final AtomicReference<JobInfo> singleton = new AtomicReference<>();
CommonUtils.waitFor(String.format("job %d to be one of status %s", jobId, Arrays.toString(statuses.toArray())), () -> {
JobInfo info;
try {
info = mJobMasterClient.getJobStatus(jobId);
if (statuses.contains(info.getStatus())) {
singleton.set(info);
}
return statuses.contains(info.getStatus());
} catch (IOException e) {
throw Throwables.propagate(e);
}
}, WaitForOptions.defaults().setTimeoutMs(30 * Constants.SECOND_MS));
JobInfo jobInfo = singleton.get();
if (jobInfo.getStatus().equals(Status.FAILED)) {
throw new IOException(jobInfo.getErrorMessage());
}
}
use of alluxio.job.plan.NoopPlanConfig in project alluxio by Alluxio.
the class CompositeIntegrationTest method testCompositeDoNothing.
@Test
public void testCompositeDoNothing() throws Exception {
NoopPlanConfig jobConfig = new NoopPlanConfig();
long jobId = mJobMaster.run(new CompositeConfig(Lists.newArrayList(jobConfig), true));
waitForJobToFinish(jobId);
}
Aggregations