Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-31844

DefaultPackagedProgramRetriever#getClasspathsFromUserLibDir supports loading profile

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      now getClasspathsFromUserLibDir only load JarFile, i dont know why, but i think we can add non-jar files to classpath mapohl

            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);
          }
      

      https://github.com/apache/flink/blob/9538fdaab2948a2e3dd068925d936ac0777301de/flink-clients/src/main/java/org/apache/flink/client/program/DefaultPackagedProgramRetriever.java#L227

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Bo Cui Bo Cui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: