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

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


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


   * @return A DataSet that represents the data read from the given file as text lines.
   */
  public DataSource<StringValue> readTextFileWithValue(String filePath, String charsetName, boolean skipInvalidLines) {
    Validate.notNull(filePath, "The file path may not be null.");
   
    TextValueInputFormat format = new TextValueInputFormat(new Path(filePath));
    format.setCharsetName(charsetName);
    format.setSkipInvalidLines(skipInvalidLines);
    return new DataSource<StringValue>(this, format, new ValueTypeInfo<StringValue>(StringValue.class) );
  }
View Full Code Here

TOP

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

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.