YARN-7100. Added JsonIgnore annotation to Resource#getMemoryMB. Contributed by Eric Yang
This commit is contained in:
parent
fecf22b2fd
commit
59fe98cd50
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user