Github user mxm commented on a diff in the pull request: https://github.com/apache/flink/pull/2708#discussion_r86545553 --- Diff: flink-dist/src/main/flink-bin/yarn-bin/yarn-session.sh --- @@ -35,14 +33,15 @@ JVM_ARGS="$JVM_ARGS -Xmx512m" # Flink CLI client constructCLIClientClassPath() { - for jarfile in $FLINK_LIB_DIR/*.jar ; do - if [[ $CC_CLASSPATH = "" ]]; then - CC_CLASSPATH=$jarfile; - else - CC_CLASSPATH=$CC_CLASSPATH:$jarfile - fi - done - echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS + while read -d '' -r jarfile ; do + if [[ $FLINK_CLASSPATH = "" ]]; then + CC_CLASSPATH="$jarfile"; + else + CC_CLASSPATH="$CC_CLASSPATH":"$jarfile" + fi + done < <(find "$FLINK_LIB_DIR" -name '*.jar' -print0) + + echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS --- End diff -- Recursing over the lib folder for uploading is not necessary because Yarn already recursively uploads it into the home directory using `FileUtil#copyFromLocalFile`. We just have to make sure to generate the classpath including all subdirectories. The easiest fix would be to use `lib/**` instead of `lib/*` which would be a one-line change.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---