Examples of generateEvents()


Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

    readAndCompareIteratorEvents(iter1, events, false);

    log.info("add more windows");
    final Vector<DbusEvent> events2 = new Vector<DbusEvent>();
    final DbusEventGenerator generator2 = new DbusEventGenerator(1000);
    generator2.generateEvents(50, 4, 180, 100, events2);
    injectEventsInBuffer(dbusBuf, events2, false);

    log.info("verify old iterators have not changed");
    Assert.assertTrue(!iter0.hasNext());
    Assert.assertTrue(!iter1.hasNext());
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

    for (int i = 0; i < 1100; ++i)
    {
      log.info("add first window iteration " + i);
      final DbusEventGenerator generator = new DbusEventGenerator(40 * i);
      final Vector<DbusEvent> events1 = new Vector<DbusEvent>();
      generator.generateEvents(6, 1, 120, 41, events1);
      injectEventsInBuffer(dbusBuf, events1, true);

      log.info("get a new iterator");
      InternalEventIterator iter1 =
          dbusBuf.acquireInternalIterator(dbusBuf.getHead(), dbusBuf.getTail(), null);
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

    Assert.assertEquals(dbusBuf._busyIteratorPool.size(), 1);

    log.info("append a full window of events");
    final DbusEventGenerator generator = new DbusEventGenerator();
    final Vector<DbusEvent> events = new Vector<DbusEvent>();
    generator.generateEvents(5, 5, 120, 39, events);
    injectEventsInBuffer(dbusBuf, events, false);

    log.info("verify we can read all events");
    //old iterator has not changed
    Assert.assertTrue(!iter0.hasNext());
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

    readAndCompareIteratorEvents(iter1, events, false);

    log.info("add more windows");
    final Vector<DbusEvent> events2 = new Vector<DbusEvent>();
    final DbusEventGenerator generator2 = new DbusEventGenerator(1000);
    generator2.generateEvents(50, 4, 180, 100, events2);
    injectEventsInBuffer(dbusBuf, events2, false);

    log.info("verify old iterators have not changed");
    Assert.assertTrue(!iter0.hasNext());
    Assert.assertTrue(!iter1.hasNext());
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

        dbusBuf.acquireInternalIterator(dbusBuf.getHead(), dbusBuf.getTail(), null);

    log.info("append a full window of events");
    final DbusEventGenerator generator = new DbusEventGenerator();
    final Vector<DbusEvent> events = new Vector<DbusEvent>();
    generator.generateEvents(15, 5, 120, 39, events);
    injectEventsInBuffer(dbusBuf, events, false);

    log.info("acquire oterh iterator on empty buffers ");
    //never move this one
    InternalEventIterator iter1 =
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

            AssertLevel.ALL));
    BufferPositionParser parser = dbusBuf.getBufferPositionParser();
    log.info("append initial events");
    DbusEventGenerator generator = new DbusEventGenerator();
    Vector<DbusEvent> events = new Vector<DbusEvent>();
    generator.generateEvents(7, 1, 120, 39, events);

    // Add events to the EventBuffer. Now the buffer is full
    DbusEventAppender appender = new DbusEventAppender(events,dbusBuf,null);
    appender.run(); // running in the same thread
    log.info("Head:" + parser.toString(dbusBuf.getHead()) + ", Tail:" + parser.toString(dbusBuf.getTail()));
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

    assertEquals(61, tailOffset);

    log.info("append windows with one small and one big event");
    generator = new DbusEventGenerator(100);
    events = new Vector<DbusEvent>();
    generator.generateEvents(1, 1, 280, 139, events);
    generator.generateEvents(1, 1, 480, 339, events);

    // Add events to the EventBuffer. Now the buffer is full
    appender = new DbusEventAppender(events,dbusBuf,null);
    appender.run(); // running in the same thread
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

    log.info("append windows with one small and one big event");
    generator = new DbusEventGenerator(100);
    events = new Vector<DbusEvent>();
    generator.generateEvents(1, 1, 280, 139, events);
    generator.generateEvents(1, 1, 480, 339, events);

    // Add events to the EventBuffer. Now the buffer is full
    appender = new DbusEventAppender(events,dbusBuf,null);
    appender.run(); // running in the same thread
    log.info("Head:" + parser.toString(dbusBuf.getHead()) + ", Tail:" + parser.toString(dbusBuf.getTail()));
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()

            AssertLevel.ALL));
    BufferPositionParser parser = dbusBuf.getBufferPositionParser();
    log.info("append initial events");
    DbusEventGenerator generator = new DbusEventGenerator();
    Vector<DbusEvent> events = new Vector<DbusEvent>();
    generator.generateEvents(11, 1, 120, 39, events);

    // Add events to the EventBuffer. Now the buffer is full
    DbusEventAppender appender = new DbusEventAppender(events,dbusBuf,null);
    appender.run(); // running in the same thread
    log.info("Head:" + parser.toString(dbusBuf.getHead()) + ",Tail:" + parser.toString(dbusBuf.getTail()));
View Full Code Here

Examples of com.linkedin.databus.core.test.DbusEventGenerator.generateEvents()


    log.info("append event to stretch beyond limit but less than capacity");
    generator = new DbusEventGenerator(100);
    events = new Vector<DbusEvent>();
    generator.generateEvents(1, 1, 400, 150, events); // will add two event 61 + 150

    // Add events. this will cause limit increased
    appender = new DbusEventAppender(events,dbusBuf,null);
    appender.run();
    log.info("Head:" + parser.toString(dbusBuf.getHead()) + ",Tail:" + parser.toString(dbusBuf.getTail()));
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.