You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Kevin Lee <ke...@gmail.com> on 2022/03/28 03:58:59 UTC

Wrong format when passing arguments with space

Flink version : 1.13

Bug:
When I pass an argument with space by single quota.
The main function get this argument with a double quota

example:
./bin/flink run -c com.lmk.QuotaTest --rate 10 --time ''2022-03-28 11:53:21"

The main function get parameters:

1-----rate
2---10
3-----time
4---"2022-03-28 11:53:21"


I think flink shell should remove the double quota in "2022-03-28 11:53:21"


Hope to get your reply asap

Re: Wrong format when passing arguments with space

Posted by 姜鑫 <ji...@gmail.com>.
Hi Kevin,

I noticed that the two quotas in your time string looks different. Please confirm that it is a typo or not.

Best,
Xin 


> 2022年3月28日 上午11:58,Kevin Lee <ke...@gmail.com> 写道:
> 
> Flink version : 1.13
> 
> Bug:
> When I pass an argument with space by single quota.
> The main function get this argument with a double quota
> 
> example:
> ./bin/flink run -c com.lmk.QuotaTest --rate 10 --time ''2022-03-28 11:53:21"
> 
> The main function get parameters:
> 
> 1-----rate
> 2---10
> 3-----time
> 4---"2022-03-28 11:53:21"
> 
> 
> I think flink shell should remove the double quota in "2022-03-28 11:53:21"
> 
> 
> Hope to get your reply asap


Re: Wrong format when passing arguments with space

Posted by huweihua <hu...@gmail.com>.
HI, Kevin

I have not reproduced this problem.
What is the impact of this problem? Can't get this parameter correctly in user main method?

Could you provide a screenshot of the JobManager configuration on the UI


> 2022年4月2日 上午10:23,Kevin Lee <ke...@gmail.com> 写道:
> 
> It's a typo
> 
> I run this demo on yarn cluster
> 
> 
> The mode is *"run-application"* instead of  "run"
> 
> ./bin/flink run-application -c com.lmk.QuotaTest --rate 10 --time
> "2022-03-28 11:53:21"
> 
> 
> The JM log shows program-args as follow:
> 
> 
> $internal.application.program-args, --rate;10;--time;'"2022-03-30 18:46:56"'
> 
> 
> 
> Sorry for the mistake
> 
> 
> 
> 
> 姜鑫 <ji...@gmail.com> 于2022年4月1日周五 11:22写道:
> 
>> Hi Kevin,
>> 
>> I noticed that the two quotas in your time string looks different. Please
>> confirm that it is a typo or not.
>> 
>> Best,
>> Xin
>> 
>> 
>>> 2022年3月28日 上午11:58,Kevin Lee <ke...@gmail.com> 写道:
>>> 
>>> Flink version : 1.13
>>> 
>>> Bug:
>>> When I pass an argument with space by single quota.
>>> The main function get this argument with a double quota
>>> 
>>> example:
>>> ./bin/flink run -c com.lmk.QuotaTest --rate 10 --time ''2022-03-28
>> 11:53:21"
>>> 
>>> The main function get parameters:
>>> 
>>> 1-----rate
>>> 2---10
>>> 3-----time
>>> 4---"2022-03-28 11:53:21"
>>> 
>>> 
>>> I think flink shell should remove the double quota in "2022-03-28
>> 11:53:21"
>>> 
>>> 
>>> Hope to get your reply asap
>> 
>> 


Re: Wrong format when passing arguments with space

Posted by huweihua <hu...@gmail.com>.
HI, Kevin

I have not reproduced this problem.
What is the impact of this problem? Can't get this parameter correctly in user main method?

Could you provide a screenshot of the JobManager configuration on the UI


> 2022年4月2日 上午10:23,Kevin Lee <ke...@gmail.com> 写道:
> 
> It's a typo
> 
> I run this demo on yarn cluster
> 
> 
> The mode is *"run-application"* instead of  "run"
> 
> ./bin/flink run-application -c com.lmk.QuotaTest --rate 10 --time
> "2022-03-28 11:53:21"
> 
> 
> The JM log shows program-args as follow:
> 
> 
> $internal.application.program-args, --rate;10;--time;'"2022-03-30 18:46:56"'
> 
> 
> 
> Sorry for the mistake
> 
> 
> 
> 
> 姜鑫 <ji...@gmail.com> 于2022年4月1日周五 11:22写道:
> 
>> Hi Kevin,
>> 
>> I noticed that the two quotas in your time string looks different. Please
>> confirm that it is a typo or not.
>> 
>> Best,
>> Xin
>> 
>> 
>>> 2022年3月28日 上午11:58,Kevin Lee <ke...@gmail.com> 写道:
>>> 
>>> Flink version : 1.13
>>> 
>>> Bug:
>>> When I pass an argument with space by single quota.
>>> The main function get this argument with a double quota
>>> 
>>> example:
>>> ./bin/flink run -c com.lmk.QuotaTest --rate 10 --time ''2022-03-28
>> 11:53:21"
>>> 
>>> The main function get parameters:
>>> 
>>> 1-----rate
>>> 2---10
>>> 3-----time
>>> 4---"2022-03-28 11:53:21"
>>> 
>>> 
>>> I think flink shell should remove the double quota in "2022-03-28
>> 11:53:21"
>>> 
>>> 
>>> Hope to get your reply asap
>> 
>> 


