Github user StefanRRichter commented on a diff in the pull request: https://github.com/apache/flink/pull/5676#discussion_r178819991 --- Diff: flink-core/src/main/java/org/apache/flink/api/common/TaskInfo.java --- @@ -107,4 +131,12 @@ public int getAttemptNumber() { public String getTaskNameWithSubtasks() { return this.taskNameWithSubtasks; } + + /** + * Returns the allocation id for where this task is executed. + * @return the allocation id for where this task is executed. + */ + public String getAllocationID() { --- End diff -- Previously, I had a "hacky" version that extracted the allocation id from a to string method of the state store but I think stephan was more in favour of exposing this information through the context if needed. I cannot see how we can test if we have the same allocation id without having some way to access it.
---