Examples of RoleCommandOrder


Examples of org.apache.ambari.server.metadata.RoleCommandOrder

            smokeTestRole).getExecutionCommand()
            .setHostLevelParams(hostParams);

      }

      RoleCommandOrder rco = getRoleCommandOrder(cluster);
      RoleGraph rg = new RoleGraph(rco);
      rg.build(stage);
      return rg.getStages();
    }
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

      customCommandExecutionHelper.addAction(actionRequest, stage, configuration, hostsMap, params);
    } else {
      actionExecutionHelper.addAction(actionExecContext, stage, configuration, hostsMap, params);
    }

    RoleCommandOrder rco = this.getRoleCommandOrder(cluster);
    RoleGraph rg = new RoleGraph(rco);
    rg.build(stage);
    List<Stage> stages = rg.getStages();
    if (stages != null && !stages.isEmpty()) {
      actionManager.sendActions(stages, actionRequest);
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

    injector.getInstance(PersistService.class).stop();
  }

  @Test
  public void testSingleStagePlan() {
    RoleCommandOrder rco = new RoleCommandOrder();
    ClusterEntity entity = createDummyData();
    ClusterImpl cluster = new ClusterImpl(entity, injector);
    rco.initialize(cluster);

    RoleGraph rg = new RoleGraph(rco);
    String hostname = "dummy";
    Stage stage = StageUtils.getATestStage(1, 1, hostname);
    rg.build(stage);
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

        .getExecutionCommands(hostname));
  }

  @Test
  public void testMultiStagePlan() {
    RoleCommandOrder rco = new RoleCommandOrder();
    ClusterEntity entity = createDummyData();
    ClusterImpl cluster = new ClusterImpl(entity, injector);
    rco.initialize(cluster);
    RoleGraph rg = new RoleGraph(rco);
    long now = System.currentTimeMillis();
    Stage stage = StageUtils.getATestStage(1, 1, "host1");
    stage.addHostRoleExecutionCommand("host2", Role.HBASE_MASTER,
        RoleCommand.START, new ServiceComponentHostStartEvent("HBASE_MASTER",
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

    assertEquals(3, outStages.size());
  }

  @Test
  public void testManyStages() {
    RoleCommandOrder rco = new RoleCommandOrder();
    ClusterEntity entity = createDummyData();
    ClusterImpl cluster = new ClusterImpl(entity, injector);
    rco.initialize(cluster);
    RoleGraph rg = new RoleGraph(rco);
    long now = System.currentTimeMillis();
    Stage stage = StageUtils.getATestStage(1, 1, "host1");
    stage.addHostRoleExecutionCommand("host11", Role.SECONDARY_NAMENODE,
        RoleCommand.START, new ServiceComponentHostStartEvent("SECONDARY_NAMENODE",
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

      this.serverDB = null;
    }
  }

  private RoleCommandOrder getRCO(Cluster cluster) {
      RoleCommandOrder rco;
      rco = injector.getInstance(RoleCommandOrder.class);
      rco.initialize(cluster);
      return rco;
  };
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

            .getExecutionCommand()
            .setClusterHostInfo(StageUtils.getClusterHostInfo(
                clusters.getHostsForCluster(cluster.getClusterName()), cluster, hostsMap, injector));
      }

      RoleCommandOrder rco = this.getRCO(cluster);
      RoleGraph rg = new RoleGraph(rco);
      rg.build(stage);
      return rg.getStages();
    }
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

        throw new AmbariException("Unsupported action");
      }
    }

    Cluster cluster = clusters.getCluster(clusterName);
    RoleCommandOrder rco = this.getRCO(cluster);
    RoleGraph rg = new RoleGraph(rco);
    rg.build(stage);
    List<Stage> stages = rg.getStages();
    if (stages != null && !stages.isEmpty()) {
      actionManager.sendActions(stages);
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

   
    return uriBuilder.toString();
  }

  private RoleCommandOrder getRoleCommandOrder(Cluster cluster) {
      RoleCommandOrder rco;
      rco = injector.getInstance(RoleCommandOrder.class);
      rco.initialize(cluster);
      return rco;
  }
View Full Code Here

Examples of org.apache.ambari.server.metadata.RoleCommandOrder

        customCommandExecutionHelper.addServiceCheckAction(stage, clientHost,
          smokeTestRole, nowTimestamp, serviceName,
          null, null, createDefaultHostParams(cluster));
      }

      RoleCommandOrder rco = getRoleCommandOrder(cluster);
      RoleGraph rg = new RoleGraph(rco);
      rg.build(stage);
      return rg.getStages();
    }
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.