Package org.apache.flume.source

Examples of org.apache.flume.source.SequenceGeneratorSource


  public void testLifecycle() throws LifecycleException, InterruptedException {

    Channel channel = new MemoryChannel();
    Configurables.configure(channel, new Context());

    Source generatorSource = new SequenceGeneratorSource();
    generatorSource.setChannel(channel);

    Sink nullSink = new NullSink();
    nullSink.setChannel(channel);

    nodeManager.add(SourceRunner.forSource(generatorSource));
View Full Code Here


      InterruptedException {

    Channel channel = new MemoryChannel();
    Configurables.configure(channel, new Context());

    Source source = new SequenceGeneratorSource();
    source.setChannel(channel);

    Sink sink = new NullSink();
    sink.setChannel(channel);

    nodeManager.add(SourceRunner.forSource(source));
View Full Code Here

    Assert.assertTrue("Node manager didn't reach START or ERROR",
        LifecycleController.waitForOneOf(nodeManager,
            LifecycleState.START_OR_ERROR, 5000));

    for (int i = 0; i < 3; i++) {
      SequenceGeneratorSource source = new SequenceGeneratorSource();
      source.setChannel(new MemoryChannel());

      PollableSourceRunner sourceRunner = new PollableSourceRunner();
      sourceRunner.setSource(source);

      nodeManager.add(sourceRunner);
View Full Code Here

      InterruptedException {

    Set<LifecycleAware> testNodes = new HashSet<LifecycleAware>();

    for (int i = 0; i < 30; i++) {
      SequenceGeneratorSource source = new SequenceGeneratorSource();
      source.setChannel(new MemoryChannel());

      PollableSourceRunner sourceRunner = new PollableSourceRunner();
      sourceRunner.setSource(source);

      testNodes.add(sourceRunner);
View Full Code Here

  public void testErrorNode() throws LifecycleException, InterruptedException {

    Set<LifecycleAware> testNodes = new HashSet<LifecycleAware>();

    for (int i = 0; i < 30; i++) {
      SequenceGeneratorSource source = new SequenceGeneratorSource();
      source.setChannel(new MemoryChannel());

      PollableSourceRunner sourceRunner = new PollableSourceRunner();
      sourceRunner.setSource(source);

      testNodes.add(sourceRunner);
View Full Code Here

    context.put(FileChannelConfiguration.MAX_FILE_SIZE,
        String.valueOf(1024 * 1024 * 5));
    // do reconfiguration
    Configurables.configure(channel, context);

    SequenceGeneratorSource source = new SequenceGeneratorSource();
    CountingSourceRunner sourceRunner = new CountingSourceRunner(source, channel);

    NullSink sink = new NullSink();
    sink.setChannel(channel);
    CountingSinkRunner sinkRunner = new CountingSinkRunner(sink);
View Full Code Here

TOP

Related Classes of org.apache.flume.source.SequenceGeneratorSource

Copyright © 2018 www.massapicom. 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.