flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] GJL commented on a change in pull request #10152: [FLINK-14466][runtime] Let YarnJobClusterEntrypoint use user code class loader
Date Fri, 15 Nov 2019 12:30:48 GMT
GJL commented on a change in pull request #10152: [FLINK-14466][runtime] Let YarnJobClusterEntrypoint
use user code class loader
URL: https://github.com/apache/flink/pull/10152#discussion_r346798165
 
 

 ##########
 File path: flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnJobClusterEntrypoint.java
 ##########
 @@ -61,10 +66,21 @@ protected String getRPCPortRange(Configuration configuration) {
 	}
 
 	@Override
-	protected DefaultDispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(Configuration
configuration) {
+	protected DefaultDispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(Configuration
configuration) throws IOException {
+		final YarnConfigOptions.UserJarInclusion userJarInclusion = configuration
 
 Review comment:
   Let's extract this block as 
   
   ```
   	@Nullable
   	private static File getUsrLibDir(final Configuration configuration) {
   		final YarnConfigOptions.UserJarInclusion userJarInclusion = configuration
   			.getEnum(YarnConfigOptions.UserJarInclusion.class, YarnConfigOptions.CLASSPATH_INCLUDE_USER_JAR);
   		final Optional<File> userLibDir = tryFindUserLibDirectory();
   
   		checkState(
   			userJarInclusion != YarnConfigOptions.UserJarInclusion.DISABLED || userLibDir.isPresent(),
   			"The %s is set to %s. But the usrlib directory does not exist.",
   				YarnConfigOptions.CLASSPATH_INCLUDE_USER_JAR.key(),
   				YarnConfigOptions.UserJarInclusion.DISABLED);
   
   		return userJarInclusion == YarnConfigOptions.UserJarInclusion.DISABLED ? userLibDir.get()
: null;
   	}
   ```
   
   to keep the methods shorter.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message