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:51 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_r398318223
 
 

 ##########
 File path: hudi-cli/src/test/java/org/apache/hudi/cli/common/HoodieTestCommitMetadataGenerator.java
 ##########
 @@ -95,10 +96,9 @@ public static HoodieCommitMetadata generateCommitMetadata(String basePath)
throw
         HoodieTestUtils.createNewDataFile(basePath, DEFAULT_FIRST_PARTITION_PATH, "000");
     String file1P1C0 =
         HoodieTestUtils.createNewDataFile(basePath, DEFAULT_SECOND_PARTITION_PATH, "000");
-    return generateCommitMetadata(new ImmutableMap.Builder()
-      .put(DEFAULT_FIRST_PARTITION_PATH, new ImmutableList.Builder<>().add(file1P0C0).build())
-      .put(DEFAULT_SECOND_PARTITION_PATH, new ImmutableList.Builder<>().add(file1P1C0).build())
-      .build());
+    return generateCommitMetadata(new Maps.MapBuilder<String, List<String>>()
 
 Review comment:
   this can just be replaced with a in-place Map construction syntax ?
   
   ```
   Map<String, String> doubleBraceMap  = new HashMap<String, String>() {{
       put("key1", "value1");
       put("key2", "value2");
   }};
   ```

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