Examples of releaseSlot()


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

     
      s1.releaseSlot();
      s2.releaseSlot();
      s5.releaseSlot();
      s6.releaseSlot();
      s7.releaseSlot();
     
      assertEquals(5, scheduler.getNumberOfAvailableSlots());
     
      // check that slots that are released twice (accidentally) do not mess things up
     
View Full Code Here

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

     
      s1.releaseSlot();
      s2.releaseSlot();
      s5.releaseSlot();
      s6.releaseSlot();
      s7.releaseSlot();
     
      assertEquals(5, scheduler.getNumberOfAvailableSlots());
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

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

               
                Iterator<AllocatedSlot> iter = toRelease.iterator();
                AllocatedSlot next = iter.next();
                iter.remove();
               
                next.releaseSlot();
                recycled++;
              }
            }
          }
          catch (Throwable t) {
View Full Code Here

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

      AllocatedSlot s6 = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(Arrays.asList(first, third))));
      assertEquals(second, s6.getInstance());
     
      // release something on the first and second instance
      s2.releaseSlot();
      s6.releaseSlot();
     
      AllocatedSlot s7 = scheduler.scheduleImmediately(new ScheduledUnit(getTestVertex(Arrays.asList(first, third))));
      assertEquals(first, s7.getInstance());
     
      assertEquals(1, scheduler.getNumberOfUnconstrainedAssignments());
View Full Code Here

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

              toUse = assignment.addNewSlotWithTask(newSlot, vertex, constraint);
            }
          }
          else {
            // both are available and usable. neither is local
            newSlot.releaseSlot();
            toUse = slotFromGroup;
          }
         
          // assign to the co-location hint, if we have one and it is unassigned
          // if it was assigned before and the new one is not local, it is a fail
View Full Code Here

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

        catch (Throwable t) {
          if (slotFromGroup != null) {
            slotFromGroup.releaseSlot();
          }
          if (newSlot != null) {
            newSlot.releaseSlot();
          }
         
          ExceptionUtils.rethrow(t, "An error occurred while allocating a slot in a sharing group");
        }
      }
View Full Code Here

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

     
      // release all
      s5.releaseSlot();
      s6.releaseSlot();
      s7.releaseSlot();
      s8.releaseSlot();
     
      // test that everything is released
      assertEquals(4, scheduler.getNumberOfAvailableSlots());

      // check the scheduler's bookkeeping
View Full Code Here

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

      s5.releaseSlot();
     
      s1_2.releaseSlot();
      s3_2.releaseSlot();
      s4_2.releaseSlot();
      s5_2.releaseSlot();
     
      // test that everything is released
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfSlots());
      assertEquals(4, scheduler.getNumberOfAvailableSlots());
     
View Full Code Here

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

      assertEquals(4, sharingGroup.getTaskAssignment().getNumberOfAvailableSlotsForJid(jid2));
     
      s1.releaseSlot();
      s2.releaseSlot();
      s3.releaseSlot();
      s4.releaseSlot();
     
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfSlots());
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfAvailableSlotsForJid(jid1));
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfAvailableSlotsForJid(jid2));
     
View Full Code Here

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

      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfAvailableSlotsForJid(jid2));
     
      s1_2.releaseSlot();
      s2_2.releaseSlot();
      s3_2.releaseSlot();
      s4_2.releaseSlot();
     
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfSlots());
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfAvailableSlotsForJid(jid1));
      assertEquals(0, sharingGroup.getTaskAssignment().getNumberOfAvailableSlotsForJid(jid2));
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.