Examples of NullSink


Examples of com.cloudera.flume.handlers.debug.NullSink

  }

  @Test
  public void testOpenInterruption() throws IOException, InterruptedException {
    EventSink snk = new BackOffFailOverSink(InterruptSinks.openSink(),
        new NullSink());
    try {
      snk.open();
    } catch (InterruptedException ie) {
      // if interrupted, it should be closed.
      return;
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

  }

  @Test
  public void testCloseInterruption() throws IOException, InterruptedException {
    EventSink snk = new BackOffFailOverSink(InterruptSinks.closeSink(),
        new NullSink());
    snk.open();
    snk.append(new EventImpl("test".getBytes()));
    try {
      snk.close();
    } catch (InterruptedException ie) {
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

   * as it requires injecting code into the implementation of append.
   */
  @Test
  public void testAppendBeforeOpen() throws InterruptedException {
    final NaiveFileWALDeco d = new NaiveFileWALDeco(
        LogicalNodeContext.testingContext(), new NullSink(),
        new NaiveFileWALManager(new File("/tmp")), new SizeTrigger(0, null),
        new AckListener.Empty(), 1000000);
    final CountDownLatch cdl1 = new CountDownLatch(1);
    new Thread() {
      public void run() {
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

   */
  @Test
  public void testBadRegistererAppend() throws InterruptedException {

    final NaiveFileWALDeco d = new NaiveFileWALDeco(
        LogicalNodeContext.testingContext(), new NullSink(),
        new NaiveFileWALManager(new File("/tmp")), new SizeTrigger(0, null),
        new AckListener.Empty(), 1000000);

    final CountDownLatch cdl1 = new CountDownLatch(1);
    new Thread() {
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

      public void open() throws IOException {
      }
    }
    ;

    node.loadNodeDriver(new CloseExnSource(), new NullSink());
    node.loadNodeDriver(new CloseExnSource(), new NullSink());
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

    }
    ;

    // there should be no exception thrown in this thread. (errors are thrown by
    // logical node and handled at that level)
    node.loadNodeDriver(new OpenExnSource(), new NullSink());
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

    }
    ;

    LogicalNode node = new LogicalNode(new Context(), "test");
    IsOpenSource prev = new IsOpenSource();
    node.startNodeDriver(prev, new NullSink(), 2000); // timeout after 2s
    for (int i = 0; i < 10; i++) {
      assertTrue(prev.isOpen);
      IsOpenSource cur = new IsOpenSource();
      node.startNodeDriver(cur, new NullSink(), 2000);// timeout after 2s
      assertFalse(prev.isOpen);
      assertTrue(cur.isOpen);
      prev = cur;
    }
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

  @Test
  public void testOpenCloseSyslogTcpSourceThreads() throws IOException,
      InterruptedException {
    LogicalNode node = new LogicalNode(new Context(), "test");
    EventSource prev = new SyslogTcpSourceThreads(6789);
    node.loadNodeDriver(prev, new NullSink());
    for (int i = 0; i < 20; i++) {
      EventSource cur = new SyslogTcpSourceThreads(6789);
      node.loadNodeDriver(cur, new NullSink());
      prev = cur;

    }
  }
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

   * as it requires injecting code into the implementation of append.
   */
  @Test
  public void testAppendBeforeOpen() throws InterruptedException {
    final NaiveFileWALDeco<EventSink> d = new NaiveFileWALDeco<EventSink>(
        new Context(), new NullSink(),
        new NaiveFileWALManager(new File("/tmp")), new SizeTrigger(0, null),
        new AckListener.Empty(), 1000000);
    final CountDownLatch cdl1 = new CountDownLatch(1);
    new Thread() {
      public void run() {
View Full Code Here

Examples of com.cloudera.flume.handlers.debug.NullSink

   */
  @Test
  public void testBadRegistererAppend() throws InterruptedException {

    final NaiveFileWALDeco<EventSink> d = new NaiveFileWALDeco<EventSink>(
        new Context(), new NullSink(),
        new NaiveFileWALManager(new File("/tmp")), new SizeTrigger(0, null),
        new AckListener.Empty(), 1000000);

    final CountDownLatch cdl1 = new CountDownLatch(1);
    new Thread() {
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.