cuspymd commented on a change in pull request #4116:
URL: https://github.com/apache/zeppelin/pull/4116#discussion_r634453738
##########
File path:
flink/interpreter/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
##########
@@ -182,16 +182,27 @@ class FlinkScalaInterpreter(val properties: Properties) {
properties.getProperty("flink.execution.mode", "LOCAL")
.replace("-", "_")
.toUpperCase)
- if (mode == ExecutionMode.YARN_APPLICATION) {
+
+ if (ExecutionMode.isYarnAppicationMode(mode)) {
if (flinkVersion.isFlink110) {
- throw new Exception("yarn-application mode is only supported after
Flink 1.11")
+ throw new Exception("application mode is only supported after Flink
1.11")
}
// use current yarn container working directory as FLINK_HOME,
FLINK_CONF_DIR and HIVE_CONF_DIR
val workingDirectory = new File(".").getAbsolutePath
flinkHome = workingDirectory
flinkConfDir = workingDirectory
hiveConfDir = workingDirectory
+ } else if (ExecutionMode.isK8sApplicationMode(mode)) {
+ if (flinkVersion.isFlink110) {
+ throw new Exception("application mode is only supported after Flink
1.11")
+ }
+ // use current k8s working directory as FLINK_HOME
+ val workingDirectory = new File(".").getAbsolutePath
+ flinkHome = workingDirectory
Review comment:
The repeated codes might be moved outside the if statement(186 line).
--
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:
[email protected]