yukuai518 commented on a change in pull request #2581: [GOBBLIN-713] Lazy load 
job specification from job catalog to avoid OOM issue.
URL: https://github.com/apache/incubator-gobblin/pull/2581#discussion_r269345097
 
 

 ##########
 File path: 
gobblin-utility/src/main/java/org/apache/gobblin/util/PullFileLoader.java
 ##########
 @@ -212,6 +212,47 @@ public Config loadPullFile(Path path, Config sysProps, 
boolean loadGlobalPropert
     }
   }
 
+  public List<Path> fetchJobFilesRecursively(Path path) {
+    return getSortedPaths(fetchJobFilePathsRecursivelyHelper(path));
+  }
+
+  private List<Path> getSortedPaths(List<PathWithTimeStamp> 
pathsWithTimeStamps) {
+    List<Path> sortedPaths = Lists.newArrayList();
+    Collections.sort(pathsWithTimeStamps, Comparator.comparingLong(o -> 
o.timeStamp));
+    for (PathWithTimeStamp pathWithTimeStamp : pathsWithTimeStamps) {
+      sortedPaths.add(pathWithTimeStamp.path);
+    }
+    return sortedPaths;
+  }
+
+  private List<PathWithTimeStamp> fetchJobFilePathsRecursivelyHelper(Path 
path) {
 
 Review comment:
   Resolved

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


With regards,
Apache Git Services

Reply via email to