Package com.cloudera.flume.util

Examples of com.cloudera.flume.util.MockClock.forward()


    failsink.append(e);
    System.out.println(mock);
    System.out.printf("pri: %4d sec: %4d fail: %4d\n", primary.getCount(),
        secondary.getCount(), failsink.getFails());

    mock.forward(100);
    failsink.append(e);
    failsink.append(e);
    System.out.println(mock);
    System.out.printf("pri: %4d sec: %4d fail: %4d\n", primary.getCount(),
        secondary.getCount(), failsink.getFails());
View Full Code Here


    failsink.append(e);
    System.out.println(mock);
    System.out.printf("pri: %4d sec: %4d fail: %4d\n", primary.getCount(),
        secondary.getCount(), failsink.getFails());

    mock.forward(200);
    failsink.append(e);
    failsink.append(e);
    System.out.println(mock);
    System.out.printf("pri: %4d sec: %4d fail: %4d\n", primary.getCount(),
        secondary.getCount(), failsink.getFails());
View Full Code Here

    failsink.append(e);
    System.out.println(mock);
    System.out.printf("pri: %4d sec: %4d fail: %4d\n", primary.getCount(),
        secondary.getCount(), failsink.getFails());

    mock.forward(400);
    failsink.append(e);
    failsink.append(e);
    System.out.println(mock);
    System.out.printf("pri: %4d sec: %4d fail: %4d\n", primary.getCount(),
        secondary.getCount(), failsink.getFails());
View Full Code Here

        secondary.getCount(), failsink.getFails());
    Assert.assertEquals(4, failsink.getFails());
    Assert.assertEquals(0, primary.getCount());
    Assert.assertEquals(8, secondary.getCount());

    mock.forward(800);
    failsink.append(e);
    failsink.append(e);
    System.out.println(mock);
    System.out.printf("pri: %4d sec: %4d fail: %4d\n", primary.getCount(),
        secondary.getCount(), failsink.getFails());
View Full Code Here

    Assert.assertEquals(0, primary.getCount());
    Assert.assertEquals(10, secondary.getCount());

    // without capping there would be no new fail here bug still the
    // twelve on the secondary count.
    mock.forward(1000);
    failsink.append(e);
    failsink.append(e);
    System.out.println(mock);
    System.out.printf("pri: %4d sec: %4d fail: %4d\n", primary.getCount(),
        secondary.getCount(), failsink.getFails());
View Full Code Here

      }

      @Override
      public void open() throws IOException {
        // Forward by 100ms, should cause IOD to try eleven times then give up
        m.forward(100);
        throw new IOException("fail open");
      }
    };

    Clock.setClock(m);
View Full Code Here

      }

      @Override
      public void open() throws IOException {
        // Forward by 100ms, should cause IOD to try eleven times then give up
        m.forward(100);
        throw new IOException("fail open");
      }
    };

    Clock.setClock(m);
View Full Code Here

    // just a little forward to make things slighlty "out of sync"
    // 3
    r.append(e);
    r.append(e);
    r.append(e);
    m.forward(501);

    // 2
    r.append(e);
    r.append(e);
    m.forward(501);
View Full Code Here

    m.forward(501);

    // 2
    r.append(e);
    r.append(e);
    m.forward(501);

    // 4
    r.append(e);
    r.append(e);
    r.append(e);
View Full Code Here

    // 4
    r.append(e);
    r.append(e);
    r.append(e);
    r.append(e);
    m.forward(501);

    // 0 // this never registers!
    m.forward(501);

    // 1
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.