Package com.cloudera.flume.core

Examples of com.cloudera.flume.core.EventSource.open()


    MultiGrepReporterSink<String> snk = c.iterator().next();
    snk.open();

    EventSource src = new NoNlASCIISynthSource(25, 100, 1);

    src.open();

    EventUtil.dumpAll(src, snk);
    snk.append(new EventImpl(NPE.getBytes()));
    snk.append(new EventImpl(LOST.getBytes()));
    snk.append(new EventImpl(LOST.getBytes()));
View Full Code Here


      InterruptedException {
    EventSource src = FlumeBuilder.buildSource(LogicalNodeContext
        .testingContext(), "collectorSource(34568)");
    EventSink snk = FlumeBuilder.buildSink(new Context(),
        "rpcSink(\"localhost\", 34568)");
    src.open();
    snk.open();
    snk.append(new EventImpl("foo".getBytes()));
    src.next();
    snk.close();
    src.close();
View Full Code Here

      InterruptedException {
    String snkcfg = "agentSink(\"localhost\", 12345)";

    EventSource src = FlumeBuilder.buildSource(LogicalNodeContext
        .testingContext(), "collectorSource(12345)");
    src.open();

    for (int i = 0; i < 100; i++) {
      EventSink snk = FlumeBuilder.buildSink(LogicalNodeContext
          .testingContext(), snkcfg);
      snk.open();
View Full Code Here

            ReportManager.get().add(cnt1);
            // make each parallel instance send a slightly different number of
            // messages.
            EventSource src = new NoNlASCIISynthSource(events + idx, 100);

            src.open();
            snk.open();

            started.countDown();

            EventUtil.dumpAll(src, snk);
View Full Code Here

    EventSink snk = FlumeBuilder.buildSink(new ReportTestingContext(
        LogicalNodeContext.testingContext()),
        "{ ackedWriteAhead => { ackChecker => counter(\"count\") } }");
    EventSource src = MemorySinkSource.cannedData("foo foo foo ", 5);
    snk.open();
    src.open();
    EventUtil.dumpAll(src, snk);
    src.close();
    snk.close(); // this should block until recovery complete.

    // agent checks for ack registrations.
View Full Code Here

    EventSink snk = FlumeBuilder.buildSink(new ReportTestingContext(
        LogicalNodeContext.testingContext()),
        "{ ackedWriteAhead => { ackChecker => counter(\"count\") } }");
    EventSource src = MemorySinkSource.cannedData("foo foo foo ", 5);
    snk.open();
    src.open();
    EventUtil.dumpAll(src, snk);
    src.close();
    snk.close(); // this should block until recovery complete.

    // agent checks for ack registrations.
View Full Code Here

    EventSink snk = FlumeBuilder.buildSink(new ReportTestingContext(
        LogicalNodeContext.testingContext()),
        "{ ackedWriteAhead => { ackChecker => counter(\"count\") } }");
    EventSource src = MemorySinkSource.cannedData("foo foo foo ", 5);
    snk.open();
    src.open();
    EventUtil.dumpAll(src, snk);
    src.close();
    snk.close(); // this should block until recovery complete.

    CounterSink cnt = (CounterSink) ReportManager.get().getReportable("count");
View Full Code Here

        public void run() {
          start.countDown();
          try {
            EventSource src = new NoNlASCIISynthSource(count, 100);
            start.await();
            src.open();
            EventUtil.dumpAll(src, snk);
            src.close();
          } catch (Exception e) {
            LOG.error("failure", e);
            // fail("e");
View Full Code Here

            EventSink snk = new CompositeSink(ctx, "counter(\"total." + idx
                + "\")");
            // use the same wal, but different counter.
            snk = new NaiveFileWALDeco(ctx, snk, wal, new TimeTrigger(
                new ProcessTagger(), 1000000), new AckListener.Empty(), 1000000);
            src.open();
            snk.open();

            start.await();

            EventUtil.dumpAll(src, snk);
View Full Code Here

                new ProcessTagger(), 1000000), new AckListener.Empty(), 1000000);

            start.await();

            // allow for contention on the open call.
            src.open();
            snk.open();

            EventUtil.dumpAll(src, snk);
            src.close();
            snk.close();
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.