Search in sources :

Example 1 with StandaloneJobGraphStore

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);
}
Also used : StandaloneJobGraphStore(org.apache.flink.runtime.jobmanager.StandaloneJobGraphStore) Configuration(org.apache.flink.configuration.Configuration) StandaloneJobGraphStore(org.apache.flink.runtime.jobmanager.StandaloneJobGraphStore) JobGraphStore(org.apache.flink.runtime.jobmanager.JobGraphStore) TestingRpcService(org.apache.flink.runtime.rpc.TestingRpcService) TestingJobPersistenceComponentFactory(org.apache.flink.runtime.jobmanager.TestingJobPersistenceComponentFactory) TestingJobResultStore(org.apache.flink.runtime.testutils.TestingJobResultStore) TestingHighAvailabilityServicesBuilder(org.apache.flink.runtime.highavailability.TestingHighAvailabilityServicesBuilder)

Example 2 with StandaloneJobGraphStore

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());
}
Also used : HeartbeatServices(org.apache.flink.runtime.heartbeat.HeartbeatServices) TestingHighAvailabilityServices(org.apache.flink.runtime.highavailability.TestingHighAvailabilityServices) StandaloneJobGraphStore(org.apache.flink.runtime.jobmanager.StandaloneJobGraphStore) VoidBlobStore(org.apache.flink.runtime.blob.VoidBlobStore) StandaloneCheckpointRecoveryFactory(org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory) Configuration(org.apache.flink.configuration.Configuration) SettableLeaderRetrievalService(org.apache.flink.runtime.leaderretrieval.SettableLeaderRetrievalService) BlobServer(org.apache.flink.runtime.blob.BlobServer) EmbeddedJobResultStore(org.apache.flink.runtime.highavailability.nonha.embedded.EmbeddedJobResultStore) Before(org.junit.Before)

Aggregations

Configuration (org.apache.flink.configuration.Configuration)2 StandaloneJobGraphStore (org.apache.flink.runtime.jobmanager.StandaloneJobGraphStore)2 BlobServer (org.apache.flink.runtime.blob.BlobServer)1 VoidBlobStore (org.apache.flink.runtime.blob.VoidBlobStore)1 StandaloneCheckpointRecoveryFactory (org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory)1 HeartbeatServices (org.apache.flink.runtime.heartbeat.HeartbeatServices)1 TestingHighAvailabilityServices (org.apache.flink.runtime.highavailability.TestingHighAvailabilityServices)1 TestingHighAvailabilityServicesBuilder (org.apache.flink.runtime.highavailability.TestingHighAvailabilityServicesBuilder)1 EmbeddedJobResultStore (org.apache.flink.runtime.highavailability.nonha.embedded.EmbeddedJobResultStore)1 JobGraphStore (org.apache.flink.runtime.jobmanager.JobGraphStore)1 TestingJobPersistenceComponentFactory (org.apache.flink.runtime.jobmanager.TestingJobPersistenceComponentFactory)1 SettableLeaderRetrievalService (org.apache.flink.runtime.leaderretrieval.SettableLeaderRetrievalService)1 TestingRpcService (org.apache.flink.runtime.rpc.TestingRpcService)1 TestingJobResultStore (org.apache.flink.runtime.testutils.TestingJobResultStore)1 Before (org.junit.Before)1