tillrohrmann 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_r342056443
##########
File path:
flink-container/src/main/java/org/apache/flink/container/entrypoint/StandaloneJobClusterEntryPoint.java
##########
@@ -74,10 +79,20 @@ private StandaloneJobClusterEntryPoint(
}
@Override
- protected DispatcherResourceManagerComponentFactory
createDispatcherResourceManagerComponentFactory(Configuration configuration) {
+ protected DispatcherResourceManagerComponentFactory
createDispatcherResourceManagerComponentFactory(Configuration configuration)
throws IOException {
+ final String flinkHomeDir = System.getenv(ENV_FLINK_HOME_DIR);
+ if (flinkHomeDir == null) {
+ throw new FlinkRuntimeException(String.format("Does not
specify the %s environment var", ENV_FLINK_HOME_DIR));
+ }
+ final File jobDir = new File(flinkHomeDir,
DEFAULT_JOB_DIRECTORY_NAME);
Review comment:
I'd suggest to factor the logic to obtain the home directory into some
utility class from where it can be reused.
----------------------------------------------------------------
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