Github user gerashegalov commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20327#discussion_r176825696
  
    --- Diff: 
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala
 ---
    @@ -136,6 +135,39 @@ class YarnClusterSuite extends BaseYarnClusterSuite {
         checkResult(finalState, result)
       }
     
    +  private def testClusterDriverBind(
    +      uiEnabled: Boolean,
    +      localHost: String,
    +      localIp: String,
    +      success: Boolean): Unit = {
    +    val result = File.createTempFile("result", null, tempDir)
    +    val finalState = runSpark(false, 
mainClassName(YarnClusterDriver.getClass),
    +      appArgs = Seq(result.getAbsolutePath()),
    +      extraConf = Map(
    +        "spark.yarn.appMasterEnv.SPARK_LOCAL_HOSTNAME" -> localHost,
    +        "spark.yarn.appMasterEnv.SPARK_LOCAL_IP" -> localIp,
    +        "spark.ui.enabled" -> uiEnabled.toString
    +      ))
    +    if (success) {
    +      checkResult(finalState, result, "success")
    +    } else {
    +      finalState should be (SparkAppHandle.State.FAILED)
    +    }
    +  }
    +
    +  test("yarn-cluster driver should be able to bind listeners to MM_HOST") {
    --- End diff --
    
    Maybe we are talking about different parts of the patch. This thread is 
attached to my test code where I am demoing how this happens. It doesn't 
explicitly validate the generated URL's, only how bind works/fails.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to