use of org.apache.flink.runtime.jobmanager.StandaloneJobGraphStore in project flink by apache.
the class JobDispatcherLeaderProcessFactoryFactoryTest method createDispatcherLeaderProcessFactoryFromTestInstance.
private static JobDispatcherLeaderProcessFactory createDispatcherLeaderProcessFactoryFromTestInstance(@Nullable JobGraph jobGraph, @Nullable JobResult dirtyJobResult, Path storageDir) throws IOException {
final JobDispatcherLeaderProcessFactoryFactory testInstance = new JobDispatcherLeaderProcessFactoryFactory(ignoredConfig -> jobGraph);
final TestingJobResultStore jobResultStore = TestingJobResultStore.builder().withGetDirtyResultsSupplier(() -> CollectionUtil.ofNullable(dirtyJobResult)).build();
final JobGraphStore jobGraphStore = new StandaloneJobGraphStore();
return testInstance.createFactory(new TestingJobPersistenceComponentFactory(jobGraphStore, jobResultStore), Executors.directExecutor(), new TestingRpcService(), TestingPartialDispatcherServices.builder().withHighAvailabilityServices(new TestingHighAvailabilityServicesBuilder().setJobGraphStore(jobGraphStore).setJobResultStore(jobResultStore).build()).build(storageDir.toFile(), new Configuration()), NoOpFatalErrorHandler.INSTANCE);
}
use of org.apache.flink.runtime.jobmanager.StandaloneJobGraphStore in project flink by apache.
the class AbstractDispatcherTest method setUp.
@Before
public void setUp() throws Exception {
heartbeatServices = new HeartbeatServices(1000L, 10000L);
haServices = new TestingHighAvailabilityServices();
haServices.setCheckpointRecoveryFactory(new StandaloneCheckpointRecoveryFactory());
haServices.setResourceManagerLeaderRetriever(new SettableLeaderRetrievalService());
haServices.setJobGraphStore(new StandaloneJobGraphStore());
haServices.setJobResultStore(new EmbeddedJobResultStore());
configuration = new Configuration();
blobServer = new BlobServer(configuration, temporaryFolder.newFolder(), new VoidBlobStore());
}
Aggregations