private void refreshQueues() throws IOException, YarnException { rmContext.getScheduler().reinitialize(getConfig(), this.rmContext); // refresh the reservation system ReservationSystem rSystem = rmContext.getReservationSystem(); if (rSystem != null) { rSystem.reinitialize(getConfig(), rmContext); } }
@Override public RefreshQueuesResponse refreshQueues(RefreshQueuesRequest request) throws YarnException, StandbyException { String argName = "refreshQueues"; final String msg = "refresh queues."; UserGroupInformation user = checkAcls(argName); checkRMStatus(user.getShortUserName(), argName, msg); RefreshQueuesResponse response = recordFactory.newRecordInstance(RefreshQueuesResponse.class); try { rmContext.getScheduler().reinitialize(getConfig(), this.rmContext); // refresh the reservation system ReservationSystem rSystem = rmContext.getReservationSystem(); if (rSystem != null) { rSystem.reinitialize(getConfig(), rmContext); } RMAuditLogger.logSuccess(user.getShortUserName(), argName, "AdminService"); return response; } catch (IOException ioe) { throw logAndWrapException(ioe, user.getShortUserName(), argName, msg); } }
@Private public void refreshQueues() throws IOException, YarnException { Configuration conf = loadNewConfiguration(); rm.getRMContext().getScheduler().reinitialize(conf, this.rm.getRMContext()); // refresh the reservation system ReservationSystem rSystem = rm.getRMContext().getReservationSystem(); if (rSystem != null) { rSystem.reinitialize(conf, rm.getRMContext()); } }