Package com.tdunning.plume

Examples of com.tdunning.plume.Plume


    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 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.Plume

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.