Package com.tdunning.plume.local.eager

Examples of com.tdunning.plume.local.eager.LocalPlume


    List<Integer> x2 = Lists.newArrayList();
    for (int i = 5; i < 15; i++) {
      x2.add(i);
    }

    Plume p = new LocalPlume();
    PCollection<Integer> x3 = p.flatten(p.fromJava(x1), p.fromJava(x2));
    PTable<Integer, Integer> x4 = x3.count();

    Map<Integer, Integer> r = Maps.newHashMap();
    for (Pair<Integer, Integer> pair : x4) {
      r.put(pair.getKey(), pair.getValue());
View Full Code Here


import com.tdunning.plume.local.lazy.LazyPlume;

public class WordCountTest {
  @Test
  public void wordCount() throws IOException {
    Plume p = new LocalPlume();
    countWords(p.readResourceFile("simple-text.txt"));
  }
View Full Code Here

    countWords(p.readAvroFile(file, strings()));
  }

  @Test
  public void wordCountAvro() throws IOException {
    Plume p = new LocalPlume();
    String file = Resources.getResource("simple-text.avro").getPath();
    countWords(p.readAvroFile(file, strings()));
  }
View Full Code Here

import static com.tdunning.plume.Plume.strings;

public class LogParseTest {
  @Test
  public void parseGroupSort() throws IOException {
    Plume p = new LocalPlume();
    PCollection<String> logs = p.readResourceFile("log.txt");
    PTable<String, Event> events = logs.map(new DoFn<String, Pair<String, Event>>() {
      @Override
      public void process(String logLine, EmitFn<Pair<String, Event>> emitter) {
        Event e = new Event(logLine);
        emitter.emit(new Pair<String, Event>(e.getName(), e));
View Full Code Here

TOP

Related Classes of com.tdunning.plume.local.eager.LocalPlume

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.