Package org.apache.hadoop.yarn.api.records

Examples of org.apache.hadoop.yarn.api.records.NodeState


          new RMAppAttemptEvent(appAttemptId, RMAppAttemptEventType.START));
    }
  }
 
  private void processNodeUpdate(RMAppNodeUpdateType type, RMNode node) {
    NodeState nodeState = node.getState();
    updatedNodes.add(node);
    LOG.debug("Received node update event:" + type + " for node:" + node
        + " with state:" + nodeState);
  }
View Full Code Here


          updatedNodes));

      // act upon running tasks
      HashSet<NodeId> unusableNodes = new HashSet<NodeId>();
      for (NodeReport nr : updatedNodes) {
        NodeState nodeState = nr.getNodeState();
        if (nodeState.isUnusable()) {
          unusableNodes.add(nr.getNodeId());
        }
      }
      for (int i = 0; i < 2; ++i) {
        HashMap<TaskAttemptId, Container> taskSet = i == 0 ? assignedRequests.maps
View Full Code Here

          th(".containers", "Containers").
          th(".mem", "Mem Used").
          th(".mem", "Mem Avail").
          _()._().
          tbody();
      NodeState stateFilter = null;
      if(type != null && !type.isEmpty()) {
        stateFilter = NodeState.valueOf(type.toUpperCase());
      }
      Collection<RMNode> rmNodes = this.rmContext.getRMNodes().values();
      boolean isInactive = false;
      if (stateFilter != null) {
        switch (stateFilter) {
        case DECOMMISSIONED:
        case LOST:
        case REBOOTED:
          rmNodes = this.rmContext.getInactiveRMNodes().values();
          isInactive = true;
          break;
        }
      }
      for (RMNode ni : rmNodes) {
        if(stateFilter != null) {
          NodeState state = ni.getState();
          if(!stateFilter.equals(state)) {
            continue;
          }
        } else {
          // No filter. User is asking for all nodes. Make sure you skip the
View Full Code Here

          new RMAppAttemptEvent(appAttemptId, RMAppAttemptEventType.START));
    }
  }
 
  private void processNodeUpdate(RMAppNodeUpdateType type, RMNode node) {
    NodeState nodeState = node.getState();
    updatedNodes.add(node);
    LOG.debug("Received node update event:" + type + " for node:" + node
        + " with state:" + nodeState);
  }
View Full Code Here

  public void handle(RMNodeEvent event) {
    LOG.debug("Processing " + event.getNodeId() + " of type " + event.getType());
    try {
      writeLock.lock();
      NodeState oldState = getState();
      try {
         stateMachine.doTransition(event.getType(), event);
      } catch (InvalidStateTransitonException e) {
        LOG.error("Can't handle this event at current state", e);
        LOG.error("Invalid event " + event.getType() +
View Full Code Here

      SingleArcTransition<JobImpl, JobEvent> {
    @Override
    public void transition(JobImpl job, JobEvent event) {
      JobUpdatedNodesEvent updateEvent = (JobUpdatedNodesEvent) event;
      for(NodeReport nr: updateEvent.getUpdatedNodes()) {
        NodeState nodeState = nr.getNodeState();
        if(nodeState.isUnusable()) {
          // act on the updates
          job.actOnUnusableNode(nr.getNodeId(), nodeState);
        }
      }
    }
View Full Code Here

      throw new NotFoundException("Null ResourceScheduler instance");
    }
    Collection<RMNode> rmNodes = this.rm.getRMContext().getRMNodes().values();
    boolean isInactive = false;
    if (filterState != null && !filterState.isEmpty()) {
      NodeState nodeState = NodeState.valueOf(filterState.toUpperCase());
      switch (nodeState) {
      case DECOMMISSIONED:
      case LOST:
      case REBOOTED:
        rmNodes = this.rm.getRMContext().getInactiveRMNodes().values();
View Full Code Here

          th(".containers", "Containers").
          th(".mem", "Mem Used").
          th(".mem", "Mem Avail").
          _()._().
          tbody();
      NodeState stateFilter = null;
      if(type != null && !type.isEmpty()) {
        stateFilter = NodeState.valueOf(type.toUpperCase());
      }
      Collection<RMNode> rmNodes = this.rmContext.getRMNodes().values();
      boolean isInactive = false;
      if (stateFilter != null) {
        switch (stateFilter) {
        case DECOMMISSIONED:
        case LOST:
        case REBOOTED:
          rmNodes = this.rmContext.getInactiveRMNodes().values();
          isInactive = true;
          break;
        }
      }
      for (RMNode ni : rmNodes) {
        if(stateFilter != null) {
          NodeState state = ni.getState();
          if(!stateFilter.equals(state)) {
            continue;
          }
        } else {
          // No filter. User is asking for all nodes. Make sure you skip the
View Full Code Here

      SingleArcTransition<JobImpl, JobEvent> {
    @Override
    public void transition(JobImpl job, JobEvent event) {
      JobUpdatedNodesEvent updateEvent = (JobUpdatedNodesEvent) event;
      for(NodeReport nr: updateEvent.getUpdatedNodes()) {
        NodeState nodeState = nr.getNodeState();
        if(nodeState.isUnusable()) {
          // act on the updates
          job.actOnUnusableNode(nr.getNodeId(), nodeState);
        }
      }
    }
View Full Code Here

  public void handle(RMNodeEvent event) {
    LOG.debug("Processing " + event.getNodeId() + " of type " + event.getType());
    try {
      writeLock.lock();
      NodeState oldState = getState();
      try {
         stateMachine.doTransition(event.getType(), event);
      } catch (InvalidStateTransitonException e) {
        LOG.error("Can't handle this event at current state", e);
        LOG.error("Invalid event " + event.getType() +
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.api.records.NodeState

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.