Package org.apache.slider.server.appmaster.state

Examples of org.apache.slider.server.appmaster.state.RoleStatus


    //app state makes all the decisions
    appState.onContainersAllocated(allocatedContainers, assignments, operations);

    //for each assignment: instantiate that role
    for (ContainerAssignment assignment : assignments) {
      RoleStatus role = assignment.role;
      Container container = assignment.container;
      launchService.launchRole(container, role, getInstanceDefinition());
    }
   
    //for all the operations, exec them
View Full Code Here


   */
  private TreeMap<String, RoleStatus> getRoleStatusesByName(Map<Integer, ProviderRole> rolesById,
      Map<Integer, RoleStatus> statusById) {
    TreeMap<String, RoleStatus> statusByName = new TreeMap<>();
    for (Entry<Integer, ProviderRole> role : rolesById.entrySet()) {
      final RoleStatus status = statusById.get(role.getKey());

      if (null == status) {
        log.error("Found ID ({}) which has no known ProviderRole",
            role.getKey());
      } else {
View Full Code Here

    //app state makes all the decisions
    appState.onContainersAllocated(allocatedContainers, assignments, operations);

    //for each assignment: instantiate that role
    for (ContainerAssignment assignment : assignments) {
      RoleStatus role = assignment.role;
      Container container = assignment.container;
      launchService.launchRole(container, role, getInstanceDefinition());
    }
   
    //for all the operations, exec them
View Full Code Here

    // does this change if we have 50 node, 100node, 500 node clusters?
    final Map<String,RoleInstance> containerInstances = getContainerInstances(slider.getAppState().cloneActiveContainerList());

    for (Entry<String,RoleStatus> entry : slider.getRoleStatusByName().entrySet()) {
      final String name = entry.getKey();
      final RoleStatus roleStatus = entry.getValue();

      DIV<Hamlet> div = html.div("role-info ui-widget-content ui-corner-all");

      List<ClusterNode> nodesInRole;
      try {
        nodesInRole = clusterOps.listClusterNodesInRole(name);
      } catch (Exception e) {
        log.error("Could not fetch containers for role: " + name, e);
        nodesInRole = Collections.emptyList();
      }

      div.h2(BOLD, StringUtils.capitalize(name));

      // Generate the details on this role
      Iterable<Entry<String,Integer>> stats = roleStatus.buildStatistics().entrySet();
      generateRoleDetails(div,"role-stats-wrap", "Specifications", Iterables.transform(stats, stringIntPairFunc));

      // Sort the ClusterNodes by their name (containerid)
      Collections.sort(nodesInRole, new ClusterNodeNameComparator());
View Full Code Here

   */
  private TreeMap<String, RoleStatus> getRoleStatusesByName(Map<Integer, ProviderRole> rolesById,
      Map<Integer, RoleStatus> statusById) {
    TreeMap<String, RoleStatus> statusByName = new TreeMap<>();
    for (Entry<Integer, ProviderRole> role : rolesById.entrySet()) {
      final RoleStatus status = statusById.get(role.getKey());

      if (null == status) {
        log.error("Found ID ({}) which has no known ProviderRole",
            role.getKey());
      } else {
View Full Code Here

TOP

Related Classes of org.apache.slider.server.appmaster.state.RoleStatus

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.