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

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

Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2149#discussion_r71354132
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontendParser.java 
---
    @@ -451,4 +479,25 @@ public static InfoOptions parseInfoCommand(String[] 
args) throws CliArgsExceptio
                }
        }
     
    +   public static MainOptions parseMainCommand(String[] args) throws 
CliArgsException {
    +
    +           // drop all arguments after an action
    +           final List<String> params= Arrays.asList(args);
    +           for (String action: CliFrontend.ACTIONS) {
    +                   int index = params.indexOf(action);
    +                   if(index != -1) {
    +                           args = Arrays.copyOfRange(args, 0, index);
    +                           break;
    +                   }
    +           }
    +
    +           try {
    +                   DefaultParser parser = new DefaultParser();
    +                   CommandLine line = parser.parse(MAIN_OPTIONS, args, 
false);
    --- End diff --
    
    Actually you can use `CommandLine line = parser.parse(MAIN_OPTIONS, args, 
true);` to halt once you reach a non-arg.


> Add configDir parameter to CliFrontend and flink shell script
> -------------------------------------------------------------
>
>                 Key: FLINK-4084
>                 URL: https://issues.apache.org/jira/browse/FLINK-4084
>             Project: Flink
>          Issue Type: Improvement
>          Components: Client
>    Affects Versions: 1.1.0
>            Reporter: Till Rohrmann
>            Assignee: Andrea Sella
>            Priority: Minor
>
> At the moment there is no other way than the environment variable 
> FLINK_CONF_DIR to specify the configuration directory for the CliFrontend if 
> it is started via the flink shell script. In order to improve the user 
> exprience, I would propose to introduce a {{--configDir}} parameter which the 
> user can use to specify a configuration directory more easily.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to