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



##########
File path: 
zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
##########
@@ -142,6 +141,7 @@
   private ScheduledExecutorService resultCleanService = 
Executors.newSingleThreadScheduledExecutor();
 
   private boolean isTest;
+  private boolean isFlinkK8sApplicationMode = false;

Review comment:
       That's right, but I think this is the only way for flink k8s mode. For 
flink k8s mode, the `RemoteInterpreterServer#main` is the not the actual main 
entry point, `RemoteInterpreterServer#main` will be called by flink framework 
via reflection. So if we call `System.exit()` method in flink's k8s mode, it 
would make flink framework think that the flink job is exited abnormally, and 
will restart it again which is not what we expect. Let me add some comment to 
explain it in this class 

##########
File path: 
flink/interpreter/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
##########
@@ -312,9 +323,12 @@ class FlinkScalaInterpreter(val properties: Properties) {
           // remote mode
           if (mode == ExecutionMode.YARN_APPLICATION) {
             val yarnAppId = System.getenv("_APP_ID");
-            LOGGER.info("Use FlinkCluster in yarn application mode, appId: 
{}", yarnAppId)
+            LOGGER.info("Use FlinkCluster in yarn-application mode, appId: 
{}", yarnAppId)
             this.jmWebUrl = "http://localhost:"; + 
HadoopUtils.getFlinkRestPort(yarnAppId)
             this.displayedJMWebUrl = 
HadoopUtils.getYarnAppTrackingUrl(yarnAppId)
+          } else if (mode == ExecutionMode.KUBERNETES_APPLICATION) {
+            LOGGER.info("Use FlinkCluster in kubernetes-application mode")
+            this.jmWebUrl = "http://localhost:8083";
           } else {

Review comment:
       I split it into 2 methods: createFlinkILoop & initFlinkILoop




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