Skip to content

Commit

Permalink
[hotfix][rest] Add getter methods for SubtasksTimesInfo to get all va…
Browse files Browse the repository at this point in the history
…lues easily
  • Loading branch information
1996fanrui committed May 23, 2024
1 parent c4af0c3 commit ddccfb6
Showing 1 changed file with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.flink.runtime.rest.handler.job.SubtasksTimesHandler;

import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
Expand Down Expand Up @@ -62,6 +63,26 @@ public SubtasksTimesInfo(
this.subtasks = checkNotNull(subtasks);
}

@JsonIgnore
public String getId() {
return id;
}

@JsonIgnore
public String getName() {
return name;
}

@JsonIgnore
public long getNow() {
return now;
}

@JsonIgnore
public List<SubtaskTimeInfo> getSubtasks() {
return subtasks;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down Expand Up @@ -125,6 +146,31 @@ public SubtaskTimeInfo(
this.timestamps = checkNotNull(timestamps);
}

@JsonIgnore
public int getSubtask() {
return subtask;
}

@JsonIgnore
public String getHost() {
return host;
}

@JsonIgnore
public String getEndpoint() {
return endpoint;
}

@JsonIgnore
public long getDuration() {
return duration;
}

@JsonIgnore
public Map<ExecutionState, Long> getTimestamps() {
return timestamps;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down

0 comments on commit ddccfb6

Please sign in to comment.