Java Code Examples for org.apache.flink.runtime.io.network.partition.ResultPartitionID#getPartitionId()

The following examples show how to use org.apache.flink.runtime.io.network.partition.ResultPartitionID#getPartitionId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExecutionGraph.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
/**
 * Schedule or updates consumers of the given result partition.
 *
 * @param partitionId specifying the result partition whose consumer shall be scheduled or updated
 * @throws ExecutionGraphException if the schedule or update consumers operation could not be executed
 */
public void scheduleOrUpdateConsumers(ResultPartitionID partitionId) throws ExecutionGraphException {

	assertRunningInJobMasterMainThread();

	final Execution execution = currentExecutions.get(partitionId.getProducerId());

	if (execution == null) {
		throw new ExecutionGraphException("Cannot find execution for execution Id " +
			partitionId.getPartitionId() + '.');
	}
	else if (execution.getVertex() == null){
		throw new ExecutionGraphException("Execution with execution Id " +
			partitionId.getPartitionId() + " has no vertex assigned.");
	} else {
		execution.getVertex().scheduleOrUpdateConsumers(partitionId);
	}
}
 
Example 2
Source File: ExecutionGraph.java    From flink with Apache License 2.0 6 votes vote down vote up
/**
 * Schedule or updates consumers of the given result partition.
 *
 * @param partitionId specifying the result partition whose consumer shall be scheduled or updated
 * @throws ExecutionGraphException if the schedule or update consumers operation could not be executed
 */
public void scheduleOrUpdateConsumers(ResultPartitionID partitionId) throws ExecutionGraphException {

	assertRunningInJobMasterMainThread();

	final Execution execution = currentExecutions.get(partitionId.getProducerId());

	if (execution == null) {
		throw new ExecutionGraphException("Cannot find execution for execution Id " +
			partitionId.getPartitionId() + '.');
	}
	else if (execution.getVertex() == null){
		throw new ExecutionGraphException("Execution with execution Id " +
			partitionId.getPartitionId() + " has no vertex assigned.");
	} else {
		execution.getVertex().scheduleOrUpdateConsumers(partitionId);
	}
}
 
Example 3
Source File: ShuffleDescriptorTest.java    From flink with Apache License 2.0 6 votes vote down vote up
private static ResultPartitionDeploymentDescriptor createResultPartitionDeploymentDescriptor(
		ResultPartitionID id,
		ResourceID location) throws ExecutionException, InterruptedException {
	ProducerDescriptor producerDescriptor = new ProducerDescriptor(
		location,
		id.getProducerId(),
		STUB_CONNECTION_ID.getAddress().getAddress(),
		STUB_CONNECTION_ID.getAddress().getPort());
	PartitionDescriptor partitionDescriptor = new PartitionDescriptor(
		new IntermediateDataSetID(),
		id.getPartitionId(),
		ResultPartitionType.PIPELINED,
		1,
		0);
	ShuffleDescriptor shuffleDescriptor =
		NettyShuffleMaster.INSTANCE.registerPartitionWithProducer(
			partitionDescriptor,
			producerDescriptor).get();
	return new ResultPartitionDeploymentDescriptor(
		partitionDescriptor,
		shuffleDescriptor,
		1,
		true);
}
 
Example 4
Source File: ExecutionGraph.java    From flink with Apache License 2.0 6 votes vote down vote up
/**
 * Schedule or updates consumers of the given result partition.
 *
 * @param partitionId specifying the result partition whose consumer shall be scheduled or updated
 * @throws ExecutionGraphException if the schedule or update consumers operation could not be executed
 */
public void scheduleOrUpdateConsumers(ResultPartitionID partitionId) throws ExecutionGraphException {

	assertRunningInJobMasterMainThread();

	final Execution execution = currentExecutions.get(partitionId.getProducerId());

	if (execution == null) {
		throw new ExecutionGraphException("Cannot find execution for execution Id " +
			partitionId.getPartitionId() + '.');
	}
	else if (execution.getVertex() == null){
		throw new ExecutionGraphException("Execution with execution Id " +
			partitionId.getPartitionId() + " has no vertex assigned.");
	} else {
		execution.getVertex().scheduleOrUpdateConsumers(partitionId);
	}
}