This page is meant as a template for writing a FLIP. To create a FLIP choose Tools->Copy on this page and modify with your content and replace the heading with the next FLIP number and a description of your issue. Replace anything in italics with your own description.

Discussion threadtba
Vote threadtba
JIRA

Unable to render Jira issues macro, execution error.

Unable to render Jira issues macro, execution error.

Releasetba

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

FLINK-21190 introduced the exception history in the REST API. This required some changes to the REST response of JobExceptionsHandler. Instead of just returning the root cause, a collection of exceptions can be returned. This FLIP is about removing the fields that were deprecated with FLINK-21190.

Public Interfaces & Proposed Changes

GET /jobs/:jobid/exceptions (Apache Flink 1.x)
{
  "all-exceptions": [
    {
      "exception": "<exception-str>",
      "location": "<location-str>",
      "task": "<task-name>",
      "taskManagerId": "<task-manager-id>",
      "timestamp": "<timestamp>"
    },
    { ... }
  ],
  "exceptionHistory" : {
    "entries": [
      {
        "concurrentExceptions": [
          {
            "exceptionName": "<exception-name>",
            "failureLabels": {}
            "location": "<location-str>",
            "stacktrace": "<stacktrace>",
            "taskManagerId": "<task-manager-id>",
            "taskName": "<task-name>",
            "timestamp": <timestamp>
          },
          { ... }
        ],
        "exceptionName": "<root-exception-name>",
        "failureLabels": {}
        "location": "<location-str>",
        "stacktrace": "<stacktrace>",
        "taskManagerId": "<task-manager-id>",
        "taskName": "<task-name>",
        "timestamp": <timestamp>,
        "truncated": false
      }
    ]
  },
  "root-exception": "<root-exception-name>",
  "timestamp": <timestamp>,
  "truncated": false
}
GET /jobs/:jobid/exceptions (Apache Flink 2.x)
{
  "exceptionHistory" : {
    "entries": [
      {
        "concurrentExceptions": [
          {
            "exceptionName": "<exception-name>",
            "failureLabels": {}
            "location": "<location-str>",
            "stacktrace": "<stacktrace>",
            "taskManagerId": "<task-manager-id>",
            "taskName": "<task-name>",
            "timestamp": <timestamp>
          },
          { ... }
        ],
        "exceptionName": "<root-exception-name>",
        "failureLabels": {}
        "location": "<location-str>",
        "stacktrace": "<stacktrace>",
        "taskManagerId": "<task-manager-id>",
        "taskName": "<task-name>",
        "timestamp": <timestamp>,
        "truncated": false
      }
    ]
  }
}

The following fields are subject to deletion:

Old Field

Line¹

Replacing field

Line¹

Purpose

all-exceptions

2

exceptionHistory.entries[*].concurrentExceptions

15

Exceptions that happened in individual subtasks along the root exception.

root-exception

38

exceptionHistory.entries[*].exceptionName

27

The class name of the root exception.

timestamp

39

exceptionHistory.entries[*].timestamp

33

The time the error was observed.

truncated

40

exceptionHistory.entries[*].truncated

34

Whether list of exception (i.e. all-exceptions , concurrentExceptions) is complete or truncated. 

¹ The line number in the example Json that is listed in the Public Interfaces section for Apache Flink 1.x

Essentially, the old interface only allowed one exception to be listed (with concurrent exception being listed in all-exceptions). The FLINK-21190 API allowed a ordered collection of errors.

Compatibility, Deprecation, and Migration Plan

The fields are already deprecated as part of FLINK-21190 and will be replaced by fields listed in the Proposed Changes section. The Flink web UI already uses the new (non-deprecated) fields.

Users who haven’t migrated to the new fields yet, would be affected by the removal of those fields. The consequences on the user’s side depend on their Json parser configuration. 

Test Plan

The existing tests should continue to work.

Rejected Alternatives

No alternatives were considered.