bgeng777 commented on a change in pull request #18531:
URL: https://github.com/apache/flink/pull/18531#discussion_r801384111



##########
File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
##########
@@ -1685,6 +1699,35 @@ void addLibFoldersToShipFiles(Collection<File> 
effectiveShipFiles) {
         }
     }
 
+    @VisibleForTesting
+    void addUsrLibFolderToShipFiles(
+            Collection<File> effectiveShipFiles, Collection<File> 
systemShipFiles) {
+        // Add usrlib folder to the ship files if it exists
+        // Classes in the folder will be loaded by UserClassLoader if 
CLASSPATH_INCLUDE_USER_JAR is
+        // DISABLED.
+        final Optional<File> usrLibDir = getLocalUsrLibDirectory();
+
+        if (usrLibDir.isPresent()) {
+            File usrLibDirFile = usrLibDir.get();
+            if (usrLibDirFile.isDirectory()) {
+                checkArgument(

Review comment:
       Agree with the naming and the `FLINK_LIB_DIR` clarification.
   Just one follow-up: I know that `FLINK_LIB_DIR` will be set by `config.sh` 
if it is empty when we run `flink run ....`.
   But when YARN run commands like `/bin/bash -c 
/usr/lib/jvm/java-1.8.0/bin/java -Xmx1073741824 -Xms1073741824 
-XX:MaxMetaspaceSize=268435456 
-Dlog.file=/mnt/disk1/log/hadoop-yarn/containers/application_1643263086460_0041/container_1643263086460_0041_01_000001/jobmanager.log
 -Dlog4j.configuration=file:log4j.properties 
-Dlog4j.configurationFile=file:log4j.properties 
org.apache.flink.yarn.entrypoint.YarnJobClusterEntrypoint -D 
jobmanager.memory.off-heap.size=134217728b -D 
jobmanager.memory.jvm-overhead.min=201326592b -D 
jobmanager.memory.jvm-metaspace.size=268435456b -D 
jobmanager.memory.heap.size=1073741824b -D 
jobmanager.memory.jvm-overhead.max=201326592b 1> 
/mnt/disk1/log/hadoop-yarn/containers/application_1643263086460_0041/container_1643263086460_0041_01_000001/jobmanager.out
 2> 
/mnt/disk1/log/hadoop-yarn/containers/application_1643263086460_0041/container_1643263086460_0041_01_000001/jobmanager.err`,
 I think the `bin/config.sh` will not executed? If I am wrong, please correct me
 . Thanks!




-- 
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-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to