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

Inconsistent REST Parameter Name: `programArg` vs `programArgs`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 1.8.1
    • None
    • Runtime / REST
    • None
    • Running 1.8.1 on an AWS EMR cluster. Making a POST request with NodeJS (request library).

    Description

      The documentation specifies that you should provide a parameter called `programArg`.

      Repro

      Send JSON as a POST body to /jars/:jarid/run with `programArg` as a parameter

      Expected

      Successfully starts the job passing in the values from `programArg`

      Actual

      **Returns error:

      ```

      {"errors":["Request did not match expected format JarRunRequestBody."]}

      ```

       

      Digging into the source code, it appears that JarRunRequestBody expects the field to be plural: `programArgs`

      https://github.com/apache/flink/blob/master/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarRequestBody.java#L44

       

      Changing the name of the parameter to `programArgs` results in the job being successfully submitted with no error.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kellysmith Kelly Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: