Search in sources :

Example 11 with DispatcherGateway

use of org.apache.flink.runtime.dispatcher.DispatcherGateway in project flink by apache.

the class JobSubmitHandlerTest method testFileHandling.

@Test
public void testFileHandling() throws Exception {
    final String dcEntryName = "entry";
    CompletableFuture<JobGraph> submittedJobGraphFuture = new CompletableFuture<>();
    DispatcherGateway dispatcherGateway = TestingDispatcherGateway.newBuilder().setBlobServerPort(blobServer.getPort()).setSubmitFunction(submittedJobGraph -> {
        submittedJobGraphFuture.complete(submittedJobGraph);
        return CompletableFuture.completedFuture(Acknowledge.get());
    }).build();
    JobSubmitHandler handler = new JobSubmitHandler(() -> CompletableFuture.completedFuture(dispatcherGateway), RpcUtils.INF_TIMEOUT, Collections.emptyMap(), TestingUtils.defaultExecutor(), configuration);
    final Path jobGraphFile = TEMPORARY_FOLDER.newFile().toPath();
    final Path jarFile = TEMPORARY_FOLDER.newFile().toPath();
    final Path artifactFile = TEMPORARY_FOLDER.newFile().toPath();
    final JobGraph jobGraph = JobGraphTestUtils.emptyJobGraph();
    // the entry that should be updated
    jobGraph.addUserArtifact(dcEntryName, new DistributedCache.DistributedCacheEntry("random", false));
    try (ObjectOutputStream objectOut = new ObjectOutputStream(Files.newOutputStream(jobGraphFile))) {
        objectOut.writeObject(jobGraph);
    }
    JobSubmitRequestBody request = new JobSubmitRequestBody(jobGraphFile.getFileName().toString(), Collections.singletonList(jarFile.getFileName().toString()), Collections.singleton(new JobSubmitRequestBody.DistributedCacheFile(dcEntryName, artifactFile.getFileName().toString())));
    handler.handleRequest(HandlerRequest.create(request, EmptyMessageParameters.getInstance(), Arrays.asList(jobGraphFile.toFile(), jarFile.toFile(), artifactFile.toFile())), dispatcherGateway).get();
    Assert.assertTrue("No JobGraph was submitted.", submittedJobGraphFuture.isDone());
    final JobGraph submittedJobGraph = submittedJobGraphFuture.get();
    Assert.assertEquals(1, submittedJobGraph.getUserJarBlobKeys().size());
    Assert.assertEquals(1, submittedJobGraph.getUserArtifacts().size());
    Assert.assertNotNull(submittedJobGraph.getUserArtifacts().get(dcEntryName).blobKey);
}
Also used : Arrays(java.util.Arrays) BlobServer(org.apache.flink.runtime.blob.BlobServer) Tuple2(org.apache.flink.api.java.tuple.Tuple2) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) RunWith(org.junit.runner.RunWith) ExceptionUtils(org.apache.flink.util.ExceptionUtils) CompletableFuture(java.util.concurrent.CompletableFuture) DispatcherGateway(org.apache.flink.runtime.dispatcher.DispatcherGateway) HttpResponseStatus(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus) EmptyMessageParameters(org.apache.flink.runtime.rest.messages.EmptyMessageParameters) ArrayList(java.util.ArrayList) FutureUtils(org.apache.flink.util.concurrent.FutureUtils) After(org.junit.After) JobGraphTestUtils(org.apache.flink.runtime.jobgraph.JobGraphTestUtils) TestLogger(org.apache.flink.util.TestLogger) HandlerRequest(org.apache.flink.runtime.rest.handler.HandlerRequest) ObjectOutputStream(java.io.ObjectOutputStream) ClassRule(org.junit.ClassRule) Path(java.nio.file.Path) Parameterized(org.junit.runners.Parameterized) JobSubmitRequestBody(org.apache.flink.runtime.rest.messages.job.JobSubmitRequestBody) Before(org.junit.Before) VoidBlobStore(org.apache.flink.runtime.blob.VoidBlobStore) Files(java.nio.file.Files) Configuration(org.apache.flink.configuration.Configuration) Test(org.junit.Test) IOException(java.io.IOException) RpcUtils(org.apache.flink.runtime.rpc.RpcUtils) DistributedCache(org.apache.flink.api.common.cache.DistributedCache) Acknowledge(org.apache.flink.runtime.messages.Acknowledge) RestHandlerException(org.apache.flink.runtime.rest.handler.RestHandlerException) SSLUtilsTest(org.apache.flink.runtime.net.SSLUtilsTest) TestingUtils(org.apache.flink.testutils.TestingUtils) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) Assert(org.junit.Assert) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) Path(java.nio.file.Path) JobSubmitRequestBody(org.apache.flink.runtime.rest.messages.job.JobSubmitRequestBody) ObjectOutputStream(java.io.ObjectOutputStream) DispatcherGateway(org.apache.flink.runtime.dispatcher.DispatcherGateway) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) CompletableFuture(java.util.concurrent.CompletableFuture) DistributedCache(org.apache.flink.api.common.cache.DistributedCache) Test(org.junit.Test) SSLUtilsTest(org.apache.flink.runtime.net.SSLUtilsTest)

