if (user.getTotalApplications() >= getMaxApplicationsPerUser()) { String msg = "Queue " + getQueuePath() + " already has " + user .getTotalApplications() + " applications from user " + userName
doReturn(25).when(queue).getMaxApplicationsPerUser();
doReturn(25).when(queue).getMaxApplicationsPerUser();
if (user.getTotalApplications() >= getMaxApplicationsPerUser()) { String msg = "Queue " + getQueuePath() + " already has " + user.getTotalApplications() +
if (user.getTotalApplications() >= getMaxApplicationsPerUser()) { String msg = "Queue " + getQueuePath() + " already has " + user.getTotalApplications() +
CapacitySchedulerLeafQueueInfo(final LeafQueue q, final String nodeLabel) { super(q, nodeLabel); numActiveApplications = q.getNumActiveApplications(); numPendingApplications = q.getNumPendingApplications(); numContainers = q.getNumContainers(); maxApplications = q.getMaxApplications(); maxApplicationsPerUser = q.getMaxApplicationsPerUser(); userLimit = q.getUserLimit(); users = new UsersInfo(q.getUsers()); userLimitFactor = q.getUserLimitFactor(); AMResourceLimit = new ResourceInfo(q.getAMResourceLimit()); usedAMResource = new ResourceInfo(q.getQueueResourceUsage().getAMUsed()); userAMResourceLimit = new ResourceInfo(q.getUserAMResourceLimit()); preemptionDisabled = q.getPreemptionDisabled(); }
CapacitySchedulerLeafQueueInfo(final LeafQueue q, final String nodeLabel) { super(q, nodeLabel); numActiveApplications = q.getNumActiveApplications(); numPendingApplications = q.getNumPendingApplications(); numContainers = q.getNumContainers(); maxApplications = q.getMaxApplications(); maxApplicationsPerUser = q.getMaxApplicationsPerUser(); userLimit = q.getUserLimit(); users = new UsersInfo(q.getUsers()); userLimitFactor = q.getUserLimitFactor(); AMResourceLimit = new ResourceInfo(q.getAMResourceLimit()); usedAMResource = new ResourceInfo(q.getQueueResourceUsage().getAMUsed()); userAMResourceLimit = new ResourceInfo(q.getUserAMResourceLimit()); preemptionDisabled = q.getPreemptionDisabled(); }
numContainers = q.getNumContainers(); maxApplications = q.getMaxApplications(); maxApplicationsPerUser = q.getMaxApplicationsPerUser(); userLimit = q.getUserLimit(); users = new UsersInfo(q.getUsersManager().getUsersInfo());
(int)(expectedMaxApps * (queue.getUserLimit()/100.0f) * queue.getUserLimitFactor())); assertEquals(expectedMaxAppsPerUser, queue.getMaxApplicationsPerUser()); assertEquals(expectedMaxAppsPerUser, queue.getMaxApplicationsPerUser());
(int)(expectedMaxApps * (queue.getUserLimit()/100.0f) * queue.getUserLimitFactor())); assertEquals(expectedMaxAppsPerUser, queue.getMaxApplicationsPerUser()); assertEquals(expectedMaxAppsPerUser, queue.getMaxApplicationsPerUser());
assertEquals(2, leafQueue.getMaxApplicationsPerUser());