private void refreshScheduler(String planName, ReservationDefinition contract, String reservationId) { if ((contract.getArrival() - clock.getTime()) < reservationSystem .getPlanFollowerTimeStep()) { LOG.debug(MessageFormat .format( "Reservation {0} is within threshold so attempting to create synchronously.", reservationId)); reservationSystem.synchronizePlan(planName, true); LOG.info(MessageFormat.format("Created reservation {0} synchronously.", reservationId)); } }
private void refreshScheduler(String planName, ReservationDefinition contract, String reservationId) { if ((contract.getArrival() - clock.getTime()) < reservationSystem .getPlanFollowerTimeStep()) { LOG.debug(MessageFormat .format( "Reservation {0} is within threshold so attempting to create synchronously.", reservationId)); reservationSystem.synchronizePlan(planName); LOG.info(MessageFormat.format("Created reservation {0} synchronously.", reservationId)); } }
private void refreshScheduler(String planName, ReservationDefinition contract, String reservationId) { if ((contract.getArrival() - clock.getTime()) < reservationSystem .getPlanFollowerTimeStep()) { LOG.debug(MessageFormat .format( "Reservation {0} is within threshold so attempting to create synchronously.", reservationId)); reservationSystem.synchronizePlan(planName); LOG.info(MessageFormat.format("Created reservation {0} synchronously.", reservationId)); } }
private void waitForReservationActivation(MockRM rm, ReservationId reservationId, String planName) { try { int attempts = 20; do { rm.getRMContext().getReservationSystem().synchronizePlan(planName, false); if (rm.getResourceScheduler() .getQueueInfo(reservationId.toString(), false, false) .getCapacity() > 0f) { break; } LOG.info("Waiting for reservation to be active"); Thread.sleep(100); } while (attempts-- > 0); if (attempts <= 0) { Assert .fail("Exceeded attempts in waiting for reservation to be active"); } } catch (Exception e) { Assert.fail(e.getMessage()); } }
private void addNodeCapacityToPlan(MockRM rm, int memory, int vCores) { try { rm.registerNode("127.0.0.1:1", memory, vCores); int attempts = 10; do { rm1.drainEvents(); rm.getRMContext().getReservationSystem() .synchronizePlan(ReservationSystemTestUtil.reservationQ, false); if (rm.getRMContext().getReservationSystem() .getPlan(ReservationSystemTestUtil.reservationQ).getTotalCapacity() .getMemorySize() > 0) { break; } LOG.info("Waiting for node capacity to be added to plan"); Thread.sleep(100); } while (attempts-- > 0); if (attempts <= 0) { Assert.fail("Exhausted attempts in checking if node capacity was " + "added to the plan"); } } catch (Exception e) { Assert.fail(e.getMessage()); } }
.synchronizePlan(ReservationSystemTestUtil.reservationQ, true); RMApp app1 = rm1.submitApp(200, "dynamicQApp", UserGroupInformation.getCurrentUser().getShortUserName(), null,