Example 12 with DispatcherGateway

use of org.apache.flink.runtime.dispatcher.DispatcherGateway in project flink by apache.

the class ApplicationDispatcherBootstrapTest method testErrorHandlerIsCalledWhenApplicationStatusIsUnknown.

@Test
public void testErrorHandlerIsCalledWhenApplicationStatusIsUnknown() throws Exception {
    // we're "listening" on this to be completed to verify that the cluster
    // is being shut down from the ApplicationDispatcherBootstrap
    final AtomicBoolean shutdownCalled = new AtomicBoolean(false);
    final TestingDispatcherGateway.Builder dispatcherBuilder = canceledJobGatewayBuilder().setRequestJobResultFunction(jobID -> CompletableFuture.completedFuture(createUnknownJobResult(jobID))).setClusterShutdownFunction(status -> {
        shutdownCalled.set(true);
        return CompletableFuture.completedFuture(Acknowledge.get());
    });
    final TestingDispatcherGateway dispatcherGateway = dispatcherBuilder.build();
    final CompletableFuture<Void> errorHandlerFuture = new CompletableFuture<>();
    final ApplicationDispatcherBootstrap bootstrap = createApplicationDispatcherBootstrap(3, dispatcherGateway, scheduledExecutor, errorHandlerFuture::completeExceptionally);
    // check that bootstrap shutdown completes exceptionally
    assertException(bootstrap.getApplicationCompletionFuture(), UnsuccessfulExecutionException.class);
    // and exception gets propagated to error handler
    assertException(bootstrap.getApplicationCompletionFuture(), UnsuccessfulExecutionException.class);
    // and cluster didn't shut down
    assertFalse(shutdownCalled.get());
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) ProgramInvocationException(org.apache.flink.client.program.ProgramInvocationException) ScheduledFuture(java.util.concurrent.ScheduledFuture) ExceptionUtils(org.apache.flink.util.ExceptionUtils) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) Duration(java.time.Duration) Assertions(org.assertj.core.api.Assertions) FailingJob(org.apache.flink.client.testjar.FailingJob) ScheduledExecutor(org.apache.flink.util.concurrent.ScheduledExecutor) Acknowledge(org.apache.flink.runtime.messages.Acknowledge) Executors(java.util.concurrent.Executors) ExecutorUtils(org.apache.flink.util.ExecutorUtils) Test(org.junit.jupiter.api.Test) FlinkJobNotFoundException(org.apache.flink.runtime.messages.FlinkJobNotFoundException) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) SerializedThrowable(org.apache.flink.util.SerializedThrowable) Optional(java.util.Optional) PackagedProgram(org.apache.flink.client.program.PackagedProgram) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) FlinkException(org.apache.flink.util.FlinkException) ScheduledExecutorServiceAdapter(org.apache.flink.util.concurrent.ScheduledExecutorServiceAdapter) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) EnumSource(org.junit.jupiter.params.provider.EnumSource) CompletableFuture(java.util.concurrent.CompletableFuture) JobStatus(org.apache.flink.api.common.JobStatus) DispatcherGateway(org.apache.flink.runtime.dispatcher.DispatcherGateway) Supplier(java.util.function.Supplier) EmbeddedExecutor(org.apache.flink.client.deployment.application.executors.EmbeddedExecutor) PipelineOptionsInternal(org.apache.flink.configuration.PipelineOptionsInternal) MultiExecuteJob(org.apache.flink.client.testjar.MultiExecuteJob) JobResult(org.apache.flink.runtime.jobmaster.JobResult) TestLoggerExtension(org.apache.flink.util.TestLoggerExtension) FutureUtils(org.apache.flink.util.concurrent.FutureUtils) FatalErrorHandler(org.apache.flink.runtime.rpc.FatalErrorHandler) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) BiConsumer(java.util.function.BiConsumer) DeploymentOptions(org.apache.flink.configuration.DeploymentOptions) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) JobExecutionException(org.apache.flink.runtime.client.JobExecutionException) HighAvailabilityMode(org.apache.flink.runtime.jobmanager.HighAvailabilityMode) FlinkRuntimeException(org.apache.flink.util.FlinkRuntimeException) ApplicationStatus(org.apache.flink.runtime.clusterframework.ApplicationStatus) Configuration(org.apache.flink.configuration.Configuration) JobCancellationException(org.apache.flink.runtime.client.JobCancellationException) ConcurrentLinkedDeque(java.util.concurrent.ConcurrentLinkedDeque) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) JobID(org.apache.flink.api.common.JobID) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) Collections(java.util.Collections) HighAvailabilityOptions(org.apache.flink.configuration.HighAvailabilityOptions) DuplicateJobSubmissionException(org.apache.flink.runtime.client.DuplicateJobSubmissionException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) CompletableFuture(java.util.concurrent.CompletableFuture) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 13 with DispatcherGateway

