Package org.apache.flume.channel

Examples of org.apache.flume.channel.ChannelProcessor


  }

  @Override
  public void start() {
    Source source = getSource();
    ChannelProcessor cp = source.getChannelProcessor();
    cp.initialize();
    source.start();
    lifecycleState = LifecycleState.START;
  }
View Full Code Here


  @Override
  public void stop() {
    Source source = getSource();
    source.stop();
    ChannelProcessor cp = source.getChannelProcessor();
    cp.close();
    lifecycleState = LifecycleState.STOP;
  }
View Full Code Here

  }

  @Override
  public void start() {
    PollableSource source = (PollableSource) getSource();
    ChannelProcessor cp = source.getChannelProcessor();
    cp.initialize();
    source.start();

    runner = new PollingRunner();

    runner.source = source;
View Full Code Here

      Thread.currentThread().interrupt();
    }

    Source source = getSource();
    source.stop();
    ChannelProcessor cp = source.getChannelProcessor();
    cp.close();

    lifecycleState = LifecycleState.STOP;
  }
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(ch);

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

    source.setChannelProcessor(new ChannelProcessor(rcs));

    source.start();
  }
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

            config.getSelectorConfiguration();

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

        ChannelProcessor channelProcessor = new ChannelProcessor(selector);
        Configurables.configure(channelProcessor, config);

        source.setChannelProcessor(channelProcessor);
        conf.getSourceRunners().put(comp.getComponentName(),
            SourceRunner.forSource(source));
      }
    }
    Map<String, Context> sourceContexts = agentConf.getSourceContext();

    for (String src : sources) {
      Context context = sourceContexts.get(src);
      if(context != null){
        Source source =
            getSourceFactory().create(src,
                context.getString(BasicConfigurationConstants.CONFIG_TYPE));
        List<Channel> channels = new ArrayList<Channel>();
        Configurables.configure(source, context);
        String[] channelNames = context.getString(
            BasicConfigurationConstants.CONFIG_CHANNELS).split("\\s+");
        for (String chName : channelNames) {
          channels.add(conf.getChannels().get(chName));
        }

        Map<String, String> selectorConfig = context.getSubProperties(
            BasicConfigurationConstants.CONFIG_SOURCE_CHANNELSELECTOR_PREFIX);

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

        ChannelProcessor channelProcessor = new ChannelProcessor(selector);
        Configurables.configure(channelProcessor, context);

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

        channels.add(channel);

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

        eventSource.setChannelProcessor(new ChannelProcessor(cs));

        eventSource.start();

        Assert.assertTrue("Reached start or error", LifecycleController.waitForOneOf(
            eventSource, LifecycleState.START_OR_ERROR));
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.