Reamer commented on a change in pull request #4116: URL: https://github.com/apache/zeppelin/pull/4116#discussion_r724873411
########## File path: zeppelin-plugins/launcher/flink/src/main/java/org/apache/zeppelin/interpreter/launcher/FlinkInterpreterLauncher.java ########## @@ -59,14 +62,29 @@ public FlinkInterpreterLauncher(ZeppelinConfiguration zConf, RecoveryStorage rec normalizeConfiguration(context); String flinkExecutionMode = context.getProperties().getProperty("flink.execution.mode"); - // yarn application mode specific logic - if ("yarn-application".equalsIgnoreCase(flinkExecutionMode)) { - updateEnvsForYarnApplicationMode(envs, context); + if (!FLINK_EXECUTION_MODES.contains(flinkExecutionMode)) { + throw new IOException("Not valid flink.execution.mode: " + + flinkExecutionMode + ", valid modes ares: " + + FLINK_EXECUTION_MODES.stream().collect(Collectors.joining(", "))); + } + // application mode specific logic + if (isApplicationMode(flinkExecutionMode)) { + updateEnvsForApplicationMode(flinkExecutionMode, envs, context); } - String flinkAppJar = chooseFlinkAppJar(flinkHome); - LOGGER.info("Choose FLINK_APP_JAR: {}", flinkAppJar); - envs.put("FLINK_APP_JAR", flinkAppJar); + if (isK8sApplicationMode(flinkExecutionMode)) { + String flinkAppJar = context.getProperties().getProperty("flink.app.jar"); + if (StringUtils.isBlank(flinkAppJar)) { + throw new IOException("flink.app.jar is not specified for kubernetes-application mode"); + } + envs.put("FLINK_APP_JAR", flinkAppJar); + LOGGER.info("K8s application's FLINK_APP_JAR : " + flinkAppJar); + context.getProperties().put("zeppelin.interpreter.forceShutdown", "true"); Review comment: I think you should switch to `false` here. -- 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. To unsubscribe, e-mail: dev-unsubscr...@zeppelin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org