use of uk.gov.gchq.gaffer.operation.impl.job.GetJobDetails in project Gaffer by gchq.
the class JcsJobTrackerIT method shouldAddJobIdToJobTrackerWhenExecute.
@Test
public void shouldAddJobIdToJobTrackerWhenExecute() throws OperationException, IOException, InterruptedException {
// Given
final OperationChain<JobDetail> opChain = new OperationChain.Builder().first(new GetAllEdges()).then(new GetJobDetails()).build();
final User user = new User("user01");
// When
final JobDetail jobDetails = graph.execute(opChain, user);
final String jobId = jobDetails.getJobId();
final JobDetail expectedJobDetail = new JobDetail(jobId, user.getUserId(), opChain, JobStatus.RUNNING, null);
expectedJobDetail.setStartTime(jobDetails.getStartTime());
expectedJobDetail.setEndTime(jobDetails.getEndTime());
// Then
assertEquals(expectedJobDetail, jobDetails);
}
use of uk.gov.gchq.gaffer.operation.impl.job.GetJobDetails in project Gaffer by gchq.
the class ExportToGafferResultCacheExample method exportAndGetJobDetails.
public JobDetail exportAndGetJobDetails() {
// ---------------------------------------------------------
final OperationChain<JobDetail> exportOpChain = new OperationChain.Builder().first(new GetAllEdges()).then(new ExportToGafferResultCache()).then(new GetJobDetails()).build();
// ---------------------------------------------------------
jobDetail = runExample(exportOpChain);
return jobDetail;
}
use of uk.gov.gchq.gaffer.operation.impl.job.GetJobDetails in project Gaffer by gchq.
the class GetGafferResultCacheExportExample method exportAndGetJobDetails.
public JobDetail exportAndGetJobDetails() {
// ---------------------------------------------------------
final OperationChain<JobDetail> exportOpChain = new OperationChain.Builder().first(new GetAllEdges()).then(new ExportToGafferResultCache()).then(new GetJobDetails()).build();
// ---------------------------------------------------------
jobDetail = runExample(exportOpChain);
return jobDetail;
}
use of uk.gov.gchq.gaffer.operation.impl.job.GetJobDetails in project gaffer-doc by gchq.
the class ExportToGafferResultCacheExample method exportAndGetJobDetails.
public JobDetail exportAndGetJobDetails() {
// ---------------------------------------------------------
final OperationChain<JobDetail> exportOpChain = new OperationChain.Builder().first(new GetAllElements()).then(new ExportToGafferResultCache<>()).then(new DiscardOutput()).then(new GetJobDetails()).build();
// ---------------------------------------------------------
jobDetail = runExample(exportOpChain, null);
return jobDetail;
}
use of uk.gov.gchq.gaffer.operation.impl.job.GetJobDetails in project gaffer-doc by gchq.
the class GetJobResultsExample method runExamples.
@Override
public void runExamples() {
try {
final OperationChain<JobDetail> opChain = new OperationChain.Builder().first(new GetAllElements()).then(new ExportToGafferResultCache<>()).then(new DiscardOutput()).then(new GetJobDetails()).build();
final JobDetail jobDetails = getGraph().execute(opChain, new User("user01"));
jobId = jobDetails.getJobId();
} catch (final OperationException e) {
throw new RuntimeException(e);
}
getJobResults();
}
Aggregations