Package org.apache.flume.channel

Examples of org.apache.flume.channel.ChannelProcessor


    channels.add(channel);

    ChannelSelector rcs = new ReplicatingChannelSelector();
    rcs.setChannels(channels);

    source.setChannelProcessor(new ChannelProcessor(rcs));

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


    channels.add(channel);

    ChannelSelector rcs = new ReplicatingChannelSelector();
    rcs.setChannels(channels);

    source.setChannelProcessor(new ChannelProcessor(rcs));

    source.start();

    for (long i = 0; i < 100; i++) {
      source.process();
View Full Code Here

      Map<String,String> selectorConfig = comp.getSubconfiguration("selector");

      ChannelSelector selector = ChannelSelectorFactory.create(
          channels, selectorConfig);

      ChannelProcessor channelProcessor = new ChannelProcessor(selector);

      source.setChannelProcessor(channelProcessor);
      conf.getSourceRunners().put(comp.getComponentName(),
          SourceRunner.forSource(source));
    }
View Full Code Here

    channels.add(channel);

    ChannelSelector rcs = new ReplicatingChannelSelector();
    rcs.setChannels(channels);

    source.setChannelProcessor(new ChannelProcessor(rcs));
  }
View Full Code Here

    channels.add(channel);

    ChannelSelector rcs = new ReplicatingChannelSelector();
    rcs.setChannels(channels);

    source.setChannelProcessor(new ChannelProcessor(rcs));
  }
View Full Code Here

      Context context = new Context();
      context.put("port", String.valueOf(port));
      context.put("bind", "0.0.0.0");
      Configurables.configure(source, context);
      sources.add(source);
      source.setChannelProcessor(new ChannelProcessor(rcs));
    }

    for (Source source : sources) {
      source.start();
    }
View Full Code Here

    cs.setChannels(Lists.newArrayList(channel));

    PollableSource source = new PollableSource() {

      private String name;
      private ChannelProcessor cp = new ChannelProcessor(cs);

      @Override
      public Status process() throws EventDeliveryException {
        Transaction transaction = channel.getTransaction();
View Full Code Here

    channels.add(ch);

    ChannelSelector rcs = new ReplicatingChannelSelector();
    rcs.setChannels(channels);

    source.setChannelProcessor(new ChannelProcessor(rcs));

    source.start();
  }
View Full Code Here

    sink.start();
   
    source = new EmbeddedSource(sink);   
    ChannelSelector rcs = new ReplicatingChannelSelector();
    rcs.setChannels(Collections.singletonList(channel));
    ChannelProcessor chp = new ChannelProcessor(rcs);
    Context chpContext = new Context();
    chpContext.put("interceptors", "uuidinterceptor");
    chpContext.put("interceptors.uuidinterceptor.type", UUIDInterceptor.Builder.class.getName());
    chp.configure(chpContext);
    source.setChannelProcessor(chp);
   
    deleteAllDocuments();
  }
View Full Code Here

    if(channel != null) {
      ReplicatingChannelSelector selector = new ReplicatingChannelSelector();
      List<Channel> channels = Lists.newArrayList();
      channels.add(channel);
      selector.setChannels(channels);
      this.source.setChannelProcessor(new ChannelProcessor(selector));
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.flume.channel.ChannelProcessor

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.