shuiqiangchen commented on a change in pull request #13322:
URL: https://github.com/apache/flink/pull/13322#discussion_r491760113



##########
File path: 
flink-clients/src/main/java/org/apache/flink/client/cli/ProgramOptionsUtils.java
##########
@@ -93,4 +98,40 @@ public static ProgramOptions 
createPythonProgramOptions(CommandLine line) throws
                                        "or not working as expected.", e);
                }
        }
+
+       public static ProgramOptions 
createPythonApplicationProgramOptions(CommandLine line) throws CliArgsException,
+               NoSuchFieldException, IllegalAccessException {
+               ProgramOptions pythonProgramOptions = 
createPythonProgramOptions(line);
+               Field jarFilePath = 
pythonProgramOptions.getClass().getSuperclass().getDeclaredField("jarFilePath");
+               jarFilePath.setAccessible(true);
+               // This is the python jar path in client, which is invalid at 
runtime and it will be replaced with the actual
+               // path when retrieving the packaged program in the job manager 
container.
+               String pythonJarPath = "local:///opt/flink/opt/" + 
FilenameUtils.getName(PackagedProgramUtils.getPythonJar()

Review comment:
       Here we have two options for PyFlink job:
   1. Make a judgement that if it is PyFlink job, skip the jarFile path 
validation;
   2. Set a dummy jar file path in client side and replace it with the actual 
path in JM.
   It seems that the former is better.




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


Reply via email to