XComp commented on a change in pull request #15898:
URL: https://github.com/apache/flink/pull/15898#discussion_r681711367
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/exceptionhistory/FailureHandlingResultSnapshot.java
##########
@@ -59,38 +58,60 @@
public static FailureHandlingResultSnapshot create(
FailureHandlingResult failureHandlingResult,
Function<ExecutionVertexID, Execution> latestExecutionLookup) {
+ return create(
+
failureHandlingResult.getExecutionVertexIdOfFailedTask().orElse(null),
+ failureHandlingResult.getError(),
+ failureHandlingResult.getVerticesToRestart(),
+ failureHandlingResult.getTimestamp(),
+ latestExecutionLookup);
+ }
+
+ /**
+ * Creates a {@code FailureHandlingResultSnapshot} based on passed
parameters.
+ *
+ * @param failingExecutionVertexId an {@link Optional} of the {@link
ExecutionVertexID} the
+ * failure originates from, or {@code None}.
Review comment:
The JavaDoc would need to be updated as well since it's a `@Nullable`
object instead of an `Optional` now.
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/exceptionhistory/FailureHandlingResultSnapshot.java
##########
@@ -59,38 +58,60 @@
public static FailureHandlingResultSnapshot create(
FailureHandlingResult failureHandlingResult,
Function<ExecutionVertexID, Execution> latestExecutionLookup) {
+ return create(
+
failureHandlingResult.getExecutionVertexIdOfFailedTask().orElse(null),
+ failureHandlingResult.getError(),
+ failureHandlingResult.getVerticesToRestart(),
+ failureHandlingResult.getTimestamp(),
+ latestExecutionLookup);
+ }
+
+ /**
+ * Creates a {@code FailureHandlingResultSnapshot} based on passed
parameters.
+ *
+ * @param failingExecutionVertexId an {@link Optional} of the {@link
ExecutionVertexID} the
+ * failure originates from, or {@code None}.
+ * @param rootCause the failure reason.
+ * @param concurrentVertexIds {@link ExecutionVertexID} Task vertices
concurrently failing with
+ * the {@code failingExecutionVertexID}.
+ * @param timestamp the failure timestamp.
+ * @param latestExecutionLookup The look-up function for retrieving the
latest {@link Execution}
+ * instance for a given {@link ExecutionVertexID}.
+ * @return The {@code FailureHandlingResultSnapshot}.
+ */
+ public static FailureHandlingResultSnapshot create(
+ ExecutionVertexID failingExecutionVertexId,
Review comment:
```suggestion
@Nullable ExecutionVertexID failingExecutionVertexId,
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]