Package eu.stratosphere.core.fs

Examples of eu.stratosphere.core.fs.Path


      taskConfig.addInputToGroup(0);
      taskConfig.setInputSerializer(serializer, 0);

      @SuppressWarnings("unchecked")
      CsvOutputFormat outFormat = new CsvOutputFormat("\n", " ", LongValue.class, LongValue.class, LongValue.class);
      outFormat.setOutputFilePath(new Path(resultPath));
     
      taskConfig.setStubWrapper(new UserCodeObjectWrapper<CsvOutputFormat>(outFormat));
    }

    return output;
View Full Code Here


   * @return The DataSink that writes the DataSet.
   *
   * @see TextOutputFormat
   */
  public DataSink<T> writeAsText(String filePath) {
    return output(new TextOutputFormat<T>(new Path(filePath)));
  }
View Full Code Here

   * @return The DataSink that writes the DataSet.
   *
   * @see TextOutputFormat
   */
  public DataSink<T> writeAsText(String filePath, WriteMode writeMode) {
    TextOutputFormat<T> tof = new TextOutputFormat<T>(new Path(filePath));
    tof.setWriteMode(writeMode);
    return output(tof);
  }
View Full Code Here

   *
   * @see Tuple
   * @see CsvOutputFormat
   */
  public DataSink<T> writeAsCsv(String filePath, String rowDelimiter, String fieldDelimiter) {
    return internalWriteAsCsv(new Path(filePath), rowDelimiter, fieldDelimiter, null);
  }
View Full Code Here

   *
   * @see Tuple
   * @see CsvOutputFormat
   */
  public DataSink<T> writeAsCsv(String filePath, String rowDelimiter, String fieldDelimiter, WriteMode writeMode) {
    return internalWriteAsCsv(new Path(filePath), rowDelimiter, fieldDelimiter, writeMode);
  }
View Full Code Here

   */
  public DataSink<T> write(FileOutputFormat<T> outputFormat, String filePath) {
    Validate.notNull(filePath, "File path must not be null.");
    Validate.notNull(outputFormat, "Output format must not be null.");

    outputFormat.setOutputFilePath(new Path(filePath));
    return output(outputFormat);
  }
View Full Code Here

  public DataSink<T> write(FileOutputFormat<T> outputFormat, String filePath, WriteMode writeMode) {
    Validate.notNull(filePath, "File path must not be null.");
    Validate.notNull(writeMode, "Write mode must not be null.");
    Validate.notNull(outputFormat, "Output format must not be null.");

    outputFormat.setOutputFilePath(new Path(filePath));
    outputFormat.setWriteMode(writeMode);
    return output(outputFormat);
  }
View Full Code Here

  public static void main(String[] args) throws Exception {
    String inputPath = args[0];
   
    ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
   
    DataSet<MyUser> input = env.createInput(new AvroInputFormat<MyUser>(new Path(inputPath), MyUser.class));
 
    DataSet<Tuple2<String, MyUser>> result = input.map(new NameExtractor()).groupBy(0).reduce(new NameGrouper());
   
    result.output(new DiscardingOuputFormat<Tuple2<String,MyUser>>());
    env.execute();
View Full Code Here

      dos.writeInt(i);
    }
   
    dos.close();
     
    return new FileInputSplit(0, new Path(this.tempFile.toURI().toString()), 0, this.tempFile.length(), new String[] {"localhost"});
  }
View Full Code Here

  // --------------------------------------------------------------------------------------------
 
  @Before
  public void setup() throws IOException {
    this.tempFile = File.createTempFile("test_output", "tmp");
    this.format.setOutputFilePath(new Path(tempFile.toURI()));
    this.format.setWriteMode(WriteMode.OVERWRITE);
  }
View Full Code Here

TOP

Related Classes of eu.stratosphere.core.fs.Path

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.