Package org.apache.hadoop.yarn.server.resourcemanager.webapp.dao

Examples of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodesInfo


      }
    }
   
    Collection<RMNode> rmNodes = RMServerUtils.queryRMNodes(this.rm.getRMContext(),
        acceptedStates);
    NodesInfo nodesInfo = new NodesInfo();
    for (RMNode rmNode : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(rmNode, sched);
      if (EnumSet.of(NodeState.LOST, NodeState.DECOMMISSIONED, NodeState.REBOOTED)
          .contains(rmNode.getState())) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      nodesInfo.add(nodeInfo);
    }
   
    return nodesInfo;
  }
View Full Code Here


      }
    }
   
    Collection<RMNode> rmNodes = RMServerUtils.queryRMNodes(this.rm.getRMContext(),
        acceptedStates);
    NodesInfo nodesInfo = new NodesInfo();
    for (RMNode rmNode : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(rmNode, sched);
      if (EnumSet.of(NodeState.LOST, NodeState.DECOMMISSIONED, NodeState.REBOOTED)
          .contains(rmNode.getState())) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      nodesInfo.add(nodeInfo);
    }
   
    return nodesInfo;
  }
View Full Code Here

        rmNodes = this.rm.getRMContext().getInactiveRMNodes().values();
        isInactive = true;
        break;
      }
    }
    NodesInfo allNodes = new NodesInfo();
    for (RMNode ni : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(ni, sched);
      if (filterState != null) {
        if (!(nodeInfo.getState().equalsIgnoreCase(filterState))) {
          continue;
        }
      } else {
        // No filter. User is asking for all nodes. Make sure you skip the
        // unhealthy nodes.
        if (ni.getState() == RMNodeState.UNHEALTHY) {
          continue;
        }
      }
      if ((healthState != null) && (!healthState.isEmpty())) {
        LOG.info("heatlh state is : " + healthState);
        if (!healthState.equalsIgnoreCase("true")
            && !healthState.equalsIgnoreCase("false")) {
          String msg = "Error: You must specify either true or false to query on health";
          throw new BadRequestException(msg);
        }
        if (nodeInfo.isHealthy() != Boolean.parseBoolean(healthState)) {
          continue;
        }
      }
      if (isInactive) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      allNodes.add(nodeInfo);
    }
    return allNodes;
  }
View Full Code Here

      }
    }
   
    Collection<RMNode> rmNodes = RMServerUtils.queryRMNodes(this.rm.getRMContext(),
        acceptedStates);
    NodesInfo nodesInfo = new NodesInfo();
    for (RMNode rmNode : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(rmNode, sched);
      if (EnumSet.of(NodeState.LOST, NodeState.DECOMMISSIONED, NodeState.REBOOTED)
          .contains(rmNode.getState())) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      nodesInfo.add(nodeInfo);
    }
   
    return nodesInfo;
  }
View Full Code Here

        rmNodes = this.rm.getRMContext().getInactiveRMNodes().values();
        isInactive = true;
        break;
      }
    }
    NodesInfo allNodes = new NodesInfo();
    for (RMNode ni : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(ni, sched);
      if (filterState != null) {
        if (!(nodeInfo.getState().equalsIgnoreCase(filterState))) {
          continue;
        }
      } else {
        // No filter. User is asking for all nodes. Make sure you skip the
        // unhealthy nodes.
        if (ni.getState() == RMNodeState.UNHEALTHY) {
          continue;
        }
      }
      if ((healthState != null) && (!healthState.isEmpty())) {
        LOG.info("heatlh state is : " + healthState);
        if (!healthState.equalsIgnoreCase("true")
            && !healthState.equalsIgnoreCase("false")) {
          String msg = "Error: You must specify either true or false to query on health";
          throw new BadRequestException(msg);
        }
        if (nodeInfo.isHealthy() != Boolean.parseBoolean(healthState)) {
          continue;
        }
      }
      if (isInactive) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      allNodes.add(nodeInfo);
    }
    return allNodes;
  }
