Package org.apache.flume.conf.FlumeConfiguration

Examples of org.apache.flume.conf.FlumeConfiguration.AgentConfiguration


    es.awaitEvent();
    es.reset();

    FlumeConfiguration fc = cp.getFlumeConfiguration();
    Assert.assertTrue(fc.getConfigurationErrors().isEmpty());
    AgentConfiguration ac = fc.getConfigurationFor(AGENT_NAME);
    Assert.assertNull(ac);

    addData();
    es.awaitEvent();
    es.reset();
View Full Code Here


  protected abstract FlumeConfiguration getFlumeConfiguration();

  public MaterializedConfiguration getConfiguration() {
    MaterializedConfiguration conf = new SimpleMaterializedConfiguration();
    FlumeConfiguration fconfig = getFlumeConfiguration();
    AgentConfiguration agentConf = fconfig.getConfigurationFor(getAgentName());
    if (agentConf != null) {
      Map<String, ChannelComponent> channelComponentMap = Maps.newHashMap();
      Map<String, SourceRunner> sourceRunnerMap = Maps.newHashMap();
      Map<String, SinkRunner> sinkRunnerMap = Maps.newHashMap();
      try {
View Full Code Here

  protected abstract FlumeConfiguration getFlumeConfiguration();

  public MaterializedConfiguration getConfiguration() {
    MaterializedConfiguration conf = new SimpleMaterializedConfiguration();
    FlumeConfiguration fconfig = getFlumeConfiguration();
    AgentConfiguration agentConf = fconfig.getConfigurationFor(getAgentName());
    if (agentConf != null) {
      Map<String, ChannelComponent> channelComponentMap = Maps.newHashMap();
      Map<String, SourceRunner> sourceRunnerMap = Maps.newHashMap();
      Map<String, SinkRunner> sinkRunnerMap = Maps.newHashMap();
      try {
View Full Code Here

    Collections.sort(expected);
    Collections.sort(actual);
    Assert.assertEquals(expected, actual);


    AgentConfiguration agentConfiguration =
        configuration.getConfigurationFor("host1");
    Assert.assertNotNull(agentConfiguration);


    LOGGER.info(agentConfiguration.getPrevalidationConfig());
    LOGGER.info(agentConfiguration.getPostvalidationConfig());


    Set<String> sources = Sets.newHashSet("source1");
    Set<String> sinks = Sets.newHashSet("sink1");
    Set<String> channels = Sets.newHashSet("channel1");

    Assert.assertEquals(sources, agentConfiguration.getSourceSet());
    Assert.assertEquals(sinks, agentConfiguration.getSinkSet());
    Assert.assertEquals(channels, agentConfiguration.getChannelSet());
  }
View Full Code Here

    properties.put("agent1.sinks", "sink0");
    properties.put("agent1.sinks.sink0.type", "null");
    properties.put("agent1.sinks.sink0.channel", "ch0");

    FlumeConfiguration conf = new FlumeConfiguration(properties);
    AgentConfiguration agentConfiguration = conf.getConfigurationFor("agent1");
    Assert.assertEquals(String.valueOf(agentConfiguration.getSourceSet()), 1,
        agentConfiguration.getSourceSet().size());
    Assert.assertEquals(String.valueOf(agentConfiguration.getChannelSet()), 1,
        agentConfiguration.getChannelSet().size());
    Assert.assertEquals(String.valueOf(agentConfiguration.getSinkSet()), 1,
        agentConfiguration.getSinkSet().size());
    Assert.assertTrue(agentConfiguration.getSourceSet().contains("src0"));
    Assert.assertTrue(agentConfiguration.getChannelSet().contains("ch0"));
    Assert.assertTrue(agentConfiguration.getSinkSet().contains("sink0"));
  }
View Full Code Here

      properties.load(reader);
      // If there is an old configuration, shut it down.

      NodeConfiguration conf = new SimpleNodeConfiguration();
      FlumeConfiguration fconfig = new FlumeConfiguration(properties);
      AgentConfiguration agentConf = fconfig.getConfigurationFor(getNodeName());

      if (agentConf != null) {
        getConfigurationAware().stopAllComponents();

        loadChannels(agentConf, conf);
View Full Code Here

TOP

Related Classes of org.apache.flume.conf.FlumeConfiguration.AgentConfiguration

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.