zjffdu commented on a change in pull request #3719: [ZEPPELIN-4725]. Merge 
process env into interpreter process env in InterpreterLauncher
URL: https://github.com/apache/zeppelin/pull/3719#discussion_r405642307
 
 

 ##########
 File path: 
zeppelin-plugins/launcher/flink/src/main/java/org/apache/zeppelin/interpreter/launcher/FlinkInterpreterLauncher.java
 ##########
 @@ -34,16 +35,16 @@ public FlinkInterpreterLauncher(ZeppelinConfiguration 
zConf, RecoveryStorage rec
   public Map<String, String> buildEnvFromProperties(InterpreterLaunchContext 
context)
           throws IOException {
     Map<String, String> envs = super.buildEnvFromProperties(context);
-    String flinkHome = context.getProperties().getProperty("FLINK_HOME");
-    if (flinkHome == null) {
+    String flinkHome = context.getProperties().getProperty("FLINK_HOME", 
envs.get("FLINK_HOME"));
+    if (StringUtils.isBlank(flinkHome)) {
       throw new IOException("FLINK_HOME is not specified");
     }
     File flinkHomeFile = new File(flinkHome);
     if (!flinkHomeFile.exists()) {
-      throw new IOException(String.format("FLINK_HOME %s doesn't exist", 
flinkHome));
+      throw new IOException(String.format("FLINK_HOME '%s' doesn't exist", 
flinkHome));
     }
     if (flinkHomeFile.isFile()) {
-      throw new IOException(String.format("FLINK_HOME %s is a file, but should 
be directory",
+      throw new IOException(String.format("FLINK_HOME '%s' is a file, but 
should be directory",
               flinkHome));
 
 Review comment:
   Thanks for the careful review, I have fixed it. 

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


With regards,
Apache Git Services

Reply via email to