[
https://issues.apache.org/jira/browse/FLINK-32047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17722734#comment-17722734
]
Usamah Jassat edited comment on FLINK-32047 at 5/15/23 10:43 AM:
-----------------------------------------------------------------
Can you upgrade your Flink version to 1.14.3 and see if that works?
Using this example FlinkDeployment:
apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
namespace: default
name: basic-application-example-standalone
spec:
image: flink:1.14.3
flinkVersion: v1_14
serviceAccount: default
jobManager:
replicas: 1
resource:
memory: "1024m"
cpu: 1
taskManager:
resource:
memory: "1024m"
cpu: 1
replicas: 1
job:
jarURI: local:///opt/flink/examples/streaming/StateMachineExample.jar
parallelism: 2
args:
- test-arg
- arg
mode: standalone
I get this error:
Caused by: java.lang.IllegalArgumentException: Error parsing arguments
'[test-arg, arg]' on 'test-arg'. Please prefix keys with – or -.
Indicating that the args are getting passed through.
was (Author: usamj):
Can you upgrade your Flink version to 1.14.3 and see if that works?
Using this example FlinkDeployment:
```
apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
namespace: default
name: basic-application-example-standalone
spec:
image: flink:1.14.3
flinkVersion: v1_14
serviceAccount: default
jobManager:
replicas: 1
resource:
memory: "1024m"
cpu: 1
taskManager:
resource:
memory: "1024m"
cpu: 1
replicas: 1
job:
jarURI: local:///opt/flink/examples/streaming/StateMachineExample.jar
parallelism: 2
args:
- test-arg
- arg
mode: standalone
```
I get this error:
```
Caused by: java.lang.IllegalArgumentException: Error parsing arguments
'[test-arg, arg]' on 'test-arg'. Please prefix keys with -- or -.
```
Indicating that the args are getting passed through.
> Fix args in JobSpec not being passed through to Flink in Standalone mode -
> 1.4.0
> --------------------------------------------------------------------------------
>
> Key: FLINK-32047
> URL: https://issues.apache.org/jira/browse/FLINK-32047
> Project: Flink
> Issue Type: Bug
> Components: Kubernetes Operator
> Reporter: Gil Shmaya
> Priority: Major
> Fix For: 1.14.0
>
> Attachments: image-2023-04-30-18-54-22-291.png,
> image-2023-04-30-19-56-30-150.png, image-2023-04-30-19-56-57-680.png
>
>
> This issue is related to a previously fixed bug in version 1.2.0 -
> FLINK-29388
> I have noticed that while the args are successfully being passed when using
> version 1.2.0, this is not the case with version 1.4.0.
> {+}Scenario{+}:
> I added a log that prints the argument array length at the beginning of the
> main function of the flink job:
> !image-2023-04-30-18-54-22-291.png!
> The result when running with 1.2.0:
> !image-2023-04-30-19-56-30-150.png!
> The result when running with 1.4.0:
> !image-2023-04-30-19-56-57-680.png!
> h4.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)