flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2918] Add method to read a file of type...
Date Fri, 30 Oct 2015 22:52:51 GMT
Github user fhueske commented on a diff in the pull request:

    --- Diff: docs/apis/programming_guide.md ---
    @@ -1772,9 +1779,16 @@ DataSet<Tuple2<String, Double>> csvInput = env.readCsvFile("hdfs:///the/CSV/file
     // read a CSV file with three fields into a POJO (Person.class) with corresponding fields
     DataSet<Person>> csvInput = env.readCsvFile("hdfs:///the/CSV/file")
    -                         .pojoType(Person.class, "name", "age", "zipcode");         
    +                         .pojoType(Person.class, "name", "age", "zipcode");  
    -// create a set from some given elements
    +// read a file from the specified path of type TextInputFormat 
    +DataSet<Tuple2<Text, Text>> tuples = env.readHadoopFile(new TextInputFormat(),
Text.class, Text.class, "hdfs://nnHost:nnPort/path/to/file");
    --- End diff --
    I think TextInputFormat produces (LongWritable, Text)

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message