Package org.apache.flink.core.failure
Interface FailureEnricher
-
@Experimental public interface FailureEnricherFailure Enricher enabling custom logic and attaching metadata in the form of labels to each type of failure as tracked in the JobMaster.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFailureEnricher.ContextAn interface used by theFailureEnricher.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>getOutputKeys()Method to list all the label Keys the enricher can associate with Values in case of a failureprocessFailure.CompletableFuture<Map<String,String>>processFailure(Throwable cause, FailureEnricher.Context context)Method to handle a failure as part of the enricher and optionally return a map of KV pairs (labels).
-
-
-
Method Detail
-
getOutputKeys
Set<String> getOutputKeys()
Method to list all the label Keys the enricher can associate with Values in case of a failureprocessFailure. Note that Keys must unique and properly defined per enricher implementation otherwise will be ignored.- Returns:
- the unique label Keys of the FailureEnricher
-
processFailure
CompletableFuture<Map<String,String>> processFailure(Throwable cause, FailureEnricher.Context context)
Method to handle a failure as part of the enricher and optionally return a map of KV pairs (labels). Note that Values should only be associated with Keys fromgetOutputKeysmethod otherwise will be ignored.- Parameters:
cause- the exception that caused this failurecontext- the context that includes extra information (e.g., if it was a global failure)- Returns:
- map of KV pairs (labels) associated with the failure
-
-