TisonKun commented on a change in pull request #9575: [FLINK-13912][client] Remove ClusterClient#getClusterConnectionInfo URL: https://github.com/apache/flink/pull/9575#discussion_r319634038
########## File path: flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java ########## @@ -513,12 +509,8 @@ private void validateClusterSpecification(ClusterSpecification clusterSpecificat yarnApplication, validClusterSpecification); - String host = report.getHost(); - int port = report.getRpcPort(); - - // Correctly initialize the Flink config - flinkConfiguration.setString(JobManagerOptions.ADDRESS, host); - flinkConfiguration.setInteger(JobManagerOptions.PORT, port); Review comment: Aha! Even I found a reason that we "need" these stmts because when build HAService at client-side we have to build one just like on cluster client thus if `JobManagerOption` not set it will fail with ``` Test testPerJobMode(org.apache.flink.yarn.YARNITCase) failed with: org.apache.flink.client.deployment.ClusterDeploymentException: Could not deploy Yarn job cluster. at org.apache.flink.yarn.YarnClusterDescriptor.deployJobCluster(YarnClusterDescriptor.java:82) at org.apache.flink.yarn.YARNITCase.lambda$testPerJobMode$0(YARNITCase.java:109) at org.apache.flink.yarn.YarnTestBase.runTest(YarnTestBase.java:229) at org.apache.flink.yarn.YARNITCase.testPerJobMode(YARNITCase.java:69) 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:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Suppressed: java.lang.AssertionError: There is at least one application on the cluster that is not finished.[App application_1567190598292_0001 is in state RUNNING.] at org.junit.Assert.fail(Assert.java:88) at org.apache.flink.yarn.YarnTestBase$CleanupYarnApplication.close(YarnTestBase.java:257) at org.apache.flink.yarn.YarnTestBase.runTest(YarnTestBase.java:230) ... 31 more Caused by: org.apache.flink.util.ConfigurationException: Config parameter 'Key: 'jobmanager.rpc.address' , default: null (fallback keys: [])' is missing (hostname/address of JobManager to connect to). at org.apache.flink.runtime.highavailability.HighAvailabilityServicesUtils.getJobManagerAddress(HighAvailabilityServicesUtils.java:150) at org.apache.flink.runtime.highavailability.HighAvailabilityServicesUtils.createHighAvailabilityServices(HighAvailabilityServicesUtils.java:86) at org.apache.flink.client.program.ClusterClient.<init>(ClusterClient.java:112) at org.apache.flink.client.program.rest.RestClusterClient.<init>(RestClusterClient.java:175) at org.apache.flink.client.program.rest.RestClusterClient.<init>(RestClusterClient.java:148) at org.apache.flink.yarn.YarnClusterDescriptor.createYarnClusterClient(YarnClusterDescriptor.java:96) at org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:518) at org.apache.flink.yarn.YarnClusterDescriptor.deployJobCluster(YarnClusterDescriptor.java:75) ... 33 more ``` this is what FLINK-13750 want to resolve, i.e., do not instance service that is never needed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services