Package com.cloudera.flume.agent.durability

Examples of com.cloudera.flume.agent.durability.NaiveFileWALDeco.rotate()


    wal.open();
    for (int i = 0; i < count; i++) {
      Event e = new EventImpl(("test message " + i).getBytes());
      wal.append(e);
      if (i % 5 == 4) {
        wal.rotate();
      }
    }

    CounterSink ctr = (CounterSink) ReportManager.get().getReportable(rpt);
    LOG.info("Last batch should be missing. " + count + " > " + ctr.getCount()
View Full Code Here


    // // Phase I - (20 events arrive, 3 groups make it)
    for (int i = 0; i < count; i++) {
      Event e = new EventImpl(("test message " + i).getBytes());
      wal.append(e);
      if (i % 5 == 4) {
        wal.rotate();
      }
    }

    // arbitrary sleep for now.
    Clock.sleep(1000);
View Full Code Here

    // // Phase I - (19 events arrive, 3 groups make it)
    for (int i = 0; i < count; i++) {
      Event e = new EventImpl(("test message " + i).getBytes());
      wal.append(e);
      if (i % 5 == 4) {
        wal.rotate();
      }
    }

    Clock.sleep(1000); // need other thread to make progress
    // 3 blocks should have successfully made it.
View Full Code Here

    // Phase I (20 message sent, 3 groups good, 1 group bad)
    for (int i = 0; i < count; i++) {
      Event e = new EventImpl(("test message " + i).getBytes());
      wal.append(e);
      if (i % 5 == 4) {
        wal.rotate();
      }
    }

    Clock.sleep(1000); // need other thread to make progress
    // three blocks should have successfully made it.
View Full Code Here

    wal.open();
    for (int i = 0; i < count; i++) {
      Event e = new EventImpl(("test message " + i).getBytes());
      wal.append(e);
      if (i % 5 == 4) {
        wal.rotate();
      }
    }

    Clock.sleep(1000); // somehow force other thread to go.
    CounterSink ctr = (CounterSink) ReportManager.get().getReportable(rpt);
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.