JobRepository { public JobRecord getJobRecord(long jobId) { return jobRecords.get(jobId); } JobRepository(JetInstance jetInstance); JobRecord getJobRecord(long jobId); JobExecutionRecord getJobExecutionRecord(long jobId); IMap<String, byte[]> getJobResources(long jobId); @Nullable JobResult getJobResult(long jobId); static String snapshotDataMapName(long jobId, int dataMapIndex); static String jobResourcesMapName(long jobId); static String fileKeyName(String id); static String classKeyName(String id); static String exportedSnapshotMapName(String name); static final String INTERNAL_JET_OBJECTS_PREFIX; static final String EXPORTED_SNAPSHOTS_PREFIX; static final String EXPORTED_SNAPSHOTS_DETAIL_CACHE; static final String RESOURCES_MAP_NAME_PREFIX; static final String FILE_STORAGE_KEY_NAME_PREFIX; static final String CLASS_STORAGE_KEY_NAME_PREFIX; static final String RANDOM_ID_GENERATOR_NAME; static final String JOB_RECORDS_MAP_NAME; static final String JOB_EXECUTION_RECORDS_MAP_NAME; static final String JOB_RESULTS_MAP_NAME; static final String JOB_METRICS_MAP_NAME; static final String SNAPSHOT_DATA_MAP_PREFIX; }
@Test public void test_getJobRecordFromClient() { JetInstance client = createJetClient(); Pipeline p = Pipeline.create(); p.readFrom(Sources.streamFromProcessor("source", ProcessorMetaSupplier.of(() -> new NoOutputSourceP()))) .withoutTimestamps() .writeTo(Sinks.logger()); Job job = instance.newJob(p, new JobConfig() .setProcessingGuarantee(ProcessingGuarantee.EXACTLY_ONCE) .setSnapshotIntervalMillis(100)); JobRepository jobRepository = new JobRepository(client); assertTrueEventually(() -> assertNotNull(jobRepository.getJobRecord(job.getId()))); client.shutdown(); }