use of org.apache.flink.runtime.dispatcher.DispatcherGateway in project flink by apache.

the class ApplicationDispatcherBootstrapTest method testShutdownDisabled.

@ParameterizedTest
@EnumSource(value = JobStatus.class, names = { "FINISHED", "CANCELED", "FAILED" })
public void testShutdownDisabled(JobStatus jobStatus) throws Exception {
    final Configuration configurationUnderTest = getConfiguration();
    configurationUnderTest.set(DeploymentOptions.SHUTDOWN_ON_APPLICATION_FINISH, false);
    final TestingDispatcherGateway dispatcherGateway = dispatcherGatewayBuilder(jobStatus).setClusterShutdownFunction(status -> {
        fail("Cluster shutdown should not be called");
        return CompletableFuture.completedFuture(Acknowledge.get());
    }).build();
    ApplicationDispatcherBootstrap bootstrap = createApplicationDispatcherBootstrap(configurationUnderTest, dispatcherGateway, scheduledExecutor);
    // Wait until bootstrap is finished to make sure cluster shutdown isn't called
    bootstrap.getBootstrapCompletionFuture().get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) ProgramInvocationException(org.apache.flink.client.program.ProgramInvocationException) ScheduledFuture(java.util.concurrent.ScheduledFuture) ExceptionUtils(org.apache.flink.util.ExceptionUtils) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) Duration(java.time.Duration) Assertions(org.assertj.core.api.Assertions) FailingJob(org.apache.flink.client.testjar.FailingJob) ScheduledExecutor(org.apache.flink.util.concurrent.ScheduledExecutor) Acknowledge(org.apache.flink.runtime.messages.Acknowledge) Executors(java.util.concurrent.Executors) ExecutorUtils(org.apache.flink.util.ExecutorUtils) Test(org.junit.jupiter.api.Test) FlinkJobNotFoundException(org.apache.flink.runtime.messages.FlinkJobNotFoundException) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) SerializedThrowable(org.apache.flink.util.SerializedThrowable) Optional(java.util.Optional) PackagedProgram(org.apache.flink.client.program.PackagedProgram) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) FlinkException(org.apache.flink.util.FlinkException) ScheduledExecutorServiceAdapter(org.apache.flink.util.concurrent.ScheduledExecutorServiceAdapter) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) EnumSource(org.junit.jupiter.params.provider.EnumSource) CompletableFuture(java.util.concurrent.CompletableFuture) JobStatus(org.apache.flink.api.common.JobStatus) DispatcherGateway(org.apache.flink.runtime.dispatcher.DispatcherGateway) Supplier(java.util.function.Supplier) EmbeddedExecutor(org.apache.flink.client.deployment.application.executors.EmbeddedExecutor) PipelineOptionsInternal(org.apache.flink.configuration.PipelineOptionsInternal) MultiExecuteJob(org.apache.flink.client.testjar.MultiExecuteJob) JobResult(org.apache.flink.runtime.jobmaster.JobResult) TestLoggerExtension(org.apache.flink.util.TestLoggerExtension) FutureUtils(org.apache.flink.util.concurrent.FutureUtils) FatalErrorHandler(org.apache.flink.runtime.rpc.FatalErrorHandler) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) BiConsumer(java.util.function.BiConsumer) DeploymentOptions(org.apache.flink.configuration.DeploymentOptions) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) JobExecutionException(org.apache.flink.runtime.client.JobExecutionException) HighAvailabilityMode(org.apache.flink.runtime.jobmanager.HighAvailabilityMode) FlinkRuntimeException(org.apache.flink.util.FlinkRuntimeException) ApplicationStatus(org.apache.flink.runtime.clusterframework.ApplicationStatus) Configuration(org.apache.flink.configuration.Configuration) JobCancellationException(org.apache.flink.runtime.client.JobCancellationException) ConcurrentLinkedDeque(java.util.concurrent.ConcurrentLinkedDeque) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) JobID(org.apache.flink.api.common.JobID) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) Collections(java.util.Collections) HighAvailabilityOptions(org.apache.flink.configuration.HighAvailabilityOptions) DuplicateJobSubmissionException(org.apache.flink.runtime.client.DuplicateJobSubmissionException) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) Configuration(org.apache.flink.configuration.Configuration) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 14 with DispatcherGateway

