Package com.cloudera.flume.master.availability

Examples of com.cloudera.flume.master.availability.FailoverChainManager


   * backed version being reloaded from a restarted master.
   */
  void buildMaster() throws IOException {
    cfgMan = new ConfigManager(FlumeMaster.createConfigStore(FlumeConfiguration
        .get()));
    FailoverChainManager fcMan = new ConsistentHashFailoverChainManager(3);
    ConfigurationManager self2 = new ConfigManager();
    ConfigurationManager failover = new FailoverConfigurationManager(cfgMan,
        self2, fcMan);

    StatusManager statman = new StatusManager();
View Full Code Here


   * backed version being reloaded from a restarted master.
   */
  void buildMaster() throws IOException {
    cfgMan = new ConfigManager(FlumeMaster.createConfigStore(FlumeConfiguration
        .get()));
    FailoverChainManager fcMan = new ConsistentHashFailoverChainManager(3);
    ConfigurationManager self2 = new ConfigManager();
    ConfigurationManager failover = new FailoverConfigurationManager(cfgMan,
        self2, fcMan);

    StatusManager statman = new StatusManager();
View Full Code Here

   * Instantiate and expose managers
   */
  void setupNewManagers() {
    ConfigurationManager parent = new ConfigManager();
    ConfigurationManager self = new ConfigManager();
    FailoverChainManager fcMan = new ConsistentHashFailoverChainManager(3);
    ConfigurationManager self2 = new ConfigManager();

    failover = new FailoverConfigurationManager(parent, self2, fcMan);
    statman = new StatusManager();
    logical = new LogicalConfigurationManager(failover, self, statman);
View Full Code Here

   * backed version being reloaded from a restarted master.
   */
  void buildMaster() throws IOException {
    cfgMan = new ConfigManager(FlumeMaster.createConfigStore(FlumeConfiguration
        .get()));
    FailoverChainManager fcMan = new ConsistentHashFailoverChainManager(3);
    ConfigurationManager self2 = new ConfigManager();
    ConfigurationManager failover = new FailoverConfigurationManager(cfgMan,
        self2, fcMan);

    StatusManager statman = new StatusManager();
View Full Code Here

  }

  @Test
  public void testConsistentHashAvailMan() throws FlumeSpecException,
      IOException, InterruptedException {
    FailoverChainManager am = new ConsistentHashFailoverChainManager(3);

    for (String c : collectors) {
      am.addCollector(c);
    }

    String agent1 = am.getFailChainSinkSpec("agent1",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent1);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 2\",\"collector 3\",\"collector 1\")",
        agent1);
    CompositeSink snk1 = new CompositeSink(new Context(), agent1);
    snk1.open();
    snk1.close();

    String agent2 = am.getFailChainSinkSpec("agent2",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent2);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 1\",\"collector 4\",\"collector 5\")",
        agent2);
    CompositeSink snk2 = new CompositeSink(new Context(), agent2);
    snk2.open();
    snk2.close();

    String agent3 = am.getFailChainSinkSpec("agent3",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent3);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 1\",\"collector 2\",\"collector 5\")",
        agent3);
View Full Code Here

  }

  @Test
  public void testConsistentHashAvailMan() throws FlumeSpecException,
      IOException {
    FailoverChainManager am = new ConsistentHashFailoverChainManager(3);

    for (String c : collectors) {
      am.addCollector(c);
    }

    String agent1 = am.getFailChainSinkSpec("agent1",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent1);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 2\",\"collector 3\",\"collector 1\")",
        agent1);
    CompositeSink snk1 = new CompositeSink(new Context(), agent1);
    snk1.open();
    snk1.close();

    String agent2 = am.getFailChainSinkSpec("agent2",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent2);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 1\",\"collector 4\",\"collector 5\")",
        agent2);
    CompositeSink snk2 = new CompositeSink(new Context(), agent2);
    snk2.open();
    snk2.close();

    String agent3 = am.getFailChainSinkSpec("agent3",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent3);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 1\",\"collector 2\",\"collector 5\")",
        agent3);
View Full Code Here

   * Instantiate and expose managers
   */
  void setupNewManagers() {
    ConfigurationManager parent = new ConfigManager();
    ConfigurationManager self = new ConfigManager();
    FailoverChainManager fcMan = new ConsistentHashFailoverChainManager(3);
    ConfigurationManager self2 = new ConfigManager();

    failover = new FailoverConfigurationManager(parent, self2, fcMan);
    statman = new StatusManager();
    logical = new LogicalConfigurationManager(failover, self, statman);
View Full Code Here

TOP

Related Classes of com.cloudera.flume.master.availability.FailoverChainManager

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.