Package org.apache.flume

Examples of org.apache.flume.SinkRunner.start()


    sink.setChannel(channel);
    sink.start();
    DefaultSinkProcessor proc = new DefaultSinkProcessor();
    proc.setSinks(Collections.singletonList(sink));
    SinkRunner sinkRunner = new SinkRunner(proc);
    sinkRunner.start();

    ChannelSelector rcs = new ReplicatingChannelSelector();
    rcs.setChannels(Collections.singletonList(channel));
    ChannelProcessor chp = new ChannelProcessor(rcs);
    source.setChannelProcessor(chp);
View Full Code Here


    params.put("processor.priority.s2", "2");
    params.put("processor.priority.s3", "1");
    context.putAll(params);
    Configurables.configure(group, context);
    SinkRunner runner = new SinkRunner(group.getProcessor());
    runner.start();
    Assert.assertEquals(LifecycleState.START, s1.getLifecycleState());
    Assert.assertEquals(LifecycleState.START, s2.getLifecycleState());
    Assert.assertEquals(LifecycleState.START, s3.getLifecycleState());
    for(int i = 0; i < 15; i++) {
      Transaction tx = ch.getTransaction();
View Full Code Here

    params.put("processor.priority.s3", "1");
    params.put("processor.maxpenalty", "10000");
    context.putAll(params);
    Configurables.configure(group, context);
    SinkRunner runner = new SinkRunner(group.getProcessor());
    runner.start();
    Assert.assertEquals(LifecycleState.START, s1.getLifecycleState());
    Assert.assertEquals(LifecycleState.START, s2.getLifecycleState());
    Assert.assertEquals(LifecycleState.START, s3.getLifecycleState());
    for(int i = 0; i < 15; i++) {
      Transaction tx = ch.getTransaction();
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.