use of org.apache.flink.runtime.dispatcher.DispatcherGateway in project flink by apache.

the class ApplicationDispatcherBootstrapTest method testErrorHandlerIsCalled.

private void testErrorHandlerIsCalled(Supplier<CompletableFuture<Acknowledge>> shutdownFunction) throws Exception {
    final TestingDispatcherGateway.Builder dispatcherBuilder = TestingDispatcherGateway.newBuilder().setSubmitFunction(jobGraph -> CompletableFuture.completedFuture(Acknowledge.get())).setRequestJobStatusFunction(jobId -> CompletableFuture.completedFuture(JobStatus.FINISHED)).setRequestJobResultFunction(jobId -> CompletableFuture.completedFuture(createJobResult(jobId, ApplicationStatus.SUCCEEDED))).setClusterShutdownFunction(status -> shutdownFunction.get());
    // we're "listening" on this to be completed to verify that the error handler is called.
    // In production, this will shut down the cluster with an exception.
    final CompletableFuture<Void> errorHandlerFuture = new CompletableFuture<>();
    final TestingDispatcherGateway dispatcherGateway = dispatcherBuilder.build();
    final ApplicationDispatcherBootstrap bootstrap = createApplicationDispatcherBootstrap(3, dispatcherGateway, scheduledExecutor, errorHandlerFuture::completeExceptionally);
    final CompletableFuture<Acknowledge> completionFuture = bootstrap.getBootstrapCompletionFuture();
    // we call the error handler
    assertException(errorHandlerFuture, FlinkRuntimeException.class);
    // we return a future that is completed exceptionally
    assertException(completionFuture, FlinkRuntimeException.class);
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) ProgramInvocationException(org.apache.flink.client.program.ProgramInvocationException) ScheduledFuture(java.util.concurrent.ScheduledFuture) ExceptionUtils(org.apache.flink.util.ExceptionUtils) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) Duration(java.time.Duration) Assertions(org.assertj.core.api.Assertions) FailingJob(org.apache.flink.client.testjar.FailingJob) ScheduledExecutor(org.apache.flink.util.concurrent.ScheduledExecutor) Acknowledge(org.apache.flink.runtime.messages.Acknowledge) Executors(java.util.concurrent.Executors) ExecutorUtils(org.apache.flink.util.ExecutorUtils) Test(org.junit.jupiter.api.Test) FlinkJobNotFoundException(org.apache.flink.runtime.messages.FlinkJobNotFoundException) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) SerializedThrowable(org.apache.flink.util.SerializedThrowable) Optional(java.util.Optional) PackagedProgram(org.apache.flink.client.program.PackagedProgram) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) FlinkException(org.apache.flink.util.FlinkException) ScheduledExecutorServiceAdapter(org.apache.flink.util.concurrent.ScheduledExecutorServiceAdapter) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) EnumSource(org.junit.jupiter.params.provider.EnumSource) CompletableFuture(java.util.concurrent.CompletableFuture) JobStatus(org.apache.flink.api.common.JobStatus) DispatcherGateway(org.apache.flink.runtime.dispatcher.DispatcherGateway) Supplier(java.util.function.Supplier) EmbeddedExecutor(org.apache.flink.client.deployment.application.executors.EmbeddedExecutor) PipelineOptionsInternal(org.apache.flink.configuration.PipelineOptionsInternal) MultiExecuteJob(org.apache.flink.client.testjar.MultiExecuteJob) JobResult(org.apache.flink.runtime.jobmaster.JobResult) TestLoggerExtension(org.apache.flink.util.TestLoggerExtension) FutureUtils(org.apache.flink.util.concurrent.FutureUtils) FatalErrorHandler(org.apache.flink.runtime.rpc.FatalErrorHandler) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) BiConsumer(java.util.function.BiConsumer) DeploymentOptions(org.apache.flink.configuration.DeploymentOptions) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) JobExecutionException(org.apache.flink.runtime.client.JobExecutionException) HighAvailabilityMode(org.apache.flink.runtime.jobmanager.HighAvailabilityMode) FlinkRuntimeException(org.apache.flink.util.FlinkRuntimeException) ApplicationStatus(org.apache.flink.runtime.clusterframework.ApplicationStatus) Configuration(org.apache.flink.configuration.Configuration) JobCancellationException(org.apache.flink.runtime.client.JobCancellationException) ConcurrentLinkedDeque(java.util.concurrent.ConcurrentLinkedDeque) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) JobID(org.apache.flink.api.common.JobID) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) Collections(java.util.Collections) HighAvailabilityOptions(org.apache.flink.configuration.HighAvailabilityOptions) DuplicateJobSubmissionException(org.apache.flink.runtime.client.DuplicateJobSubmissionException) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) CompletableFuture(java.util.concurrent.CompletableFuture) Acknowledge(org.apache.flink.runtime.messages.Acknowledge)

