Package eu.stratosphere.nephele.executiongraph

Examples of eu.stratosphere.nephele.executiongraph.ExecutionVertex


      // Restart all predecessors without checkpoint
      final Iterator<ExecutionVertex> cancelIterator = verticesToBeCanceled.iterator();
      while (cancelIterator.hasNext()) {

        final ExecutionVertex vertex = cancelIterator.next();

        if (vertex.compareAndUpdateExecutionState(ExecutionState.FINISHED, getStateToUpdate(vertex))) {
          LOG.info("Vertex " + vertex + " has already finished and will not be canceled");
          if (vertex.getExecutionState() == ExecutionState.ASSIGNED) {
            assignedVertices.add(vertex);
          }
          continue;
        }

        LOG.info(vertex + " is canceled by recovery logic");
        verticesToBeRestarted.put(vertex.getID(), vertex);
        final TaskCancelResult cancelResult = vertex.cancelTask();

        if (cancelResult.getReturnCode() != AbstractTaskResult.ReturnCode.SUCCESS
            && cancelResult.getReturnCode() != AbstractTaskResult.ReturnCode.TASK_NOT_FOUND) {

          verticesToBeRestarted.remove(vertex.getID());
          LOG.error("Unable to cancel vertex" + cancelResult.getDescription());
          return false;
        }
      }
View Full Code Here


    final Set<ExecutionVertex> visited = new HashSet<ExecutionVertex>();
    verticesToTest.add(failedVertex);

    while (!verticesToTest.isEmpty()) {

      final ExecutionVertex vertex = verticesToTest.poll();

      // Predecessors must be either checkpoints or need to be restarted, too
      for (int j = 0; j < vertex.getNumberOfPredecessors(); j++) {
        final ExecutionVertex predecessor = vertex.getPredecessor(j);

        if (hasInstanceAssigned(predecessor)) {
          verticesToBeCanceled.add(predecessor);
        }
View Full Code Here

      final ExecutionGate outputGate = vertex.getOutputGate(i);
      for (int j = 0; j < outputGate.getNumberOfEdges(); ++j) {

        final ExecutionEdge outputChannel = outputGate.getEdge(j);

        final ExecutionVertex connectedVertex = outputChannel.getInputGate().getVertex();
        if (connectedVertex == null) {
          LOG.error("Connected vertex is null");
          continue;
        }

        final AbstractInstance instance = connectedVertex.getAllocatedResource().getInstance();
        if (instance instanceof DummyInstance) {
          continue;
        }

        Set<ChannelID> channelIDs = entriesToInvalidate.get(instance);
        if (channelIDs == null) {
          channelIDs = new SerializableHashSet<ChannelID>();
          entriesToInvalidate.put(instance, channelIDs);
        }

        channelIDs.add(outputChannel.getInputChannelID());
      }
    }

    for (int i = 0; i < vertex.getNumberOfInputGates(); ++i) {

      final ExecutionGate inputGate = vertex.getInputGate(i);
      for (int j = 0; j < inputGate.getNumberOfEdges(); ++j) {

        final ExecutionEdge inputChannel = inputGate.getEdge(j);

        final ExecutionVertex connectedVertex = inputChannel.getOutputGate().getVertex();
        if (connectedVertex == null) {
          LOG.error("Connected vertex is null");
          continue;
        }

        final AbstractInstance instance = connectedVertex.getAllocatedResource().getInstance();
        if (instance instanceof DummyInstance) {
          continue;
        }

        Set<ChannelID> channelIDs = entriesToInvalidate.get(instance);
View Full Code Here

TOP

Related Classes of eu.stratosphere.nephele.executiongraph.ExecutionVertex

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.