Examples of TimeTrigger


Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

    String rpt = "foo";
    String snk = "{ ackChecker => [ console, counter(\"" + rpt + "\") ] }";
    Context ctx = new ReportTestingContext();
    EventSink es = FlumeBuilder.buildSink(ctx, snk);
    NaiveFileWALDeco wal = new NaiveFileWALDeco(ctx, es, node.getWalManager(),
        new TimeTrigger(new ProcessTagger(), 100), node.getAckChecker()
            .getAgentAckQueuer(), 10000);

    // open and send data.
    wal.open();
    for (int i = 0; i < count; i++) {
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

      };

      FlumeNode node = FlumeNode.getInstance();
      EventSinkDecorator<EventSink> deco = new NaiveFileWALDeco(
          LogicalNodeContext.testingContext(), snk, node.getWalManager(),
          new TimeTrigger(new ProcessTagger(), 1000), node.getAckChecker()
              .getAgentAckQueuer(), 1000);

      deco.open();
      deco.append(e);
      deco.close();
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

    when(msrc.next()).thenReturn(e1).thenReturn(e2).thenReturn(e3).thenReturn(
        null);

    DiskFailoverDeco snk = new DiskFailoverDeco(msnk, LogicalNodeContext
        .testingContext(), FlumeNode.getInstance().getDFOManager(),
        new TimeTrigger(new ProcessTagger(), 60000), 300000);
    snk.open();
    try {
      EventUtil.dumpAll(msrc, snk);
      snk.close();
    } catch (IOException ioe) {
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

            DiskFailoverManager dfoMan = new NaiveFileFailoverManager(f1);
            dfos[idx] = dfoMan; // save for checking.

            // short trigger causes lots of rolls
            EventSink snk = new DiskFailoverDeco(cnt1, LogicalNodeContext
                .testingContext(), dfoMan, new TimeTrigger(100), 50);

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

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

        String dfonode = context.getValue(LogicalNodeContext.C_LOGICAL);
        Preconditions.checkArgument(dfonode != null,
            "Context does not have a logical node name");
        DiskFailoverManager dfoman = node.getAddDFOManager(dfonode);

        return new DiskFailoverDeco(null, context, dfoman, new TimeTrigger(
            new ProcessTagger(), delayMillis), checkmillis);
      }
    };
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

  CollectorSink(Context ctx, final String snkSpec, final long millis,
      final Tagger tagger, long checkmillis, AckListener ackDest) {
    this.ackDest = ackDest;
    this.snkSpec = snkSpec;
    roller = new RollSink(ctx, snkSpec, new TimeTrigger(tagger, millis),
        checkmillis) {
      // this is wraps the normal roll sink with an extra roll detection
      // decorator that triggers ack delivery on close.
      @Override
      public EventSink newSink(Context ctx) throws IOException {
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

        }

        // TODO (jon) this is going to be unsafe because it creates before open.
        // This needs to be pushed into the logic of the decorator
        WALManager walman = node.getAddWALManager(walnode);
        return new NaiveFileWALDeco(context, null, walman, new TimeTrigger(
            delayMillis), node.getAckChecker().getAgentAckQueuer(), checkMs);
      }
    };
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

      };

      FlumeNode node = FlumeNode.getInstance();
      EventSinkDecorator<EventSink> deco = new NaiveFileWALDeco(
          LogicalNodeContext.testingContext(), snk, node.getWalManager(),
          new TimeTrigger(new ProcessTagger(), 1000), node.getAckChecker()
              .getAgentAckQueuer(), 1000);

      deco.open();
      deco.append(e);
      deco.close();
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

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

      for (int i = 0; i < threads; i++) {
        new Thread() {
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.TimeTrigger

            CounterSink cnt1 = new CounterSink("count." + idx);
            AckChecksumChecker<EventSink> chk = new AckChecksumChecker<EventSink>(
                cnt1);
            NaiveFileWALManager wman1 = new NaiveFileWALManager(f1);
            EventSink snk = new NaiveFileWALDeco(new Context(), chk, wman1,
                new TimeTrigger(1000000), new AckListener.Empty(), 100);

            ReportManager.get().add(cnt1);
            // make each parallel instance send a slightly different number of
            // messages.
            EventSource src = new NoNlASCIISynthSource(events + idx, 100);
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.