zjffdu commented on a change in pull request #4142:
URL: https://github.com/apache/zeppelin/pull/4142#discussion_r654169553



##########
File path: 
flink/flink-scala-parent/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
##########
@@ -318,6 +318,12 @@ abstract class FlinkScalaInterpreter(val properties: 
Properties,
             LOGGER.info("Use FlinkCluster in yarn application mode, appId: 
{}", yarnAppId)
             this.jmWebUrl = "http://localhost:"; + 
HadoopUtils.getFlinkRestPort(yarnAppId)
             this.displayedJMWebUrl = 
HadoopUtils.getYarnAppTrackingUrl(yarnAppId)
+            if (properties.getProperty("flink.webui.yarn.useProxy", 
"false").toBoolean) {
+              val yarnAddress = 
properties.getProperty("flink.webui.yarn.address")
+              if (!StringUtils.isBlank(yarnAddress)) {

Review comment:
       It is better to extract one method for both yarn mode and 
yarn-application to avoid code duplication

##########
File path: 
flink/flink-scala-parent/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
##########
@@ -843,6 +843,18 @@ abstract class FlinkScalaInterpreter(val properties: 
Properties,
     })
   }
 
+  private def isYarnUseProxy(): Boolean = {
+    properties.getProperty("flink.webui.yarn.useProxy", "false").toBoolean
+  }
+
+  private def getJmWebUrlUnderProxy(): String = {
+    // for some cloud vender, the yarn address may be mapped to some other 
address.
+    val yarnAddress = properties.getProperty("flink.webui.yarn.address")
+    if (StringUtils.isNotBlank(yarnAddress)) {

Review comment:
       no return value if it is false




-- 
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


Reply via email to