ovj commented on a change in pull request #651: Spark Stage retry handling
URL: https://github.com/apache/incubator-hudi/pull/651#discussion_r280933404
 
 

 ##########
 File path: hoodie-common/src/main/java/com/uber/hoodie/common/util/FSUtils.java
 ##########
 @@ -175,18 +202,43 @@ public static String getRelativePartitionPath(Path 
basePath, Path partitionPath)
    */
   public static List<String> getAllFoldersWithPartitionMetaFile(FileSystem fs, 
String basePathStr)
       throws IOException {
-    List<String> partitions = new ArrayList<>();
-    Path basePath = new Path(basePathStr);
-    RemoteIterator<LocatedFileStatus> allFiles = fs.listFiles(new 
Path(basePathStr), true);
-    while (allFiles.hasNext()) {
-      Path filePath = allFiles.next().getPath();
+    final Path basePath = new Path(basePathStr);
+    final List<String> partitions = new ArrayList<>();
+    processFiles(fs, basePathStr, (locatedFileStatus) -> {
+      Path filePath = locatedFileStatus.getPath();
       if 
(filePath.getName().equals(HoodiePartitionMetadata.HOODIE_PARTITION_METAFILE)) {
         partitions.add(getRelativePartitionPath(basePath, 
filePath.getParent()));
       }
-    }
+      return true;
+    });
     return partitions;
   }
 
+  public static final List<String> getAllDataFilesForMarkers(FileSystem fs, 
String basePath, String instantTs,
+      String markerDir) throws IOException {
+    List<String> dataFiles = new ArrayList<>();
 
 Review comment:
   ArrayList -> LinkedList? We can endup resizing it a lot.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to