You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/08 14:59:01 UTC

[jira] [Commented] (FLINK-10399) Refactor ParameterTool#fromArgs

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

ASF GitHub Bot commented on FLINK-10399:
----------------------------------------

GJL commented on a change in pull request #6737: [FLINK-10399] Refactor ParameterTool#fromArgs
URL: https://github.com/apache/flink/pull/6737#discussion_r223348499
 
 

 ##########
 File path: flink-java/src/test/java/org/apache/flink/api/java/utils/AbstractParameterToolTest.java
 ##########
 @@ -52,30 +52,29 @@ protected void validate(ParameterTool parameter) {
 		} catch (Exception e) {
 			fail();
 
 Review comment:
   Since you are already cleaning up:
   The test will fail if an exception is propagated. There is no need to to catch it and fail explicitly. Also we are currently masking the root cause. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Refactor ParameterTool#fromArgs
> -------------------------------
>
>                 Key: FLINK-10399
>                 URL: https://issues.apache.org/jira/browse/FLINK-10399
>             Project: Flink
>          Issue Type: Improvement
>          Components: Client
>    Affects Versions: 1.7.0
>            Reporter: TisonKun
>            Assignee: TisonKun
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> {{ParameterTool#fromArgs}} uses a weird implement which flink developer would fail to parse it fast.
> The main problem is that, when parse args, we always try to get a key-value pair, but the implement iterate by a {{for}} loop, thus introduce weird flag/mutable variable and branches.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)