hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1159: [HUDI-479] Eliminate or Minimize use of Guava if possible
Date Thu, 26 Mar 2020 05:29:36 GMT
vinothchandar commented on a change in pull request #1159: [HUDI-479] Eliminate or Minimize
use of Guava if possible
URL: https://github.com/apache/incubator-hudi/pull/1159#discussion_r398320467
 
 

 ##########
 File path: hudi-common/src/main/java/org/apache/hudi/common/util/CleanerUtils.java
 ##########
 @@ -28,19 +28,19 @@
 import org.apache.hudi.common.versioning.clean.CleanV1MigrationHandler;
 import org.apache.hudi.common.versioning.clean.CleanV2MigrationHandler;
 
-import com.google.common.collect.ImmutableMap;
-
 import java.io.IOException;
 import java.util.List;
 
+import static org.apache.hudi.common.util.CollectionUtils.Maps;
+
 public class CleanerUtils {
   public static final Integer CLEAN_METADATA_VERSION_1 = CleanV1MigrationHandler.VERSION;
   public static final Integer CLEAN_METADATA_VERSION_2 = CleanV2MigrationHandler.VERSION;
   public static final Integer LATEST_CLEAN_METADATA_VERSION = CLEAN_METADATA_VERSION_2;
 
   public static HoodieCleanMetadata convertCleanMetadata(HoodieTableMetaClient metaClient,
       String startCleanTime, Option<Long> durationInMs, List<HoodieCleanStat>
cleanStats) {
-    ImmutableMap.Builder<String, HoodieCleanPartitionMetadata> partitionMetadataBuilder
= ImmutableMap.builder();
+    Maps.MapBuilder<String, HoodieCleanPartitionMetadata> partitionMetadataBuilder
= new Maps.MapBuilder<>();
 
 Review comment:
   this probably can be just replaced by a concrete map impl in place right? this sort of
usage does not really warrant the builder pattern IMO. 

----------------------------------------------------------------
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


With regards,
Apache Git Services

Mime
View raw message