zentol commented on a change in pull request #7420: [FLINK-11272][flink-yarn]
Support for parsing multiple --yarnship par…
URL: https://github.com/apache/flink/pull/7420#discussion_r249017741
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
##########
@@ -311,14 +311,16 @@ private AbstractYarnClusterDescriptor createDescriptor(
}
List<File> shipFiles = new ArrayList<>();
- // path to directory to ship
+ // path to directories to ship
if (cmd.hasOption(shipPath.getOpt())) {
- String shipPath =
cmd.getOptionValue(this.shipPath.getOpt());
- File shipDir = new File(shipPath);
- if (shipDir.isDirectory()) {
- shipFiles.add(shipDir);
- } else {
- LOG.warn("Ship directory is not a directory.
Ignoring it.");
+ String[] shipPaths =
cmd.getOptionValues(this.shipPath.getOpt());
+ for (String shipPath : shipPaths) {
+ File shipDir = new File(shipPath);
+ if (shipDir.isDirectory()) {
+ shipFiles.add(shipDir);
+ } else {
+ LOG.warn("Ship directory {} is not a
directory. Ignoring it.", shipDir.getAbsolutePath());
Review comment:
With the removal of hadoop from flink-dist I have to update the YARN IT
cases to explicitly ship flink-shaded-hadoop. Ideally I could just add `-yt
<path-to-shaded-jar>`, but that doesn't work in all cases. (Strangely it seems
to work for some, but I may have messed up somewhere)
Requiring me (or users for that matter) to always create a directory first
is just a little inconvenient, that's all.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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