Examples of releaseSlot()


Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

      s3_1.releaseSlot();
      s4_1.releaseSlot();
     
      s5_2.releaseSlot();
      s6_2.releaseSlot();
      s7_2.releaseSlot();
     
      // test that everything is released
      assertEquals(0, scheduler.getNumberOfAvailableSlots());
     
      s1_3.releaseSlot();
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

      assertEquals(1, sharingGroup.getTaskAssignment().getNumberOfAvailableSlotsForJid(jid1));
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfAvailableSlotsForJid(jid2));
     
      // release the two from the second
      s2_1.releaseSlot();
      s2_2.releaseSlot();
     
     
      // this should free one slot so we can allocate one non-shared
      AllocatedSlot sx = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(jid3, 0, 1)));
      assertNotNull(sx);
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

     
      // release all shared and allocate all in non-shared
      s1_2.releaseSlot();
      s2_2.releaseSlot();
      s1_3.releaseSlot();
      s2_3.releaseSlot();
     
      AllocatedSlot sC0 = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(jidC, 1, 2)));
      AllocatedSlot sC1 = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(jidC, 0, 2)));
      assertNotNull(sC0);
      assertNotNull(sC1);
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

     
      sB0.releaseSlot();
      sB1.releaseSlot();
      sB2.releaseSlot();
      sC0.releaseSlot();
      sC1.releaseSlot();
     
      // test that everything is released
      assertEquals(5, scheduler.getNumberOfAvailableSlots());
     
      // check the scheduler's bookkeeping
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

      s3.releaseSlot();
      s4.releaseSlot();
      s7.releaseSlot();
      s10.releaseSlot();
      s11.releaseSlot();
      s12.releaseSlot();
      assertTrue(scheduler.getNumberOfAvailableSlots() >= 1);
     
      AllocatedSlot single = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(new JobVertexID(), 0, 1)));
      assertNotNull(single);
     
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

     
      Instance loc = s1.getInstance();
     
      s1.releaseSlot();
      s2.releaseSlot();
      sSolo.releaseSlot();
     
      AllocatedSlot sNew = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(jid3, 0, 1), sharingGroup, c1));
      assertEquals(loc, sNew.getInstance());
     
      assertEquals(2, scheduler.getNumberOfLocalizedAssignments());
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

     
      SlotSharingGroup sharingGroup = new SlotSharingGroup();
      CoLocationConstraint c1 = new CoLocationConstraint(new CoLocationGroup());
     
      AllocatedSlot s1 = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(jid1, 0, 1), sharingGroup, c1));
      s1.releaseSlot();
     
      scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(jid2, 0, 1)));
      scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(jid2, 1, 2)));
     
     
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

      s1.releaseSlot();
      s2.releaseSlot();
      s3.releaseSlot();
      s4.releaseSlot();
      s5.releaseSlot();
      s6.releaseSlot();
      assertEquals(2, scheduler.getNumberOfAvailableSlots());
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

      AllocatedSlot s1 = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertexWithLocation(jid1, 0, 2, i1), sharingGroup, cc1));
      AllocatedSlot s2 = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertexWithLocation(jid1, 1, 2, i2), sharingGroup, cc2));
     
      s1.releaseSlot();
      s2.releaseSlot();
     
      assertEquals(2, scheduler.getNumberOfAvailableSlots());
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfSlots());

      AllocatedSlot s3 = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertexWithLocation(jid2, 0, 2, i2), sharingGroup, cc1));
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot.releaseSlot()

      // still preserves the previous instance mapping)
      assertEquals(i1, s3.getInstance());
      assertEquals(i2, s4.getInstance());
     
      s3.releaseSlot();
      s4.releaseSlot();

      assertEquals(2, scheduler.getNumberOfAvailableSlots());
     
      assertEquals(4, scheduler.getNumberOfLocalizedAssignments());
      assertEquals(0, scheduler.getNumberOfNonLocalizedAssignments());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.