Package eu.stratosphere.runtime.io.channels

Examples of eu.stratosphere.runtime.io.channels.ChannelType


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

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

          final ExecutionEdge outputChannel = outputGate.getEdge(j);
          final ExecutionVertex connectedVertex = outputChannel.getInputGate().getVertex();

          boolean recurse = false;

          if (!alreadyVisited.contains(connectedVertex)) {
            recurse = true;
          }

          if (channelType == ChannelType.IN_MEMORY
            && !pipeline.equals(connectedVertex.getExecutionPipeline())) {

            connectedVertex.setExecutionPipeline(pipeline);
            recurse = true;
          }

          if (recurse) {
            reconstructExecutionPipeline(connectedVertex, true, alreadyVisited);
          }
        }
      }
    } else {

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

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

          final ExecutionEdge inputChannel = inputGate.getEdge(j);
          final ExecutionVertex connectedVertex = inputChannel.getOutputGate().getVertex();
View Full Code Here


      final ManagementGroupVertexID targetGroupVertexID = new ManagementGroupVertexID();
      targetGroupVertexID.read(in);
      final ManagementGroupVertex targetGroupVertex = getGraph().getGroupVertexByID(targetGroupVertexID);
      final int sourceIndex = in.readInt();
      final int targetIndex = in.readInt();
      final ChannelType channelType = EnumUtils.readEnum(in, ChannelType.class);
      new ManagementGroupEdge(this, sourceIndex, targetGroupVertex, targetIndex, channelType);
    }

  }
View Full Code Here

      for (int i = 0; i < source.getNumberOfOutputGates(); i++) {

        final ExecutionGate outputGate = source.getOutputGate(i);
        final ManagementGate manangementOutputGate = gateMap.get(outputGate);
        final ChannelType channelType = outputGate.getChannelType();

        for (int j = 0; j < outputGate.getNumberOfEdges(); j++) {

          final ExecutionEdge outputChannel = outputGate.getEdge(j);
View Full Code Here

        final AbstractJobVertex tjv = edge.getConnectedVertex();

        final ExecutionVertex tev = vertexMap.get(tjv);
        final ExecutionGroupVertex tgv = tev.getGroupVertex();
        // Use NETWORK as default channel type if nothing else is defined by the user
        ChannelType channelType = edge.getChannelType();
        boolean userDefinedChannelType = true;
        if (channelType == null) {
          userDefinedChannelType = false;
          channelType = ChannelType.NETWORK;
        }
View Full Code Here

      final ExecutionVertex sourceVertex = it.next();

      for (int i = 0; i < sourceVertex.getNumberOfOutputGates(); ++i) {

        final ExecutionGate outputGate = sourceVertex.getOutputGate(i);
        final ChannelType channelType = outputGate.getChannelType();
        if (channelType == ChannelType.IN_MEMORY) {
          final int numberOfOutputChannels = outputGate.getNumberOfEdges();
          for (int j = 0; j < numberOfOutputChannels; ++j) {
            final ExecutionEdge outputChannel = outputGate.getEdge(j);
            outputChannel.getInputGate().getVertex()
              .setAllocatedResource(sourceVertex.getAllocatedResource());
          }
        }
      }
    }

    it = new ExecutionGraphIterator(this, false);
    while (it.hasNext()) {

      final ExecutionVertex targetVertex = it.next();

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

        final ExecutionGate inputGate = targetVertex.getInputGate(i);
        final ChannelType channelType = inputGate.getChannelType();
        if (channelType == ChannelType.IN_MEMORY) {
          final int numberOfInputChannels = inputGate.getNumberOfEdges();
          for (int j = 0; j < numberOfInputChannels; ++j) {
            final ExecutionEdge inputChannel = inputGate.getEdge(j);
            inputChannel.getOutputGate().getVertex()
View Full Code Here

          final ManagementGate targetGate = targetVertex.getInputGate(targetGateIndex);

          final int sourceIndex = in.readInt();
          final int targetIndex = in.readInt();

          final ChannelType channelType = EnumUtils.readEnum(in, ChannelType.class);
          new ManagementEdge(sourceEdgeID, targetEdgeID, sourceGate, sourceIndex, targetGate, targetIndex,
            channelType);
        }

      }
View Full Code Here

        final AbstractJobVertex jv = jobGraph.findVertexByID(tmpID);
        if (jv == null) {
          throw new IOException("Cannot find vertex with id " + tmpID);
        }

        final ChannelType channelType = EnumUtils.readEnum(in, ChannelType.class);
        final DistributionPattern distributionPattern = EnumUtils.readEnum(in, DistributionPattern.class);
        final int indexOfInputGate = in.readInt();

        try {
          this.connectTo(jv, channelType, i, indexOfInputGate, distributionPattern);
View Full Code Here

      final AbstractJobVertex sourceVertex, final TaskConfig sourceConfig,
      final AbstractJobVertex targetVertex, final TaskConfig targetConfig, boolean isBroadcast)
  throws JobGraphDefinitionException, CompilerException
  {
    // ------------ connect the vertices to the job graph --------------
    final ChannelType channelType;
    final DistributionPattern distributionPattern;

    switch (channel.getShipStrategy()) {
      case FORWARD:
      case PARTITION_LOCAL_HASH:
View Full Code Here

   */
  @Test
  public void testConstructorWithValidArguments() {

    final GateID gateID = new GateID();
    final ChannelType channelType = ChannelType.IN_MEMORY;
    final List<ChannelDeploymentDescriptor> channels = new ArrayList<ChannelDeploymentDescriptor>(0);

    final GateDeploymentDescriptor gdd = new GateDeploymentDescriptor(gateID, channelType, channels);

    assertEquals(gateID, gdd.getGateID());
View Full Code Here

   */
  @Test
  public void testConstructorWithInvalidArguments() {

    final GateID gateID = new GateID();
    final ChannelType channelType = ChannelType.IN_MEMORY;
    final List<ChannelDeploymentDescriptor> channels = new ArrayList<ChannelDeploymentDescriptor>(0);

    boolean firstExceptionCaught = false;
    boolean secondExceptionCaught = false;
    boolean thirdExceptionCaught = false;
View Full Code Here

TOP

Related Classes of eu.stratosphere.runtime.io.channels.ChannelType

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.