HSAdminServer extends AbstractService implements HSAdminProtocol { @Override public void refreshJobRetentionSettings() throws IOException { UserGroupInformation user = checkAcls("refreshJobRetentionSettings"); try { loginUGI.doAs(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws IOException { jobHistoryService.refreshJobRetentionSettings(); return null; } }); } catch (InterruptedException e) { throw new IOException(e); } HSAuditLogger.logSuccess(user.getShortUserName(), "refreshJobRetentionSettings", HISTORY_ADMIN_SERVER); } HSAdminServer(AggregatedLogDeletionService aggLogDelService,
      JobHistory jobHistoryService); @Override void serviceInit(Configuration conf); @Override String[] getGroupsForUser(String user); @Override void refreshUserToGroupsMappings(); @Override void refreshSuperUserGroupsConfiguration(); @Override void refreshAdminAcls(); @Override void refreshLoadedJobCache(); @Override void refreshLogRetentionSettings(); @Override void refreshJobRetentionSettings();  }
@Test public void testRefreshJobRetentionSettings() throws Exception { String[] args = new String[1]; args[0] = "-refreshJobRetentionSettings"; hsAdminClient.run(args); verify(jobHistoryService).refreshJobRetentionSettings(); }