You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/29 02:46:11 UTC
[GitHub] [flink] Sxnan commented on a change in pull request #18395: [FLINK-25685][rest] RestClusterClient supports uploading local file path with scheme
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org