flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2021) Rework examples to use ParameterTool
Date Tue, 26 Jan 2016 11:47:39 GMT

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

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

Github user stefanobaghino commented on the pull request:

    https://github.com/apache/flink/pull/1536#issuecomment-174966751
  
    This can be a starting point for further discussion. The only weak point I see (but maybe
I'm wrong) is that right now we're reading `Tuple`s and then converting them to `Point`s and
`Centroid`s. Since one of the stated aims of the example is to showcase the usage of POJOs,
should I also use the `pojoType` method on input sources and drop the `TuplePointConverter`
and `TupleCentroidConverter`?


> 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
>            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)

Mime
View raw message