Sxnan commented on a change in pull request #18395:
URL: https://github.com/apache/flink/pull/18395#discussion_r794988000



##########
File path: 
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
##########
@@ -357,7 +357,8 @@ public void close() {
                                                         
artifactFilePath.getName()));
                                         filesToUpload.add(
                                                 new FileUpload(
-                                                        
Paths.get(artifacts.getValue().filePath),
+                                                        Paths.get(
+                                                                
artifactFilePath.toUri().getPath()),

Review comment:
       If the `URI` of the artifactFilePath doesn't have a scheme, the 
`Paths.get` throws an `IllegalArgumentException` exception. In order to support 
both with and without schema, we have to use the `Paths.get` that takes a file 
path string.
   
   By looking at the code, I notice that `artifactFilePath.toUri().getPath()` 
is the same as `artifactFilePath.getPath()`. I think we can use 
`artifactFilePath.getPath()`. What do you think?




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to