Examples of CsvOutputFormat


Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

   
    iteration.setNextWorkset(updateComponentId);
    iteration.setSolutionSetDelta(updateComponentId);

    // create DataSinkContract for writing the new cluster positions
    FileDataSink result = new FileDataSink(new CsvOutputFormat(), output, iteration, "Result");
    CsvOutputFormat.configureRecordFormat(result)
      .recordDelimiter('\n')
      .fieldDelimiter(' ')
      .field(LongValue.class, 0)
      .field(LongValue.class, 1);
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

    String output    = (args.length > 1 ? args[1] : "");

    GenericDataSource<TableInputFormat> source = new GenericDataSource<TableInputFormat>(new MyTableInputFormat(), "HBase Input");
    source.setParameter(TableInputFormat.INPUT_TABLE, "twitter");
    source.setParameter(TableInputFormat.CONFIG_LOCATION, "/etc/hbase/conf/hbase-site.xml");
    FileDataSink out = new FileDataSink(new CsvOutputFormat(), output, source, "HBase String dump");
    CsvOutputFormat.configureRecordFormat(out)
      .recordDelimiter('\n')
      .fieldDelimiter(' ')
      .field(StringValue.class, 0)
      .field(StringValue.class, 1)
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

      .build();
    ReduceOperator reducer = ReduceOperator.builder(CountWords.class, StringValue.class, 0)
      .input(mapper)
      .name("Count Words")
      .build();
    FileDataSink out = new FileDataSink(new CsvOutputFormat(), output, reducer, "Word Counts");
    CsvOutputFormat.configureRecordFormat(out)
      .recordDelimiter('\n')
      .fieldDelimiter(' ')
      .field(StringValue.class, 0)
      .field(IntValue.class, 1);
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

      .input2(filterVisits)
      .name("Antijoin DocsVisits")
      .build();

    // Create DataSinkContract for writing the result of the OLAP query
    FileDataSink result = new FileDataSink(new CsvOutputFormat(), output, antiJoinVisits, "Result");
    result.setDegreeOfParallelism(numSubTasks);
    CsvOutputFormat.configureRecordFormat(result)
      .recordDelimiter('\n')
      .fieldDelimiter('|')
      .lenient(true)
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

        .build();
   
    iteration.setNextPartialSolution(sumReduce);

    @SuppressWarnings("unchecked")
    FileDataSink finalResult = new FileDataSink(new CsvOutputFormat("\n"" ", StringValue.class), output, iteration, "Output");

    Plan plan = new Plan(finalResult, "Iteration with AllReducer (keyless Reducer)");
    plan.setDefaultParallelism(numSubTasks);
    return plan;
  }
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

   
    iteration.setNextWorkset(minAndUpdate);
    iteration.setSolutionSetDelta(minAndUpdate);

    // create DataSinkContract for writing the new cluster positions
    FileDataSink result = new FileDataSink(new CsvOutputFormat(), output, iteration, "Result");
    CsvOutputFormat.configureRecordFormat(result)
      .recordDelimiter('\n')
      .fieldDelimiter(' ')
      .field(LongValue.class, 0)
      .field(LongValue.class, 1);
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

      .name("AggCo")
      .build();
    aggCO.setDegreeOfParallelism(numSubtasks);

    // create DataSinkContract for writing the result
    FileDataSink result = new FileDataSink(new CsvOutputFormat(), output, "Output");
    result.setDegreeOfParallelism(numSubtasks);
    CsvOutputFormat.configureRecordFormat(result)
      .recordDelimiter('\n')
      .fieldDelimiter('|')
      .field(IntValue.class, 0)
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

    }
   
    iteration.setNextWorkset(updateComponentId);

    // sink is the iteration result
    FileDataSink result = new FileDataSink(new CsvOutputFormat("\n", " ", LongValue.class, LongValue.class), output, iteration, "Result");

    // return the PACT plan
    Plan plan = new Plan(result, "Workset Connected Components");
    plan.setDefaultParallelism(numSubTasks);
    return plan;
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

   
    iteration.setNextWorkset(updateComponentId);
    iteration.setSolutionSetDelta(updateComponentId);

    // sink is the iteration result
    FileDataSink result = new FileDataSink(new CsvOutputFormat(), output, iteration, "Result");
    CsvOutputFormat.configureRecordFormat(result)
      .recordDelimiter('\n')
      .fieldDelimiter(' ')
      .field(LongValue.class, 0)
      .field(LongValue.class, 1);
View Full Code Here

Examples of org.apache.flink.api.java.record.io.CsvOutputFormat

    CollectionDataSource source2 = new CollectionDataSource(tmp, "test_collection");

    JoinOperator join = JoinOperator.builder(Join.class, IntValue.class, 0, 0)
      .input1(source).input2(source2).build();

    FileDataSink out = new FileDataSink(new CsvOutputFormat(), output, join, "Collection Join");
    CsvOutputFormat.configureRecordFormat(out)
      .recordDelimiter('\n')
      .fieldDelimiter(' ')
      .field(StringValue.class, 0)
      .field(IntValue.class, 1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.