Examples of NullSink


Examples of com.cloudera.flume.handlers.debug.NullSink

    this.split = split;
    this.fallthrough = fallthrough;
  }

  public DemuxSink(String field, Map<byte[], S> split) {
    this(field, split, new NullSink());
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

    EventUtil.dumpAll(txt, mem);
    txt.close();

    b.mark("disk_loaded");
    Event e = null;
    NullSink sink = new NullSink();
    SyslogEntryFormat syslog = new SyslogEntryFormat();
    while ((e = mem.next()) != null) {
      Event e2 = syslog.extract(new String(e.getBody()), 2009);
      sink.append(e2);
    }
    sink.close();
    b.mark("warmup done");

    e = null;
    mem.open();
    while ((e = mem.next()) != null) {
      Event e2 = syslog.extract(new String(e.getBody()), 2009);
      sink.append(e2);
    }
    sink.close();
    b.mark("sample dump done");

    e = null;
    mem.open();
    CounterSink sink2 = new CounterSink("counter");
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

    MemorySinkSource mem = new MemorySinkSource();
    mem.open();
    EventUtil.dumpAll(txt, mem);
    b.mark("disk_loaded");

    NullSink nullsnk = new NullSink();
    EventUtil.dumpAll(mem, nullsnk);
    b.mark("warmup");

    int res_size[] = { 100, 1000, 10000, 100000 };
    for (int i = 0; i < res_size.length; i++) {
      mem.open();
      int sz = res_size[i];
      EventSink res = new ReservoirSamplerDeco<NullSink>(new NullSink(), sz);
      EventUtil.dumpAll(mem, res);
      b.mark("reservoir " + sz + " sampling done", sz);

      res.close();
      b.mark("sample dump done");
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

    MemorySinkSource mem = new MemorySinkSource();
    mem.open();
    EventUtil.dumpAll(txt, mem);
    b.mark("disk_loaded");

    NullSink nullsnk = new NullSink();
    EventUtil.dumpAll(mem, nullsnk);
    b.mark("warmup");

    int interval_size[] = { 100000, 10000, 1000, 100 };
    for (int i = 0; i < interval_size.length; i++) {
      mem.open();
      int sz = interval_size[i];
      EventSink res = new IntervalSampler<NullSink>(new NullSink(), sz);
      EventUtil.dumpAll(mem, res);
      b.mark("interval " + sz + " sampling done", sz);

      res.close();
      b.mark("sample dump done");
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

    mem.open();
    EventUtil.dumpAll(txt, mem);

    b.mark("disk_loaded");

    NullSink nullsnk = new NullSink();
    EventUtil.dumpAll(mem, nullsnk);
    b.mark("warmup");

    double probs[] = { .00001, .0001, .001, .01 };
    for (int i = 0; i < probs.length; i++) {
      mem.open();
      double prob = probs[i];
      EventSink res = new ProbabilitySampler<NullSink>(new NullSink(), prob);
      EventUtil.dumpAll(mem, res);
      b.mark("probability" + prob + " sampling done", prob);

      res.close();
      b.mark("sample dump done");
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

    mem.open();
    EventUtil.dumpAll(txt, mem);

    b.mark("disk_loaded");

    EventSink nullsnk = new NullSink();
    EventUtil.dumpAll(mem, nullsnk);
    b.mark("nullsink done");

    b.done();
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

   * as it requires injecting code into the implementation of append.
   */
  @Test
  public void testAppendBeforeOpen() throws InterruptedException {
    final NaiveFileWALDeco d = new NaiveFileWALDeco(LogicalNodeContext
        .testingContext(), new NullSink(), new NaiveFileWALManager(new File(
        "/tmp")), new SizeTrigger(0, null), new AckListener.Empty(), 1000000);
    final CountDownLatch cdl1 = new CountDownLatch(1);
    new Thread() {
      public void run() {
        try {
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

   */
  @Test
  public void testBadRegistererAppend() throws InterruptedException {

    final NaiveFileWALDeco d = new NaiveFileWALDeco(LogicalNodeContext
        .testingContext(), new NullSink(), new NaiveFileWALManager(new File(
        "/tmp")), new SizeTrigger(0, null), new AckListener.Empty(), 1000000);

    final CountDownLatch cdl1 = new CountDownLatch(1);
    new Thread() {
      public void run() {
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

      public void open() throws IOException {
      }
    }
    ;

    node.openLoadNode(new CloseExnSource(), new NullSink());
    node.openLoadNode(new CloseExnSource(), new NullSink());
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

    }
    ;

    // there should be no exception thrown in this thread. (errors are thrown by
    // logical node and handled at that level)
    node.openLoadNode(new OpenExnSource(), new NullSink());
  }
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.