You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/02/02 15:29:29 UTC

[GitHub] [hudi] garyli1019 commented on a change in pull request #2296: [HUDI-1425] Performance loss with the additional hoodieRecords.isEmpt…

garyli1019 commented on a change in pull request #2296:
URL: https://github.com/apache/hudi/pull/2296#discussion_r568693017



##########
File path: hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/action/compact/TestHoodieCompactor.java
##########
@@ -186,7 +191,7 @@ public void testWriteStatusContentsAfterCompaction() throws Exception {
       for (String partitionPath : dataGen.getPartitionPaths()) {
         List<WriteStatus> writeStatuses = result.collect();
         assertTrue(writeStatuses.stream()
-            .filter(writeStatus -> writeStatus.getStat().getPartitionPath().contentEquals(partitionPath)).count() > 0);
+            .filter(writeStatus1 -> writeStatus1.getStat().getPartitionPath().contentEquals(partitionPath)).count() > 0);

Review comment:
       should remain unchanged? 

##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -173,6 +173,10 @@ public boolean commitStats(String instantTime, List<HoodieWriteStat> stats, Opti
 
   public boolean commitStats(String instantTime, List<HoodieWriteStat> stats, Option<Map<String, String>> extraMetadata,
                              String commitActionType, Map<String, List<String>> partitionToReplaceFileIds) {
+    // Skip the empty commit
+    if (stats.isEmpty()) {

Review comment:
       Will this check impact the performance of non-empty commit? Will the previous stages being cached?
   I personally feel it's better to do the empty check before run into hudi's operation.




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