You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2019/07/02 15:08:18 UTC

[flink] 04/05: [FLINK-12883][runtime] Add getID() to ExecutionVertex

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 2f5fc239ee7712e02f3f3ebfc0a991acdcf6e3cf
Author: Gary Yao <ga...@apache.org>
AuthorDate: Wed Jun 19 14:45:53 2019 +0200

    [FLINK-12883][runtime] Add getID() to ExecutionVertex
---
 .../org/apache/flink/runtime/executiongraph/ExecutionVertex.java  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
index a12d198..5fc0b72 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
@@ -39,6 +39,7 @@ import org.apache.flink.runtime.jobmanager.scheduler.CoLocationGroup;
 import org.apache.flink.runtime.jobmanager.scheduler.LocationPreferenceConstraint;
 import org.apache.flink.runtime.jobmaster.LogicalSlot;
 import org.apache.flink.runtime.jobmaster.slotpool.SlotProvider;
+import org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID;
 import org.apache.flink.runtime.taskmanager.TaskManagerLocation;
 import org.apache.flink.runtime.util.EvictingBoundedList;
 import org.apache.flink.util.ExceptionUtils;
@@ -83,6 +84,8 @@ public class ExecutionVertex implements AccessExecutionVertex, Archiveable<Archi
 
 	private final int subTaskIndex;
 
+	private final ExecutionVertexID executionVertexId;
+
 	private final EvictingBoundedList<ArchivedExecution> priorExecutions;
 
 	private final Time timeout;
@@ -142,6 +145,7 @@ public class ExecutionVertex implements AccessExecutionVertex, Archiveable<Archi
 
 		this.jobVertex = jobVertex;
 		this.subTaskIndex = subTaskIndex;
+		this.executionVertexId = new ExecutionVertexID(jobVertex.getJobVertexId(), subTaskIndex);
 		this.taskNameWithSubtask = String.format("%s (%d/%d)",
 				jobVertex.getJobVertex().getName(), subTaskIndex + 1, jobVertex.getParallelism());
 
@@ -228,6 +232,10 @@ public class ExecutionVertex implements AccessExecutionVertex, Archiveable<Archi
 		return this.subTaskIndex;
 	}
 
+	public ExecutionVertexID getID() {
+		return executionVertexId;
+	}
+
 	public int getNumberOfInputs() {
 		return this.inputEdges.length;
 	}