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
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import io.swagger.annotations.ApiModelProperty;
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 class Resource extends BaseResource implements Cloneable {
this.memory = memory;
}
@JsonIgnore
public long getMemoryMB() {
if (this.memory == null) {
return 0;