.map(partitionId -> new InputChannelDeploymentDescriptor( partitionId, localMode ? ResultPartitionLocation.createLocal() : ResultPartitionLocation.createRemote(new ConnectionID(senderLocation, finalChannel)))) .toArray(InputChannelDeploymentDescriptor[]::new);
@Override public ResultPartitionLocation getResultPartitionLocation( TaskManagerLocation producerLocation, TaskManagerLocation consumerLocation, IntermediateResult intermediateResult) { // use the yarn shuffle service data port Integer dataPort = configuration.getInteger( ExternalBlockShuffleServiceOptions.FLINK_SHUFFLE_SERVICE_PORT_KEY); // use the taskmanager ip address, for the shuffle service deployed on the same host // of the taskmanager is used to shuffle data to down streams. InetSocketAddress address = new InetSocketAddress(producerLocation.address(), dataPort); ConnectionID connectionId = new ConnectionID(address, intermediateResult.getConnectionIndex()); return ResultPartitionLocation.createRemote(connectionId); } }
@Override public ResultPartitionLocation getResultPartitionLocation( TaskManagerLocation producerLocation, TaskManagerLocation consumerLocation, IntermediateResult intermediateResult) { if (consumerLocation.getResourceID().equals(producerLocation.getResourceID())) { // in the same taskmanager return ResultPartitionLocation.createLocal(); } else { // use the taskmanager ip and data port ConnectionID connectionId = new ConnectionID(producerLocation, intermediateResult.getConnectionIndex()); return ResultPartitionLocation.createRemote(connectionId); } } }
/** * Creates a channel deployment descriptor by completing the partition location. * * @see InputChannelDeploymentDescriptor */ public InputChannelDeploymentDescriptor createInputChannelDeploymentDescriptor(Execution consumerExecution) { checkNotNull(consumerExecution, "consumerExecution"); TaskManagerLocation consumerLocation = consumerExecution.getAssignedResourceLocation(); checkNotNull(consumerLocation, "Consumer connection info null"); final ResultPartitionLocation partitionLocation; if (consumerLocation.equals(partitionTaskManagerLocation)) { partitionLocation = ResultPartitionLocation.createLocal(); } else { partitionLocation = ResultPartitionLocation.createRemote( new ConnectionID(partitionTaskManagerLocation, partitionConnectionIndex)); } return new InputChannelDeploymentDescriptor(partitionID, partitionLocation); }
/** * Creates a channel deployment descriptor by completing the partition location. * * @see InputChannelDeploymentDescriptor */ public InputChannelDeploymentDescriptor createInputChannelDeploymentDescriptor(Execution consumerExecution) { checkNotNull(consumerExecution, "consumerExecution"); TaskManagerLocation consumerLocation = consumerExecution.getAssignedResourceLocation(); checkNotNull(consumerLocation, "Consumer connection info null"); final ResultPartitionLocation partitionLocation; if (consumerLocation.equals(partitionTaskManagerLocation)) { partitionLocation = ResultPartitionLocation.createLocal(); } else { partitionLocation = ResultPartitionLocation.createRemote( new ConnectionID(partitionTaskManagerLocation, partitionConnectionIndex)); } return new InputChannelDeploymentDescriptor(partitionID, partitionLocation); }
/** * Creates a channel deployment descriptor by completing the partition location. * * @see InputChannelDeploymentDescriptor */ public InputChannelDeploymentDescriptor createInputChannelDeploymentDescriptor(Execution consumerExecution) { checkNotNull(consumerExecution, "consumerExecution"); TaskManagerLocation consumerLocation = consumerExecution.getAssignedResourceLocation(); checkNotNull(consumerLocation, "Consumer connection info null"); final ResultPartitionLocation partitionLocation; if (consumerLocation.equals(partitionTaskManagerLocation)) { partitionLocation = ResultPartitionLocation.createLocal(); } else { partitionLocation = ResultPartitionLocation.createRemote( new ConnectionID(partitionTaskManagerLocation, partitionConnectionIndex)); } return new InputChannelDeploymentDescriptor(partitionID, partitionLocation); }
final ConnectionID connectionId = new ConnectionID( partitionTaskManagerLocation, partition.getIntermediateResult().getConnectionIndex());
final ConnectionID connectionId = new ConnectionID( partitionTaskManagerLocation, partition.getIntermediateResult().getConnectionIndex());
final ConnectionID connectionId = new ConnectionID( partitionTaskManagerLocation, consumedPartition.getIntermediateResult().getConnectionIndex());
final ConnectionID connectionId = new ConnectionID( partitionTaskManagerLocation, consumedPartition.getIntermediateResult().getConnectionIndex());
final ConnectionID connectionId = new ConnectionID( partitionTaskManagerLocation, partition.getIntermediateResult().getConnectionIndex());
final ConnectionID connectionId = new ConnectionID( partitionTaskManagerLocation, consumedPartition.getIntermediateResult().getConnectionIndex());