Package org.apache.flink.api.java.io

Examples of org.apache.flink.api.java.io.TextInputFormat


   * @return A DataSet that represents the data read from the given file as text lines.
   */
  public DataSource<String> readTextFile(String filePath) {
    Validate.notNull(filePath, "The file path may not be null.");
   
    return new DataSource<String>(this, new TextInputFormat(new Path(filePath)), BasicTypeInfo.STRING_TYPE_INFO );
  }
View Full Code Here


   * @return A DataSet that represents the data read from the given file as text lines.
   */
  public DataSource<String> readTextFile(String filePath, String charsetName) {
    Validate.notNull(filePath, "The file path may not be null.");

    TextInputFormat format = new TextInputFormat(new Path(filePath));
    format.setCharsetName(charsetName);
    return new DataSource<String>(this, format, BasicTypeInfo.STRING_TYPE_INFO );
  }
View Full Code Here

  }
 
  // --------------------------------------------------------------------------------------------
 
  private static final DataSourceNode getSourceNode() {
    return new DataSourceNode(new GenericDataSourceBase<String, TextInputFormat>(new TextInputFormat(new Path("/")), new OperatorInformation<String>(BasicTypeInfo.STRING_TYPE_INFO)));
  }
View Full Code Here

//        "map"));
//  }
 
  private static final DataSourceNode getSourceNode() {
    return new DataSourceNode(new GenericDataSourceBase<String, TextInputFormat>(
        new TextInputFormat(new Path("/ignored")),
        new OperatorInformation<String>(BasicTypeInfo.STRING_TYPE_INFO),
        "source"));
  }
View Full Code Here

TOP

Related Classes of org.apache.flink.api.java.io.TextInputFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.