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

[jira] [Commented] (FLINK-14604) Bump commons-cli to 1.4

    [ https://issues.apache.org/jira/browse/FLINK-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969287#comment-16969287 ] 

Chesnay Schepler commented on FLINK-14604:
------------------------------------------

Can you point me directly to the proposed vararg usage in the FLIP?

> Bump commons-cli to 1.4
> -----------------------
>
>                 Key: FLINK-14604
>                 URL: https://issues.apache.org/jira/browse/FLINK-14604
>             Project: Flink
>          Issue Type: Task
>          Components: Build System, Command Line Client
>            Reporter: Wei Zhong
>            Priority: Major
>
> Currently flink is using commons-cli 1.3.1. There is a [bug|https://issues.apache.org/jira/projects/CLI/issues/CLI-265] in it which prevent us from using options that accept variable arguments in command line.
> To be precise, it prevents us from accepting a short-name option after a varargs option because there is a problem in the implementation of DefaultParser#isShortOption() method in commons-cli 1.3.1:
> {code:java}
>     /**
>      * Tells if the token looks like a short option.
>      * 
>      * @param token
>      */
>     private boolean isShortOption(String token)
>     {
>         // short options (-S, -SV, -S=V, -SV1=V2, -S1S2)
>         // PROBLEM: It assumes that short option only has single character,
>         //          but in fact we have many multi-characters short options.
>         return token.startsWith("-") && token.length() >= 2 && options.hasShortOption(token.substring(1, 2));
>     }
> {code}
> If we bump the version to 1.4, we can solve this problem.
> I request this change because there are 2 varargs options which hit this bug in the design of command line options of [Python UDF Dependency Management|https://cwiki.apache.org/confluence/display/FLINK/FLIP-78%3A+Flink+Python+UDF+Environment+and+Dependency+Management]. It will be great helpful if we can bump the commons-cli version to 1.4 :).
> The commons-cli 1.4 is also a stable version which released at Mar, 2017. And today its usage statistic is greater than 1.3.1 on [maven central repository|https://mvnrepository.com/artifact/commons-cli/commons-cli].
> I have pushed the change to my own travis to check if it breaks something. This is the [link|https://travis-ci.org/WeiZhong94/flink/builds/607438208] and it seems that everything is fine.
> This is the [link|https://travis-ci.org/WeiZhong94/flink/builds/607481477] of travis build which contains e2e tests, it seems fine except the timeout tasks.



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