Re: Wrong format when passing arguments with space

Posted by Kevin Lee <ke...@gmail.com>.
 It's a typo

I run this demo on yarn cluster


The mode is *"run-application"* instead of  "run"

./bin/flink run-application -c com.lmk.QuotaTest --rate 10 --time
"2022-03-28 11:53:21"


The JM log shows program-args as follow:


$internal.application.program-args, --rate;10;--time;'"2022-03-30 18:46:56"'



Sorry for the mistake




姜鑫 <ji...@gmail.com> 于2022年4月1日周五 11:22写道:

> Hi Kevin,
>
> I noticed that the two quotas in your time string looks different. Please
> confirm that it is a typo or not.
>
> Best,
> Xin
>
>
> > 2022年3月28日 上午11:58,Kevin Lee <ke...@gmail.com> 写道:
> >
> > Flink version : 1.13
> >
> > Bug:
> > When I pass an argument with space by single quota.
> > The main function get this argument with a double quota
> >
> > example:
> > ./bin/flink run -c com.lmk.QuotaTest --rate 10 --time ''2022-03-28
> 11:53:21"
> >
> > The main function get parameters:
> >
> > 1-----rate
> > 2---10
> > 3-----time
> > 4---"2022-03-28 11:53:21"
> >
> >
> > I think flink shell should remove the double quota in "2022-03-28
> 11:53:21"
> >
> >
> > Hope to get your reply asap
>
>

Re: Wrong format when passing arguments with space

Posted by 姜鑫 <ji...@gmail.com>.
Hi Kevin,

I noticed that the two quotas in your time string looks different. Please confirm that it is a typo or not.

Best,
Xin 


> 2022年3月28日 上午11:58,Kevin Lee <ke...@gmail.com> 写道:
> 
> Flink version : 1.13
> 
> Bug:
> When I pass an argument with space by single quota.
> The main function get this argument with a double quota
> 
> example:
> ./bin/flink run -c com.lmk.QuotaTest --rate 10 --time ''2022-03-28 11:53:21"
> 
> The main function get parameters:
> 
> 1-----rate
> 2---10
> 3-----time
> 4---"2022-03-28 11:53:21"
> 
> 
> I think flink shell should remove the double quota in "2022-03-28 11:53:21"
> 
> 
> Hope to get your reply asap


Re: Wrong format when passing arguments with space

Posted by David Morávek <dm...@apache.org>.
cc Kevin

On Tue, Mar 29, 2022 at 9:15 AM David Morávek <dm...@apache.org> wrote:

> Hi Kevin,
>
> -dev@f.a.o +user@f.a.o
>
> Thanks for the report! I've run some experiments and unfortunately I'm not
> able to reproduce the behavior you're describing. The bash "$@" expansion
> seems to work as expected (always receiving correctly expanded unquoted
> strings in the main class). Can you maybe elaborate about your environment
> and submit a minimal reproducer?
>
> Best,
> D.
>
> On Mon, Mar 28, 2022 at 6:00 AM Kevin Lee <ke...@gmail.com>
> wrote:
>
>> Flink version : 1.13
>>
>> Bug:
>> When I pass an argument with space by single quota.
>> The main function get this argument with a double quota
>>
>> example:
>> ./bin/flink run -c com.lmk.QuotaTest --rate 10 --time ''2022-03-28
>> 11:53:21"
>>
>> The main function get parameters:
>>
>> 1-----rate
>> 2---10
>> 3-----time
>> 4---"2022-03-28 11:53:21"
>>
>>
>> I think flink shell should remove the double quota in "2022-03-28
>> 11:53:21"
>>
>>
>> Hope to get your reply asap
>>
>

Re: Wrong format when passing arguments with space

Posted by David Morávek <dm...@apache.org>.
Hi Kevin,

-dev@f.a.o +user@f.a.o

Thanks for the report! I've run some experiments and unfortunately I'm not
able to reproduce the behavior you're describing. The bash "$@" expansion
seems to work as expected (always receiving correctly expanded unquoted
strings in the main class). Can you maybe elaborate about your environment
and submit a minimal reproducer?

Best,
D.

On Mon, Mar 28, 2022 at 6:00 AM Kevin Lee <ke...@gmail.com> wrote:

> Flink version : 1.13
>
> Bug:
> When I pass an argument with space by single quota.
> The main function get this argument with a double quota
>
> example:
> ./bin/flink run -c com.lmk.QuotaTest --rate 10 --time ''2022-03-28
> 11:53:21"
>
> The main function get parameters:
>
> 1-----rate
> 2---10
> 3-----time
> 4---"2022-03-28 11:53:21"
>
>
> I think flink shell should remove the double quota in "2022-03-28 11:53:21"
>
>
> Hope to get your reply asap
>