Package eu.stratosphere.nephele.executiongraph

Examples of eu.stratosphere.nephele.executiongraph.ExecutionGate


      final Map<AbstractInstance, Set<ChannelID>> entriesToInvalidate) {

    final int numberOfOutputGates = vertex.getNumberOfOutputGates();
    for (int i = 0; i < numberOfOutputGates; ++i) {

      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;
View Full Code Here


    }

    final int numberOfOutputGates = vertex.getNumberOfOutputGates();
    for (int i = 0; i < numberOfOutputGates; ++i) {

      final ExecutionGate outputGate = vertex.getOutputGate(i);
      boolean deployTarget;

      switch (outputGate.getChannelType()) {
      case NETWORK:
        deployTarget = false;
        break;
      case IN_MEMORY:
        deployTarget = true;
        break;
      default:
        throw new IllegalStateException("Unknown channel type");
      }

      if (deployTarget) {

        final int numberOfOutputChannels = outputGate.getNumberOfEdges();
        for (int j = 0; j < numberOfOutputChannels; ++j) {
          final ExecutionEdge outputChannel = outputGate.getEdge(j);
          final ExecutionVertex connectedVertex = outputChannel.getInputGate().getVertex();
          findVerticesToBeDeployed(connectedVertex, verticesToBeDeployed, alreadyVisited);
        }
      }
    }
View Full Code Here

TOP

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

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.