Examples of NullSink


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

    Benchmark b = new Benchmark("Reservoir sampler + nullsink");
    b.mark("begin");
    MemorySinkSource mem = FlumeBenchmarkHarness.synthInMem();
    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

    Benchmark b = new Benchmark("Interval sampler + nullsink");
    b.mark("begin");
    MemorySinkSource mem = FlumeBenchmarkHarness.synthInMem();
    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

    Benchmark b = new Benchmark("Reservoir sampler + nullsink");
    b.mark("begin");
    MemorySinkSource mem = FlumeBenchmarkHarness.synthInMem();
    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

    Benchmark b = new Benchmark("nullsink");
    b.mark("begin");
    MemorySinkSource mem = FlumeBenchmarkHarness.synthInMem();
    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

    tes.open();
    // need to drain the sink otherwise its queue will fill up with events!
    Thread drain = new Thread("drain") {
      public void run() {
        try {
          EventUtil.dumpAll(tes, new NullSink());
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

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

    tes.open();
    // need to drain the sink otherwise its queue will fill up with events!
    Thread drain = new Thread("drain") {
      public void run() {
        try {
          EventUtil.dumpAll(tes, new NullSink());
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

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

    tes.open();
    // need to drain the sink otherwise its queue will fill up with events!
    Thread drain = new Thread("drain") {
      public void run() {
        try {
          EventUtil.dumpAll(tes, new NullSink());
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

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

    tes.open();
    // need to drain the sink otherwise its queue will fill up with events!
    Thread drain = new Thread("drain") {
      public void run() {
        try {
          EventUtil.dumpAll(tes, new NullSink());
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

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

    tes.open();
    // need to drain the sink otherwise its queue will fill up with events!
    Thread drain = new Thread("drain") {
      public void run() {
        try {
          EventUtil.dumpAll(tes, new NullSink());
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

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

   * @throws InterruptedException
   */
  @Test
  public void testAppendInterruption() throws IOException, InterruptedException {
    EventSink snk = new BackOffFailOverSink(InterruptSinks.appendSink(),
        new NullSink());
    snk.open();
    try {
      snk.append(new EventImpl("test".getBytes()));
    } catch (InterruptedException ie) {
      // interrupted should remain open.
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.