Example 15 with DispatcherGateway

use of org.apache.flink.runtime.dispatcher.DispatcherGateway in project flink by apache.

the class JobSubmitHandlerTest method testRejectionOnCountMismatch.

@Test
public void testRejectionOnCountMismatch() throws Exception {
    final Path jobGraphFile = TEMPORARY_FOLDER.newFile().toPath();
    try (ObjectOutputStream objectOut = new ObjectOutputStream(Files.newOutputStream(jobGraphFile))) {
        objectOut.writeObject(JobGraphTestUtils.emptyJobGraph());
    }
    final Path countExceedingFile = TEMPORARY_FOLDER.newFile().toPath();
    TestingDispatcherGateway.Builder builder = TestingDispatcherGateway.newBuilder();
    builder.setBlobServerPort(blobServer.getPort()).setSubmitFunction(jobGraph -> CompletableFuture.completedFuture(Acknowledge.get())).setHostname("localhost");
    DispatcherGateway mockGateway = builder.build();
    JobSubmitHandler handler = new JobSubmitHandler(() -> CompletableFuture.completedFuture(mockGateway), RpcUtils.INF_TIMEOUT, Collections.emptyMap(), TestingUtils.defaultExecutor(), configuration);
    JobSubmitRequestBody request = new JobSubmitRequestBody(jobGraphFile.getFileName().toString(), Collections.emptyList(), Collections.emptyList());
    try {
        handler.handleRequest(HandlerRequest.create(request, EmptyMessageParameters.getInstance(), Arrays.asList(jobGraphFile.toFile(), countExceedingFile.toFile())), mockGateway).get();
    } catch (Exception e) {
        ExceptionUtils.findThrowable(e, candidate -> candidate instanceof RestHandlerException && candidate.getMessage().contains("count"));
    }
}
Also used : Path(java.nio.file.Path) Arrays(java.util.Arrays) BlobServer(org.apache.flink.runtime.blob.BlobServer) Tuple2(org.apache.flink.api.java.tuple.Tuple2) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) RunWith(org.junit.runner.RunWith) ExceptionUtils(org.apache.flink.util.ExceptionUtils) CompletableFuture(java.util.concurrent.CompletableFuture) DispatcherGateway(org.apache.flink.runtime.dispatcher.DispatcherGateway) HttpResponseStatus(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus) EmptyMessageParameters(org.apache.flink.runtime.rest.messages.EmptyMessageParameters) ArrayList(java.util.ArrayList) FutureUtils(org.apache.flink.util.concurrent.FutureUtils) After(org.junit.After) JobGraphTestUtils(org.apache.flink.runtime.jobgraph.JobGraphTestUtils) TestLogger(org.apache.flink.util.TestLogger) HandlerRequest(org.apache.flink.runtime.rest.handler.HandlerRequest) ObjectOutputStream(java.io.ObjectOutputStream) ClassRule(org.junit.ClassRule) Path(java.nio.file.Path) Parameterized(org.junit.runners.Parameterized) JobSubmitRequestBody(org.apache.flink.runtime.rest.messages.job.JobSubmitRequestBody) Before(org.junit.Before) VoidBlobStore(org.apache.flink.runtime.blob.VoidBlobStore) Files(java.nio.file.Files) Configuration(org.apache.flink.configuration.Configuration) Test(org.junit.Test) IOException(java.io.IOException) RpcUtils(org.apache.flink.runtime.rpc.RpcUtils) DistributedCache(org.apache.flink.api.common.cache.DistributedCache) Acknowledge(org.apache.flink.runtime.messages.Acknowledge) RestHandlerException(org.apache.flink.runtime.rest.handler.RestHandlerException) SSLUtilsTest(org.apache.flink.runtime.net.SSLUtilsTest) TestingUtils(org.apache.flink.testutils.TestingUtils) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) Assert(org.junit.Assert) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) JobSubmitRequestBody(org.apache.flink.runtime.rest.messages.job.JobSubmitRequestBody) ObjectOutputStream(java.io.ObjectOutputStream) DispatcherGateway(org.apache.flink.runtime.dispatcher.DispatcherGateway) TestingDispatcherGateway(org.apache.flink.runtime.webmonitor.TestingDispatcherGateway) IOException(java.io.IOException) RestHandlerException(org.apache.flink.runtime.rest.handler.RestHandlerException) RestHandlerException(org.apache.flink.runtime.rest.handler.RestHandlerException) Test(org.junit.Test) SSLUtilsTest(org.apache.flink.runtime.net.SSLUtilsTest)

Aggregations

DispatcherGateway (org.apache.flink.runtime.dispatcher.DispatcherGateway)23 Configuration (org.apache.flink.configuration.Configuration)15 CompletableFuture (java.util.concurrent.CompletableFuture)14 Acknowledge (org.apache.flink.runtime.messages.Acknowledge)11 ExceptionUtils (org.apache.flink.util.ExceptionUtils)11 Collections (java.util.Collections)10 TestingDispatcherGateway (org.apache.flink.runtime.webmonitor.TestingDispatcherGateway)10 FutureUtils (org.apache.flink.util.concurrent.FutureUtils)10 Test (org.junit.Test)10 JobGraph (org.apache.flink.runtime.jobgraph.JobGraph)9 JobID (org.apache.flink.api.common.JobID)7 IOException (java.io.IOException)6 Path (java.nio.file.Path)6 Duration (java.time.Duration)6 Optional (java.util.Optional)6 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)6 Before (org.junit.Before)6 ObjectOutputStream (java.io.ObjectOutputStream)5 Files (java.nio.file.Files)5 ArrayList (java.util.ArrayList)5