metaswirl commented on a change in pull request #18689: URL: https://github.com/apache/flink/pull/18689#discussion_r804769363
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StateWithExecutionGraph.java ########## @@ -148,6 +162,33 @@ public Logger getLogger() { return logger; } + protected Throwable extractError(TaskExecutionStateTransition taskExecutionStateTransition) { + Throwable cause = taskExecutionStateTransition.getError(userCodeClassLoader); + if (cause == null) { + cause = new FlinkException("Unknown failure cause. Probably related to FLINK-21376."); + } + return cause; + } + + protected Optional<ExecutionVertexID> extractExecutionVertexID( + TaskExecutionStateTransition taskExecutionStateTransition) { + return executionGraph.getExecutionVertexId(taskExecutionStateTransition.getID()); + } + + protected static Optional<RootExceptionHistoryEntry> convertFailures( + Function<ExecutionVertexID, Optional<ExecutionVertex>> lookup, Review comment: We discussed adding a document string. At the time, I thought this makes sense. But now, I am not so sure anymore. I would just say something like "lookup is a function that retrieves an ExecutionVertex from an ExecutionVertexID". But that's exactly the signatue... Do you have any suggestions? -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org