Package org.apache.flume.channel

Examples of org.apache.flume.channel.PseudoTxnMemoryChannel.take()


    source.setChannelProcessor(new ChannelProcessor(rcs));

    for (long i = 0; i < 100; i++) {
      source.process();
      Event event = channel.take();

      Assert.assertArrayEquals(String.valueOf(i).getBytes(),
          new String(event.getBody()).getBytes());
    }
  }
View Full Code Here


    for (long i = 0; i < 100; i++) {
      source.process();

      for (long j = batchSize; j > 0; j--) {
        Event event = channel.take();
        String expectedVal = String.valueOf(((i+1)*batchSize)-j);
        String resultedVal = new String(event.getBody());
        Assert.assertTrue("Expected " + expectedVal + " is not equals to " +
            resultedVal, expectedVal.equals(resultedVal));
      }
View Full Code Here

    source.start();

    for (long i = 0; i < 100; i++) {
      source.process();
      Event event = channel.take();

      Assert.assertArrayEquals(String.valueOf(i).getBytes(),
          new String(event.getBody()).getBytes());
    }
    source.stop();
View Full Code Here

    source.setChannelProcessor(new ChannelProcessor(rcs));

    for (long i = 0; i < 100; i++) {
      source.process();
      Event event = channel.take();

      Assert.assertArrayEquals(String.valueOf(i).getBytes(),
          new String(event.getBody()).getBytes());
    }
  }
View Full Code Here

    source.start();

    for (long i = 0; i < 100; i++) {
      source.process();
      Event event = channel.take();

      Assert.assertArrayEquals(String.valueOf(i).getBytes(),
          new String(event.getBody()).getBytes());
    }
View Full Code Here

    source.setChannel(channel);

    for (long i = 0; i < 100; i++) {
      source.process();
      Event event = channel.take();

      Assert.assertArrayEquals(String.valueOf(i).getBytes(),
          new String(event.getBody()).getBytes());
    }
  }
View Full Code Here

    source.setChannel(channel);
    source.start();

    for (long i = 0; i < 100; i++) {
      source.process();
      Event event = channel.take();

      Assert.assertArrayEquals(String.valueOf(i).getBytes(),
          new String(event.getBody()).getBytes());
    }
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.