hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbal...@apache.org
Subject [incubator-hudi] branch master updated: Refactoring getter to avoid double extrametadata in json representation
Date Thu, 20 Feb 2020 17:52:13 GMT
This is an automated email from the ASF dual-hosted git repository.

vbalaji pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 185ff64  Refactoring getter to avoid double extrametadata in json representation
185ff64 is described below

commit 185ff646ad6979722a3f1c4b34d87c7f98bd87e4
Author: Nishith Agarwal <nagarwal@uber.com>
AuthorDate: Thu Jan 23 23:34:22 2020 -0800

    Refactoring getter to avoid double extrametadata in json representation
---
 .../org/apache/hudi/common/model/HoodieCommitMetadata.java   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java
b/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java
index f16ef2f..3097052 100644
--- a/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java
+++ b/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java
@@ -47,7 +47,7 @@ public class HoodieCommitMetadata implements Serializable {
   protected Map<String, List<HoodieWriteStat>> partitionToWriteStats;
   protected Boolean compacted;
 
-  private Map<String, String> extraMetadataMap;
+  private Map<String, String> extraMetadata;
 
   // for ser/deser
   public HoodieCommitMetadata() {
@@ -55,7 +55,7 @@ public class HoodieCommitMetadata implements Serializable {
   }
 
   public HoodieCommitMetadata(boolean compacted) {
-    extraMetadataMap = new HashMap<>();
+    extraMetadata = new HashMap<>();
     partitionToWriteStats = new HashMap<>();
     this.compacted = compacted;
   }
@@ -68,7 +68,7 @@ public class HoodieCommitMetadata implements Serializable {
   }
 
   public void addMetadata(String metaKey, String value) {
-    extraMetadataMap.put(metaKey, value);
+    extraMetadata.put(metaKey, value);
   }
 
   public List<HoodieWriteStat> getWriteStats(String partitionPath) {
@@ -76,7 +76,7 @@ public class HoodieCommitMetadata implements Serializable {
   }
 
   public Map<String, String> getExtraMetadata() {
-    return extraMetadataMap;
+    return extraMetadata;
   }
 
   public Map<String, List<HoodieWriteStat>> getPartitionToWriteStats() {
@@ -84,7 +84,7 @@ public class HoodieCommitMetadata implements Serializable {
   }
 
   public String getMetadata(String metaKey) {
-    return extraMetadataMap.get(metaKey);
+    return extraMetadata.get(metaKey);
   }
 
   public Boolean getCompacted() {
@@ -343,6 +343,6 @@ public class HoodieCommitMetadata implements Serializable {
   @Override
   public String toString() {
     return "HoodieCommitMetadata{partitionToWriteStats=" + partitionToWriteStats + ", compacted="
+ compacted
-        + ", extraMetadataMap=" + extraMetadataMap + '}';
+        + ", extraMetadata=" + extraMetadata + '}';
   }
 }


Mime
View raw message