From 59fe98cd50b34eb75c5f522aa6f3a53bd650b15e Mon Sep 17 00:00:00 2001 From: Jian He Date: Tue, 29 Aug 2017 20:37:38 -0700 Subject: [PATCH] YARN-7100. Added JsonIgnore annotation to Resource#getMemoryMB. Contributed by Eric Yang --- .../org/apache/hadoop/yarn/service/api/records/Resource.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Resource.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Resource.java index cec9de9a65..dfdf92a01c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Resource.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Resource.java @@ -22,6 +22,7 @@ import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; @@ -103,6 +104,7 @@ public void setMemory(String memory) { this.memory = memory; } + @JsonIgnore public long getMemoryMB() { if (this.memory == null) { return 0;