YARN-7100. Added JsonIgnore annotation to Resource#getMemoryMB. Contributed by Eric Yang

This commit is contained in:
Jian He 2017-08-29 20:37:38 -07:00
parent fecf22b2fd
commit 59fe98cd50

View File

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