zhuzhurk commented on a change in pull request #10076: [FLINK-14465][runtime]
Let `StandaloneJobClusterEntrypoint` use user code class loader
URL: https://github.com/apache/flink/pull/10076#discussion_r342423583
##########
File path:
flink-container/src/main/java/org/apache/flink/container/entrypoint/ClassPathJobGraphRetriever.java
##########
@@ -111,11 +117,10 @@ public JobGraph retrieveJobGraph(Configuration
configuration) throws FlinkExcept
}
private PackagedProgram createPackagedProgram() throws FlinkException {
- final String entryClass = getJobClassNameOrScanClassPath();
try {
- final Class<?> mainClass =
getClass().getClassLoader().loadClass(entryClass);
- return new PackagedProgram(mainClass, programArguments);
- } catch (ClassNotFoundException | ProgramInvocationException e)
{
+ final String entryClass =
getJobClassNameOrScanClassPath();
+ return new PackagedProgram(null, new
ArrayList<>(getUserClassPaths()), entryClass, programArguments);
Review comment:
Looks to me this PackagedProgram constructor behaves a bit differently to
the previous one.
The previous one considers entryPointClassName
"org.apache.flink.client.python.PythonDriver" or
"org.apache.flink.client.python.PythonGatewayServer" to be python program,
while the current used one only respects
"org.apache.flink.client.python.PythonDriver". Not sure if it's a bug or
expected. Would you take a check or confirm with related devs?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services