View Full Code Here

      }
    }
   
    Collection<RMNode> rmNodes = RMServerUtils.queryRMNodes(this.rm.getRMContext(),
        acceptedStates);
    NodesInfo nodesInfo = new NodesInfo();
    for (RMNode rmNode : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(rmNode, sched);
      if (EnumSet.of(NodeState.LOST, NodeState.DECOMMISSIONED, NodeState.REBOOTED)
          .contains(rmNode.getState())) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      nodesInfo.add(nodeInfo);
    }
   
    return nodesInfo;
  }
View Full Code Here

        rmNodes = this.rm.getRMContext().getInactiveRMNodes().values();
        isInactive = true;
        break;
      }
    }
    NodesInfo allNodes = new NodesInfo();
    for (RMNode ni : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(ni, sched);
      if (filterState != null) {
        if (!(nodeInfo.getState().equalsIgnoreCase(filterState))) {
          continue;
        }
      } else {
        // No filter. User is asking for all nodes. Make sure you skip the
        // unhealthy nodes.
        if (ni.getState() == NodeState.UNHEALTHY) {
          continue;
        }
      }
      if ((healthState != null) && (!healthState.isEmpty())) {
        LOG.info("heatlh state is : " + healthState);
        if (!healthState.equalsIgnoreCase("true")
            && !healthState.equalsIgnoreCase("false")) {
          String msg = "Error: You must specify either true or false to query on health";
          throw new BadRequestException(msg);
        }
        if (nodeInfo.isHealthy() != Boolean.parseBoolean(healthState)) {
          continue;
        }
      }
      if (isInactive) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      allNodes.add(nodeInfo);
    }
    return allNodes;
  }
View Full Code Here

      }
    }
   
    Collection<RMNode> rmNodes = RMServerUtils.queryRMNodes(this.rm.getRMContext(),
        acceptedStates);
    NodesInfo nodesInfo = new NodesInfo();
    for (RMNode rmNode : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(rmNode, sched);
      if (EnumSet.of(NodeState.LOST, NodeState.DECOMMISSIONED, NodeState.REBOOTED)
          .contains(rmNode.getState())) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      nodesInfo.add(nodeInfo);
    }
   
    return nodesInfo;
  }
View Full Code Here

        rmNodes = this.rm.getRMContext().getInactiveRMNodes().values();
        isInactive = true;
        break;
      }
    }
    NodesInfo allNodes = new NodesInfo();
    for (RMNode ni : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(ni, sched);
      if (filterState != null) {
        if (!(nodeInfo.getState().equalsIgnoreCase(filterState))) {
          continue;
        }
      } else {
        // No filter. User is asking for all nodes. Make sure you skip the
        // unhealthy nodes.
        if (ni.getState() == NodeState.UNHEALTHY) {
          continue;
        }
      }
      if ((healthState != null) && (!healthState.isEmpty())) {
        LOG.info("heatlh state is : " + healthState);
        if (!healthState.equalsIgnoreCase("true")
            && !healthState.equalsIgnoreCase("false")) {
          String msg = "Error: You must specify either true or false to query on health";
          throw new BadRequestException(msg);
        }
        if (nodeInfo.isHealthy() != Boolean.parseBoolean(healthState)) {
          continue;
        }
      }
      if (isInactive) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      allNodes.add(nodeInfo);
    }
    return allNodes;
  }
View Full Code Here

      }
    }
   
    Collection<RMNode> rmNodes = RMServerUtils.queryRMNodes(this.rm.getRMContext(),
        acceptedStates);
    NodesInfo nodesInfo = new NodesInfo();
    for (RMNode rmNode : rmNodes) {
      NodeInfo nodeInfo = new NodeInfo(rmNode, sched);
      if (EnumSet.of(NodeState.LOST, NodeState.DECOMMISSIONED, NodeState.REBOOTED)
          .contains(rmNode.getState())) {
        nodeInfo.setNodeHTTPAddress(EMPTY);
      }
      nodesInfo.add(nodeInfo);
    }
   
    return nodesInfo;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodesInfo

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.