XComp commented on a change in pull request #16286:
URL: https://github.com/apache/flink/pull/16286#discussion_r661745110
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnApplicationClusterEntryPoint.java
##########
@@ -129,16 +129,12 @@ private static PackagedProgramRetriever
getPackagedProgramRetriever(
final Configuration configuration,
final String[] programArguments,
@Nullable final String jobClassName)
- throws IOException {
+ throws FlinkException {
final File userLibDir =
YarnEntrypointUtils.getUsrLibDir(configuration).orElse(null);
final File userApplicationJar = getUserApplicationJar(userLibDir,
configuration);
- final ClassPathPackagedProgramRetriever.Builder retrieverBuilder =
- ClassPathPackagedProgramRetriever.newBuilder(programArguments)
- .setUserLibDirectory(userLibDir)
- .setJarFile(userApplicationJar)
- .setJobClassName(jobClassName);
- return retrieverBuilder.build();
+ return PackagedProgramRetrieverImpl.create(
+ userLibDir, userApplicationJar, jobClassName,
programArguments, configuration);
Review comment:
I switched to actual factory methods because we didn't use the builder
functionality. `@Nullable` values are passed. The production code boiled down
to two different signatures reflected in the
`PackagedProgramRetrieverImpl.create` factory methods.
--
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]