Matrix42 commented on a change in pull request #8011: [FLINK-11958][on-yarn] 
fix flink on windows yarn deploy failed
URL: https://github.com/apache/flink/pull/8011#discussion_r267170387
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
 ##########
 @@ -1555,7 +1555,15 @@ protected ContainerLaunchContext 
setupApplicationMasterContainer(
                ContainerLaunchContext amContainer = 
Records.newRecord(ContainerLaunchContext.class);
 
                final  Map<String, String> startCommandValues = new HashMap<>();
-               startCommandValues.put("java", "$JAVA_HOME/bin/java");
+               String osName = System.getProperty("os.name");
+               String javaHome;
+               if (osName.startsWith("Windows")) {
+                       javaHome = "%JAVA_HOME%";
 
 Review comment:
   There can't use the value of $JAVA_HOME,  because the  JAVA_HOME may 
different between the machine submmit job and the machine running job.

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