wangyang0918 commented on a change in pull request #18450:
URL: https://github.com/apache/flink/pull/18450#discussion_r793307538
##########
File path: docs/content.zh/docs/ops/debugging/debugging_classloading.md
##########
@@ -61,22 +61,18 @@ created for an job/application and will contain the
job/application's jar files.
-->
-**Docker / Kubernetes Sessions**
+**Per-Job Mode (Yarn)**
-Docker / Kubernetes setups that start first a set of JobManagers /
TaskManagers and then submit jobs/applications via REST or the CLI
-behave like standalone sessions: Flink's code is in the Java classpath, plugin
components are loaded dynamically at startup and the job's code is loaded
dynamically.
+Currently, only Yarn supports Per-Job mode. By default, run a Flink cluster in
Per-Job mode will include the user jars
Review comment:
```suggestion
Currently, only Yarn supports Per-Job mode. By default, running a Flink
cluster in Per-Job mode will include the user jars
```
##########
File path: docs/content.zh/docs/ops/debugging/debugging_classloading.md
##########
@@ -61,22 +61,18 @@ created for an job/application and will contain the
job/application's jar files.
-->
-**Docker / Kubernetes Sessions**
+**Per-Job Mode (Yarn)**
-Docker / Kubernetes setups that start first a set of JobManagers /
TaskManagers and then submit jobs/applications via REST or the CLI
-behave like standalone sessions: Flink's code is in the Java classpath, plugin
components are loaded dynamically at startup and the job's code is loaded
dynamically.
+Currently, only Yarn supports Per-Job mode. By default, run a Flink cluster in
Per-Job mode will include the user jars
+(the JAR file specified in startup command and all JAR files in Flink's
`usrlib` folder) into the system classpath (the *AppClassLoader*).
+This behavior can be controlled with the
`yarn.per-job-cluster.include-user-jar` parameter. When setting it to
`DISABLED`,
+Flink will include the user jars in the user classpath and load them
dynamically by *FlinkUserCodeClassLoader*.
+See [Flink on Yarn]({{< ref "docs/deployment/resource-providers/yarn" >}}) for
more details.
+**Application Mode (Standalone/Yarn/Kubernetes)**
-**YARN**
-
-YARN classloading differs between single job deployments and sessions:
-
- - When submitting a Flink job/application directly to YARN (via `bin/flink
run -m yarn-cluster ...`), dedicated TaskManagers and
- JobManagers are started for that job. Those JVMs have user code classes in
the Java classpath.
- That means that there is *no dynamic classloading* involved in that case
for the job.
-
- - When starting a YARN session, the JobManagers and TaskManagers are started
with the Flink framework classes in the
- classpath. The classes from all jobs that are submitted against the
session are loaded dynamically.
+When run a Flink cluster in Application Mode(Standalone/Yarn/Kubernetes), the
user jars
Review comment:
See FLINK-24897, `usrlib` is not supported for Yarn application mode
now. But I believe this is the right direction that `usrlib` will be loaded by
`FlinkUserCodeClassLoader` by default in application mode.
##########
File path: docs/content.zh/docs/ops/debugging/debugging_classloading.md
##########
@@ -61,22 +61,18 @@ created for an job/application and will contain the
job/application's jar files.
-->
-**Docker / Kubernetes Sessions**
+**Per-Job Mode (Yarn)**
-Docker / Kubernetes setups that start first a set of JobManagers /
TaskManagers and then submit jobs/applications via REST or the CLI
-behave like standalone sessions: Flink's code is in the Java classpath, plugin
components are loaded dynamically at startup and the job's code is loaded
dynamically.
+Currently, only Yarn supports Per-Job mode. By default, run a Flink cluster in
Per-Job mode will include the user jars
+(the JAR file specified in startup command and all JAR files in Flink's
`usrlib` folder) into the system classpath (the *AppClassLoader*).
+This behavior can be controlled with the
`yarn.per-job-cluster.include-user-jar` parameter. When setting it to
`DISABLED`,
Review comment:
```suggestion
This behavior can be controlled with the
`yarn.per-job-cluster.include-user-jar` config option. When setting it to
`DISABLED`,
```
--
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]