Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-9631

Flink 1.10 test execution is broken due to premature test cluster shutdown

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.21.0
    • Component/s: runner-flink
    • Labels:
      None

      Description

      Due to a race condition with the test cluster shutdown code, tests may fail because the Flink job result cannot be retrieved when the cluster already has been shut down. This is a Flink 1.10.0 bug which is addressed upstream via FLINK-16705.

      If this doesn't get addressed upstream, we may also be able to work around this.

      java.lang.RuntimeException: Pipeline execution failed
      	at org.apache.beam.runners.flink.FlinkRunner.run(FlinkRunner.java:115)
      	at org.apache.beam.runners.flink.TestFlinkRunner.run(TestFlinkRunner.java:61)
      	at org.apache.beam.sdk.Pipeline.run(Pipeline.java:317)
      	at org.apache.beam.sdk.testing.TestPipeline.run(TestPipeline.java:350)
      	at org.apache.beam.sdk.testing.TestPipeline.run(TestPipeline.java:331)
      	at org.apache.beam.sdk.transforms.ViewTest.testMultimapSideInput(ViewTest.java:543)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.apache.beam.sdk.testing.TestPipeline$1.evaluate(TestPipeline.java:319)
      	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:266)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:305)
      	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:365)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:330)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:78)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:328)
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:65)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:292)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:305)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:412)
      	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110)
      	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
      	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
      	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
      	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
      	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
      	at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
      	at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
      	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
      	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
      	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
      	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: MiniCluster is not yet running.
      	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
      	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
      	at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:864)
      	at org.apache.beam.runners.flink.FlinkPipelineExecutionEnvironment.executePipeline(FlinkPipelineExecutionEnvironment.java:139)
      	at org.apache.beam.runners.flink.FlinkRunner.run(FlinkRunner.java:112)
      	... 57 more
      Caused by: java.lang.IllegalStateException: MiniCluster is not yet running.
      	at org.apache.flink.util.Preconditions.checkState(Preconditions.java:195)
      	at org.apache.flink.runtime.minicluster.MiniCluster.getDispatcherGatewayFuture(MiniCluster.java:678)
      	at org.apache.flink.runtime.minicluster.MiniCluster.runDispatcherCommand(MiniCluster.java:592)
      	at org.apache.flink.runtime.minicluster.MiniCluster.requestJobResult(MiniCluster.java:668)
      	at org.apache.flink.client.program.MiniClusterClient.requestJobResult(MiniClusterClient.java:73)
      	at org.apache.flink.client.deployment.ClusterClientJobClientAdapter.lambda$getJobExecutionResult$7(ClusterClientJobClientAdapter.java:107)
      	at org.apache.flink.client.deployment.ClusterClientJobClientAdapter.bridgeClientRequest(ClusterClientJobClientAdapter.java:126)
      	at org.apache.flink.client.deployment.ClusterClientJobClientAdapter.getJobExecutionResult(ClusterClientJobClientAdapter.java:104)
      	... 60 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mxm Maximilian Michels
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: