dianfu commented on a change in pull request #8472: [FLINK-12327][python] Adds 
support to submit Python Table API job in CliFrontend
URL: https://github.com/apache/flink/pull/8472#discussion_r284993976
 
 

 ##########
 File path: 
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
 ##########
 @@ -169,18 +172,26 @@ public PackagedProgram(File jarFile, @Nullable String 
entryPointClassName, Strin
         *         may be a missing / wrong class or manifest files.
         */
        public PackagedProgram(File jarFile, List<URL> classpaths, @Nullable 
String entryPointClassName, String... args) throws ProgramInvocationException {
-               if (jarFile == null) {
-                       throw new IllegalArgumentException("The jar file must 
not be null.");
+               // Whether the job is python job and PythonRunner is the entry 
point.
+               if (entryPointClassName != null && 
entryPointClassName.equals("org.apache.flink.client.python.PythonDriver")) {
+                       isPython = true;
                }
 
-               URL jarFileUrl;
-               try {
-                       jarFileUrl = jarFile.getAbsoluteFile().toURI().toURL();
-               } catch (MalformedURLException e1) {
-                       throw new IllegalArgumentException("The jar file path 
is invalid.");
+               if (jarFile == null && !isPython) {
+                       throw new IllegalArgumentException("The jar file must 
not be null.");
                }
 
-               checkJarFile(jarFileUrl);
+               // If the job is java job
+               URL jarFileUrl = null;
+               if (jarFile != null && !isPython) {
 
 Review comment:
   jarFile != null && !isPython -> jarFile != null

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


With regards,
Apache Git Services

Reply via email to