You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Bo Cui (Jira)" <ji...@apache.org> on 2023/04/18 13:05:00 UTC
[jira] [Created] (FLINK-31844) DefaultPackagedProgramRetriever#getClasspathsFromUserLibDir supports loading profile
Bo Cui created FLINK-31844:
------------------------------
Summary: DefaultPackagedProgramRetriever#getClasspathsFromUserLibDir supports loading profile
Key: FLINK-31844
URL: https://issues.apache.org/jira/browse/FLINK-31844
Project: Flink
Issue Type: Improvement
Components: Deployment / Kubernetes
Reporter: Bo Cui
now getClasspathsFromUserLibDir only load JarFile, i dont know why, but i think we can add non-jar files to classpath
{code:java}
private static List<URL> getClasspathsFromUserLibDir(@Nullable File userLibDir)
throws IOException {
if (userLibDir == null) {
return Collections.emptyList();
}
final Path workingDirectory = FileUtils.getCurrentWorkingDirectory();
final List<URL> relativeJarURLs =
FileUtils.listFilesInDirectory(userLibDir.toPath(), FileUtils::isJarFile).stream()
.map(path -> FileUtils.relativizePath(workingDirectory, path))
.map(FunctionUtils.uncheckedFunction(FileUtils::toURL))
.collect(Collectors.toList());
return Collections.unmodifiableList(relativeJarURLs);
}
{code}
https://github.com/apache/flink/blob/9538fdaab2948a2e3dd068925d936ac0777301de/flink-clients/src/main/java/org/apache/flink/client/program/DefaultPackagedProgramRetriever.java#L227
--
This message was sent by Atlassian Jira
(v8.20.10#820010)