Interface FailureEnricher


  • @Experimental
    public interface FailureEnricher
    Failure Enricher enabling custom logic and attaching metadata in the form of labels to each type of failure as tracked in the JobMaster.
    • Method Detail

      • getOutputKeys

        Set<String> getOutputKeys()
        Method to list all the label Keys the enricher can associate with Values in case of a failure processFailure. 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 from getOutputKeys method otherwise will be ignored.
        Parameters:
        cause - the exception that caused this failure
        context - the context that includes extra information (e.g., if it was a global failure)
        Returns:
        map of KV pairs (labels) associated with the failure