use of org.apache.flink.runtime.jobmaster.TestingLogicalSlotBuilder in project flink by splunk.
the class RootExceptionHistoryEntryTest method extractExecutionVertex.
private ExecutionVertex extractExecutionVertex(int pos) {
final ExecutionVertex executionVertex = Iterables.get(executionGraph.getAllExecutionVertices(), pos);
executionVertex.tryAssignResource(new TestingLogicalSlotBuilder().createTestingLogicalSlot());
return executionVertex;
}
use of org.apache.flink.runtime.jobmaster.TestingLogicalSlotBuilder in project flink by splunk.
the class PartitionReleaseInBatchJobBenchmark method setup.
public void setup(JobConfiguration jobConfiguration) throws Exception {
super.setup();
final List<JobVertex> jobVertices = createDefaultJobVertices(jobConfiguration);
executionGraph = createAndInitExecutionGraph(jobVertices, jobConfiguration, scheduledExecutorService);
final JobVertex source = jobVertices.get(0);
sink = jobVertices.get(1);
final TestingLogicalSlotBuilder slotBuilder = new TestingLogicalSlotBuilder();
deployTasks(executionGraph, source.getID(), slotBuilder, true);
transitionTaskStatus(executionGraph, source.getID(), ExecutionState.FINISHED);
deployTasks(executionGraph, sink.getID(), slotBuilder, true);
}
use of org.apache.flink.runtime.jobmaster.TestingLogicalSlotBuilder in project flink by splunk.
the class SharedSlotTest method testReturnLogicalSlotRejectsUnknownSlot.
@Test(expected = IllegalStateException.class)
public void testReturnLogicalSlotRejectsUnknownSlot() {
final TestingPhysicalSlot physicalSlot = TestingPhysicalSlot.builder().build();
final SharedSlot sharedSlot = new SharedSlot(new SlotRequestId(), physicalSlot, false, () -> {
});
final LogicalSlot logicalSlot = new TestingLogicalSlotBuilder().createTestingLogicalSlot();
logicalSlot.releaseSlot(new Exception("test"));
sharedSlot.returnLogicalSlot(logicalSlot);
}
Aggregations