Package org.apache.flink.runtime.jobgraph

Examples of org.apache.flink.runtime.jobgraph.JobVertexID


  }
 
  @Test
  public void testCancelConcurrentlyToDeploying_CallsOvertaking() {
    try {
      final JobVertexID jid = new JobVertexID();
      final ActionQueue actions = new ActionQueue();
     
      final ExecutionJobVertex ejv = getJobVertexExecutingTriggered(jid, actions);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
View Full Code Here


  }
 
  @Test
  public void testCancelFromRunning() {
    try {
      final JobVertexID jid = new JobVertexID();
      final ExecutionJobVertex ejv = getJobVertexExecutingSynchronously(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
      final ExecutionAttemptID execId = vertex.getCurrentExecutionAttempt().getAttemptId();
View Full Code Here

  }
 
  @Test
  public void testRepeatedCancelFromRunning() {
    try {
      final JobVertexID jid = new JobVertexID();
      final ExecutionJobVertex ejv = getJobVertexExecutingSynchronously(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
      final ExecutionAttemptID execId = vertex.getCurrentExecutionAttempt().getAttemptId();
View Full Code Here

  @Test
  public void testCancelFromRunningDidNotFindTask() {
    // this may happen when the task finished or failed while the call was in progress
   
    try {
      final JobVertexID jid = new JobVertexID();
      final ExecutionJobVertex ejv = getJobVertexExecutingSynchronously(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
      final ExecutionAttemptID execId = vertex.getCurrentExecutionAttempt().getAttemptId();
View Full Code Here

 
  @Test
  public void testCancelCallFails() {
   
    try {
      final JobVertexID jid = new JobVertexID();
      final ExecutionJobVertex ejv = getJobVertexExecutingSynchronously(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
      final ExecutionAttemptID execId = vertex.getCurrentExecutionAttempt().getAttemptId();
View Full Code Here

 
  @Test
  public void testSendCancelAndReceiveFail() {
   
    try {
      final JobVertexID jid = new JobVertexID();
      final ExecutionJobVertex ejv = getJobVertexNotExecuting(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
      final ExecutionAttemptID execId = vertex.getCurrentExecutionAttempt().getAttemptId();
View Full Code Here

  // --------------------------------------------------------------------------------------------
 
  @Test
  public void testScheduleOrDeployAfterCancel() {
    try {
      final JobVertexID jid = new JobVertexID();
      final ExecutionJobVertex ejv = getJobVertexNotExecuting(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
      setVertexState(vertex, ExecutionState.CANCELED);
     
View Full Code Here

 
  @Test
  public void testActionsWhileCancelling() {
   
    try {
      final JobVertexID jid = new JobVertexID();
      final ExecutionJobVertex ejv = getJobVertexNotExecuting(jid);
     
      // scheduling while canceling is an illegal state transition
      try {
        ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
View Full Code Here

      Instance instance = SchedulerTestUtils.getRandomInstance(1);
     
      SharedSlot slot = new SharedSlot(instance.allocateSlot(new JobID()), assignment);
      assertFalse(slot.isDisposed());
     
      SubSlot ss1 = slot.allocateSubSlot(new JobVertexID());
      assertNotNull(ss1);
     
      // verify resources
      assertEquals(instance, ss1.getInstance());
      assertEquals(0, ss1.getSlotNumber());
      assertEquals(slot.getAllocatedSlot().getJobID(), ss1.getJobID());
     
      SubSlot ss2 = slot.allocateSubSlot(new JobVertexID());
      assertNotNull(ss2);
     
      assertEquals(2, slot.getNumberOfAllocatedSubSlots());
     
      // release first slot, should not trigger release
View Full Code Here

      Instance instance = SchedulerTestUtils.getRandomInstance(1);
     
      SharedSlot slot = new SharedSlot(instance.allocateSlot(new JobID()), assignment);
      assertFalse(slot.isDisposed());
     
      SubSlot ss1 = slot.allocateSubSlot(new JobVertexID());
      assertNotNull(ss1);
     
      // verify resources
      assertEquals(instance, ss1.getInstance());
      assertEquals(0, ss1.getSlotNumber());
      assertEquals(slot.getAllocatedSlot().getJobID(), ss1.getJobID());
     
      SubSlot ss2 = slot.allocateSubSlot(new JobVertexID());
      assertNotNull(ss2);
     
      assertEquals(2, slot.getNumberOfAllocatedSubSlots());
     
      // release first slot, should not trigger release
      ss1.releaseSlot();
      assertFalse(slot.isDisposed());
     
      ss2.releaseSlot();
      assertTrue(slot.isDisposed());
     
      // the shared slot should now dispose itself
      assertEquals(0, slot.getNumberOfAllocatedSubSlots());
     
      assertNull(slot.allocateSubSlot(new JobVertexID()));
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.jobgraph.JobVertexID

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.