You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Kelly Smith (Jira)" <ji...@apache.org> on 2019/11/19 21:42:00 UTC

[jira] [Created] (FLINK-14864) Inconsistent REST Parameter Name: `programArg` vs `programArgs`

Kelly Smith created FLINK-14864:
-----------------------------------

             Summary: Inconsistent REST Parameter Name: `programArg` vs `programArgs`
                 Key: FLINK-14864
                 URL: https://issues.apache.org/jira/browse/FLINK-14864
             Project: Flink
          Issue Type: Bug
          Components: Runtime / REST
    Affects Versions: 1.8.1
         Environment: Running 1.8.1 on an AWS EMR cluster. Making a POST request with NodeJS (request library).
            Reporter: Kelly Smith


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)