@InterfaceAudience.Private public class ActiveUsersManager extends Object
ActiveUsersManager
tracks active users in the system.
A user is deemed to be active if he has any running applications with
outstanding resource requests.
An active user is defined as someone with outstanding resource requests.Constructor and Description |
---|
ActiveUsersManager(QueueMetrics metrics) |
Modifier and Type | Method and Description |
---|---|
void |
activateApplication(String user,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
An application has new outstanding requests.
|
void |
clearActiveUsersChanged()
Clear active users changed indicator
|
void |
deactivateApplication(String user,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
An application has no more outstanding requests.
|
boolean |
getActiveUsersChanged()
Get indicator of whether or not the active users list has changed.
|
Set<String> |
getActiveUsersSet()
Get list of active users
|
int |
getNumActiveUsers()
Get number of active users i.e.
|
public ActiveUsersManager(QueueMetrics metrics)
@Lock(value={Queue.class,SchedulerApplicationAttempt.class}) public void activateApplication(String user, org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
user
- application userapplicationId
- activated application@Lock(value={Queue.class,SchedulerApplicationAttempt.class}) public void deactivateApplication(String user, org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
user
- application userapplicationId
- deactivated application@Lock(value={Queue.class,SchedulerApplicationAttempt.class}) public int getNumActiveUsers()
@Lock(value={Queue.class,SchedulerApplicationAttempt.class}) public Set<String> getActiveUsersSet()
@Lock(value={Queue.class,SchedulerApplicationAttempt.class}) public boolean getActiveUsersChanged()
@Lock(value={Queue.class,SchedulerApplicationAttempt.class}) public void clearActiveUsersChanged()
Copyright © 2017 Apache Software Foundation. All Rights Reserved.