[GitHub] [hudi] yanghua commented on a change in pull request #2621: [HUDI-1655] Allow custom date format in DatePartitionPathSelector

2021-03-04 Thread GitBox


yanghua commented on a change in pull request #2621:
URL: https://github.com/apache/hudi/pull/2621#discussion_r587994448



##
File path: 
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/DatePartitionPathSelector.java
##
@@ -130,20 +140,19 @@ public DatePartitionPathSelector(TypedProperties props, 
Configuration hadoopConf
   FileSystem fs = new Path(path).getFileSystem(serializedConf.get());
   return listEligibleFiles(fs, new Path(path), 
lastCheckpointTime).stream();
 }, partitionsListParallelism);
-// sort them by modification time.
-
eligibleFiles.sort(Comparator.comparingLong(FileStatus::getModificationTime));
+// sort them by modification time ascending.
+List sortedEligibleFiles = eligibleFiles.stream()
+
.sorted(Comparator.comparingLong(FileStatus::getModificationTime)).collect(Collectors.toList());

Review comment:
   OK, would you please add it into the ticket's description for the 
archiving purpose?





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




[GitHub] [hudi] yanghua commented on a change in pull request #2621: [HUDI-1655] Allow custom date format in DatePartitionPathSelector

2021-03-04 Thread GitBox


yanghua commented on a change in pull request #2621:
URL: https://github.com/apache/hudi/pull/2621#discussion_r587389540



##
File path: 
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/DatePartitionPathSelector.java
##
@@ -130,20 +140,19 @@ public DatePartitionPathSelector(TypedProperties props, 
Configuration hadoopConf
   FileSystem fs = new Path(path).getFileSystem(serializedConf.get());
   return listEligibleFiles(fs, new Path(path), 
lastCheckpointTime).stream();
 }, partitionsListParallelism);
-// sort them by modification time.
-
eligibleFiles.sort(Comparator.comparingLong(FileStatus::getModificationTime));
+// sort them by modification time ascending.
+List sortedEligibleFiles = eligibleFiles.stream()
+
.sorted(Comparator.comparingLong(FileStatus::getModificationTime)).collect(Collectors.toList());

Review comment:
   you mean the old logic exists this bug?





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