qinf commented on code in PR #23219:
URL: https://github.com/apache/flink/pull/23219#discussion_r1298095017
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -202,16 +204,27 @@ public YarnClusterDescriptor(
this.nodeLabel =
flinkConfiguration.getString(YarnConfigOptions.NODE_LABEL);
}
- private Optional<List<File>> decodeFilesToShipToCluster(
+ private Optional<List<Path>> decodeFilesToShipToCluster(
final Configuration configuration, final
ConfigOption<List<String>> configOption) {
checkNotNull(configuration);
checkNotNull(configOption);
- final List<File> files =
- ConfigUtils.decodeListFromConfig(configuration, configOption,
File::new);
+ List<Path> files = ConfigUtils.decodeListFromConfig(configuration,
configOption, Path::new);
+ files =
+ files.stream()
+ .map(
+ path ->
+ isLocalPath(path)
+ ? new Path(new
File(path.toString()).toURI())
+ : path)
+ .collect(Collectors.toList());
return files.isEmpty() ? Optional.empty() : Optional.of(files);
}
+ private boolean isLocalPath(Path path) {
Review Comment:
@1996fanrui I have updated `isLocalPath(Path path)` to `isWithoutSchema()`.
--
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]