yihua commented on code in PR #12524:
URL: https://github.com/apache/hudi/pull/12524#discussion_r1893317919


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/WorkloadStat.java:
##########
@@ -33,9 +33,9 @@ public class WorkloadStat implements Serializable {
 
   private long numUpdates = 0L;
 
-  private HashMap<String, Pair<String, Long>> insertLocationToCount;
+  private final HashMap<String, Pair<String, Long>> insertLocationToCount;

Review Comment:
   Also, for Java serialization and deserialization to work in Spark, these 
member variables cannot be final.



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/cluster/strategy/ClusteringPlanStrategy.java:
##########
@@ -151,13 +151,16 @@ protected int getPlanVersion() {
    * Transform {@link FileSlice} to {@link HoodieSliceInfo}.
    */
   protected static List<HoodieSliceInfo> getFileSliceInfo(List<FileSlice> 
slices) {
-    return slices.stream().map(slice -> new HoodieSliceInfo().newBuilder()
-        .setPartitionPath(slice.getPartitionPath())
-        .setFileId(slice.getFileId())
-        
.setDataFilePath(slice.getBaseFile().map(BaseFile::getPath).orElse(StringUtils.EMPTY_STRING))
-        .setDeltaFilePaths(slice.getLogFiles().map(f -> 
f.getPath().toString()).collect(Collectors.toList()))
-        .setBootstrapFilePath(slice.getBaseFile().map(bf -> 
bf.getBootstrapBaseFile().map(bbf -> 
bbf.getPath()).orElse(StringUtils.EMPTY_STRING)).orElse(StringUtils.EMPTY_STRING))
-        .build()).collect(Collectors.toList());
+    return slices.stream().map(slice -> {
+      new HoodieSliceInfo();

Review Comment:
   Redundant



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to