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

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

Github user rmetzger commented on the pull request:

    https://github.com/apache/flink/pull/1581#issuecomment-184624521
  
    The `testDetachedPerJobYarnCluster()` YARN test is failing with
    
    
    ```
    10:33:26,969 INFO  org.apache.flink.client.CliFrontend                      
     - Starting execution of program
    10:33:26,969 INFO  org.apache.flink.client.program.Client                   
     - Starting program in interactive mode
    10:33:26,971 ERROR org.apache.flink.client.CliFrontend                      
     - Error while running the command.
    org.apache.flink.client.program.ProgramInvocationException: The main method 
caused an error.
        at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:520)
        at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403)
        at org.apache.flink.client.program.Client.runDetached(Client.java:277)
        at 
org.apache.flink.client.CliFrontend.executeProgramDetached(CliFrontend.java:774)
        at org.apache.flink.client.CliFrontend.run(CliFrontend.java:320)
        at 
org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1112)
        at org.apache.flink.yarn.YarnTestBase$Runner.run(YarnTestBase.java:565)
    Caused by: java.lang.RuntimeException: Error parsing arguments 
'[/tmp/junit2827618452146338513/junit4708065236621010716.tmp, 
/tmp/junit2827618452146338513/junit2411517217475739253]' on 
'/tmp/junit2827618452146338513/junit4708065236621010716.tmp'. Unexpected value. 
Please prefix values with -- or -.
        at 
org.apache.flink.api.java.utils.ParameterTool.fromArgs(ParameterTool.java:107)
        at 
org.apache.flink.examples.java.wordcount.WordCount.main(WordCount.java:58)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:505)
        ... 6 more
    10:33:26,974 INFO  akka.remote.RemoteActorRefProvider$RemotingTerminator    
     - Shutting down remote daemon.
    ```


> Rework examples to use ParameterTool
> ------------------------------------
>
>                 Key: FLINK-2021
>                 URL: https://issues.apache.org/jira/browse/FLINK-2021
>             Project: Flink
>          Issue Type: Improvement
>          Components: Examples
>    Affects Versions: 0.9
>            Reporter: Robert Metzger
>            Assignee: Stefano Baghino
>            Priority: Minor
>              Labels: starter
>
> In FLINK-1525, we introduced the {{ParameterTool}}.
> We should port the examples to use the tool.
> The examples could look like this (we should maybe discuss it first on the 
> mailing lists):
> {code}
> public static void main(String[] args) throws Exception {
>     ParameterTool pt = ParameterTool.fromArgs(args);
>     boolean fileOutput = pt.getNumberOfParameters() == 2;
>     String textPath = null;
>     String outputPath = null;
>     if(fileOutput) {
>         textPath = pt.getRequired("input");
>         outputPath = pt.getRequired("output");
>     }
>     // set up the execution environment
>     final ExecutionEnvironment env = 
> ExecutionEnvironment.getExecutionEnvironment();
>     env.getConfig().setUserConfig(pt);
> {code}



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

Reply via email to