Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-32317

Enrich metadata in CR error field

    XMLWordPrintableJSON

Details

    Description

      CR Error field is improved in https://issues.apache.org/jira/browse/FLINK-29708.

      The error field is more structured with exception type, stackTrace, additionalMetadata, etc.

       

      This ticket is a proposal to expose a config ("kubernetes.operator.exception.metadata.mapper") to enrich the additionalMetadata further.

       

      The config consists of key-value pairs, for example:

      kubernetes.operator.exception.metadata.mapper: IOException:Found IOException,403:Found 403 error code

      The key is a REGEX string that will be used to match against the whole stack trace and if found, the value will be added to additionalMetadata. For example:

      apiVersion: flink.apache.org/v1beta1
      kind: FlinkSessionJob
      ....
        name: basic-session-job-example
        namespace: default
        resourceVersion: "70206149"
        uid: 916ea8f5-0821-4839-9953-2db9678c3fc9
      spec:
        deploymentName: basic-session-deployment-example
        job:
          args: []
          jarURI: https://test-s3.s3.amazonaws.com/doubleExecute.jar
          parallelism: 4
          state: running
          upgradeMode: stateless
      status:
        error: '{"type":"org.apache.flink.kubernetes.operator.exception.ReconciliationException","message":"java.io.IOException:
          Server returned HTTP response code: 403 for URL: https://test-s3.s3.amazonaws.com/doubleExecute.jar","additionalMetadata":{"exceptionMapper":["Found
          403 error code","Found IOException"]},"throwableList":[{"type":"java.io.IOException","message":"Server
          returned HTTP response code: 403 for URL: https://test-s3.s3.amazonaws.com/doubleExecute.jar","additionalMetadata":{"exceptionMapper":["Found
          403 error code"]}}]}'
      ...
      

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              darenwkt Daren Wong
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: