Search in sources :

Example 1 with BLOCKING

use of org.apache.flink.runtime.io.network.partition.ResultPartitionType.BLOCKING in project flink by apache.

the class DefaultExecutionVertexTest method setUp.

@Before
public void setUp() throws Exception {
    intermediateResultPartitionId = new IntermediateResultPartitionID();
    DefaultResultPartition schedulingResultPartition = new DefaultResultPartition(intermediateResultPartitionId, new IntermediateDataSetID(), BLOCKING, () -> ResultPartitionState.CREATED, () -> {
        throw new UnsupportedOperationException();
    }, () -> {
        throw new UnsupportedOperationException();
    });
    producerVertex = new DefaultExecutionVertex(new ExecutionVertexID(new JobVertexID(), 0), Collections.singletonList(schedulingResultPartition), stateSupplier, Collections.emptyList(), partitionID -> {
        throw new UnsupportedOperationException();
    });
    schedulingResultPartition.setProducer(producerVertex);
    List<ConsumedPartitionGroup> consumedPartitionGroups = Collections.singletonList(ConsumedPartitionGroup.fromSinglePartition(intermediateResultPartitionId));
    Map<IntermediateResultPartitionID, DefaultResultPartition> resultPartitionById = Collections.singletonMap(intermediateResultPartitionId, schedulingResultPartition);
    consumerVertex = new DefaultExecutionVertex(new ExecutionVertexID(new JobVertexID(), 0), Collections.emptyList(), stateSupplier, consumedPartitionGroups, resultPartitionById::get);
}
Also used : IntermediateResultPartitionID(org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID) ExecutionState(org.apache.flink.runtime.execution.ExecutionState) Test(org.junit.Test) IterableUtils(org.apache.flink.util.IterableUtils) IntermediateDataSetID(org.apache.flink.runtime.jobgraph.IntermediateDataSetID) ExecutionVertexID(org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID) Supplier(java.util.function.Supplier) JobVertexID(org.apache.flink.runtime.jobgraph.JobVertexID) ResultPartitionState(org.apache.flink.runtime.scheduler.strategy.ResultPartitionState) SchedulingResultPartition(org.apache.flink.runtime.scheduler.strategy.SchedulingResultPartition) List(java.util.List) ConsumedPartitionGroup(org.apache.flink.runtime.scheduler.strategy.ConsumedPartitionGroup) BLOCKING(org.apache.flink.runtime.io.network.partition.ResultPartitionType.BLOCKING) Map(java.util.Map) TestLogger(org.apache.flink.util.TestLogger) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) Before(org.junit.Before) ConsumedPartitionGroup(org.apache.flink.runtime.scheduler.strategy.ConsumedPartitionGroup) ExecutionVertexID(org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID) JobVertexID(org.apache.flink.runtime.jobgraph.JobVertexID) IntermediateDataSetID(org.apache.flink.runtime.jobgraph.IntermediateDataSetID) IntermediateResultPartitionID(org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID) Before(org.junit.Before)

Aggregations

Collections (java.util.Collections)1 List (java.util.List)1 Map (java.util.Map)1 Supplier (java.util.function.Supplier)1 ExecutionState (org.apache.flink.runtime.execution.ExecutionState)1 BLOCKING (org.apache.flink.runtime.io.network.partition.ResultPartitionType.BLOCKING)1 IntermediateDataSetID (org.apache.flink.runtime.jobgraph.IntermediateDataSetID)1 IntermediateResultPartitionID (org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID)1 JobVertexID (org.apache.flink.runtime.jobgraph.JobVertexID)1 ConsumedPartitionGroup (org.apache.flink.runtime.scheduler.strategy.ConsumedPartitionGroup)1 ExecutionVertexID (org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID)1 ResultPartitionState (org.apache.flink.runtime.scheduler.strategy.ResultPartitionState)1 SchedulingResultPartition (org.apache.flink.runtime.scheduler.strategy.SchedulingResultPartition)1 IterableUtils (org.apache.flink.util.IterableUtils)1 TestLogger (org.apache.flink.util.TestLogger)1 Assert.assertEquals (org.junit.Assert.assertEquals)1 Before (org.junit.Before)1 Test (org.junit.Test)1