flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] guoweiM commented on a change in pull request #9950: [FLINK-14464][runtime] Introduce the AbstractUserClassPathJobGraphRetriever
Date Fri, 01 Nov 2019 06:14:28 GMT
guoweiM commented on a change in pull request #9950: [FLINK-14464][runtime] Introduce the AbstractUserClassPathJobGraphRetriever
URL: https://github.com/apache/flink/pull/9950#discussion_r341461919

 File path: flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/component/AbstractUserClassPathJobGraphRetriever.java
 @@ -19,39 +19,41 @@
 package org.apache.flink.runtime.entrypoint.component;
 import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.function.FunctionUtils;
 import javax.annotation.Nullable;
-import java.io.File;
 import java.io.IOException;
 import java.net.URL;
-import java.util.ArrayList;
+import java.nio.file.Path;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+import java.util.stream.Collectors;
  *  Abstract class for the JobGraphRetriever which supports getting user classpaths.
 public abstract class AbstractUserClassPathJobGraphRetriever implements JobGraphRetriever
 	/** User classpaths in relative form to the working directory. */
-	private final List<URL> userClassPaths;
+	private final Collection<URL> userClassPaths;
-	protected AbstractUserClassPathJobGraphRetriever(@Nullable final File jobDir) throws IOException
+	protected AbstractUserClassPathJobGraphRetriever(@Nullable final Path jobDir) throws IOException
 Review comment:
   `Path` may represent an arbitrary file system. We may not be able to infer which a relative
path actually represents.
   But this is not the case with `File` (the file system that uses the JDK default implementation).
Because if File uses a relative path, all operations in JDK(java.io) will use the working_dir
+ relative path. Even if we end up using URLs, we still want other components to use the same
FileSystem operation to interpret this relative path.
   That's why I use File instead of Path here. I want to know if I have anything missing.

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:

With regards,
Apache Git Services

View raw message