tillrohrmann commented on a change in pull request #9555: [FLINK-13868][REST]
Job vertex add taskmanager id in rest api
URL: https://github.com/apache/flink/pull/9555#discussion_r320185278
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/SubtaskExecutionAttemptDetailsInfo.java
##########
@@ -145,23 +168,26 @@ public boolean equals(Object o) {
attempt == that.attempt &&
Objects.equals(host, that.host) &&
startTime == that.startTime &&
+ startTimeCompatible == that.startTimeCompatible &&
endTime == that.endTime &&
duration == that.duration &&
- Objects.equals(ioMetricsInfo, that.ioMetricsInfo);
+ Objects.equals(ioMetricsInfo, that.ioMetricsInfo) &&
+ Objects.equals(resourceId, that.resourceId);
}
@Override
public int hashCode() {
- return Objects.hash(subtaskIndex, status, attempt, host,
startTime, endTime, duration, ioMetricsInfo);
+ return Objects.hash(subtaskIndex, status, attempt, host,
startTime, startTimeCompatible, endTime, duration, ioMetricsInfo, resourceId);
}
- public static SubtaskExecutionAttemptDetailsInfo create(AccessExecution
execution, MutableIOMetrics ioMetrics) {
+ @VisibleForTesting
+ private static SubtaskExecutionAttemptDetailsInfo
create(AccessExecution execution, MutableIOMetrics ioMetrics) {
final ExecutionState status = execution.getState();
final long now = System.currentTimeMillis();
final TaskManagerLocation location =
execution.getAssignedResourceLocation();
final String locationString = location == null ? "(unassigned)"
: location.getHostname();
-
+ final String resourceId = location == null ? "" :
location.getResourceID().getResourceIdString();
Review comment:
Should the null value be rather `"Unknown resource Id"` or `"(unassigned)"`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services