public class AllocationConfiguration extends ReservationSchedulerConfiguration
DEFAULT_CAPACITY_OVER_TIME_MULTIPLIER, DEFAULT_RESERVATION_ADMISSION_POLICY, DEFAULT_RESERVATION_AGENT_NAME, DEFAULT_RESERVATION_ENFORCEMENT_WINDOW, DEFAULT_RESERVATION_MOVE_ON_EXPIRY, DEFAULT_RESERVATION_PLANNER_NAME, DEFAULT_RESERVATION_WINDOW, DEFAULT_SHOW_RESERVATIONS_AS_QUEUES
Constructor and Description |
---|
AllocationConfiguration(org.apache.hadoop.conf.Configuration conf) |
AllocationConfiguration(Map<String,org.apache.hadoop.yarn.api.records.Resource> minQueueResources,
Map<String,org.apache.hadoop.yarn.api.records.Resource> maxQueueResources,
Map<String,Integer> queueMaxApps,
Map<String,Integer> userMaxApps,
Map<String,ResourceWeights> queueWeights,
Map<String,Float> queueMaxAMShares,
int userMaxAppsDefault,
int queueMaxAppsDefault,
org.apache.hadoop.yarn.api.records.Resource queueMaxResourcesDefault,
float queueMaxAMShareDefault,
Map<String,SchedulingPolicy> schedulingPolicies,
SchedulingPolicy defaultSchedulingPolicy,
Map<String,Long> minSharePreemptionTimeouts,
Map<String,Long> fairSharePreemptionTimeouts,
Map<String,Float> fairSharePreemptionThresholds,
Map<String,Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList>> queueAcls,
Map<String,Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList>> resAcls,
QueuePlacementPolicy placementPolicy,
Map<FSQueueType,Set<String>> configuredQueues,
ReservationQueueConfiguration globalReservationQueueConfig,
Set<String> reservableQueues) |
Modifier and Type | Method and Description |
---|---|
float |
getAverageCapacity(String queue)
Gets the average allowed capacity which will aggregated over the
ReservationSchedulerConfiguration.getReservationWindow(java.lang.String) by the
the SharingPolicy to check aggregate used capacity |
Map<FSQueueType,Set<String>> |
getConfiguredQueues() |
SchedulingPolicy |
getDefaultSchedulingPolicy() |
long |
getEnforcementWindow(String queue)
Gets the time in milliseconds for which the
Planner will verify
the Plan s satisfy the constraints |
float |
getFairSharePreemptionThreshold(String queueName)
Get a queue's fair share preemption threshold in the allocation file.
|
long |
getFairSharePreemptionTimeout(String queueName)
Get a queue's fair share preemption timeout configured in the allocation
file, in milliseconds.
|
float |
getInstantaneousMaxCapacity(String queue)
Gets the maximum capacity at any time that the
SharingPolicy allows |
org.apache.hadoop.yarn.api.records.Resource |
getMaxResources(String queueName)
Get the maximum resource allocation for the given queue.
|
org.apache.hadoop.yarn.api.records.Resource |
getMinResources(String queue)
Get the minimum resource allocation for the given queue.
|
long |
getMinSharePreemptionTimeout(String queueName)
Get a queue's min share preemption timeout configured in the allocation
file, in milliseconds.
|
boolean |
getMoveOnExpiry(String queue)
Gets whether the applications should be killed or moved to the parent queue
when the
ReservationDefinition expires |
QueuePlacementPolicy |
getPlacementPolicy() |
org.apache.hadoop.security.authorize.AccessControlList |
getQueueAcl(String queue,
org.apache.hadoop.yarn.api.records.QueueACL operation)
Get the ACLs associated with this queue.
|
float |
getQueueMaxAMShare(String queue) |
int |
getQueueMaxApps(String queue) |
ResourceWeights |
getQueueWeight(String queue) |
String |
getReplanner(String queue)
Gets the name of the
Planner class associated with the
queue |
Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> |
getReservationAcls(String queue)
Gets a map containing the
AccessControlList of users for each
ReservationACL acl on thee specified queue. |
String |
getReservationAdmissionPolicy(String queue)
Gets the name of the
SharingPolicy class associated with the queue |
String |
getReservationAgent(String queue)
Gets the name of the
ReservationAgent class associated with the
queue |
long |
getReservationWindow(String queue)
Gets the length of time in milliseconds for which the
SharingPolicy
checks for validity |
SchedulingPolicy |
getSchedulingPolicy(String queueName) |
boolean |
getShowReservationAsQueues(String queue)
Checks whether the reservation queues be hidden or visible
|
int |
getUserMaxApps(String user) |
boolean |
hasAccess(String queueName,
org.apache.hadoop.yarn.api.records.QueueACL acl,
org.apache.hadoop.security.UserGroupInformation user) |
boolean |
isReservable(String queue)
Checks if the queue participates in reservation based scheduling
|
void |
setAverageCapacity(int avgCapacity) |
void |
setQueueWeight(String queue,
ResourceWeights weight) |
void |
setReservationWindow(long window) |
addDefaultResource, addDeprecation, addDeprecation, addDeprecation, addDeprecation, addDeprecations, addResource, addResource, addResource, addResource, addResource, addResource, clear, dumpConfiguration, dumpDeprecatedKeys, get, get, getBoolean, getClass, getClass, getClassByName, getClassByNameOrNull, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getDouble, getEnum, getFile, getFinalParameters, getFloat, getInstances, getInt, getInts, getLocalPath, getLong, getLongBytes, getPassword, getPasswordFromConfig, getPasswordFromCredentialProviders, getPattern, getPropertySources, getProps, getPropsWithPrefix, getRange, getRaw, getResource, getSocketAddr, getSocketAddr, getStringCollection, getStrings, getStrings, getTimeDuration, getTimeDurations, getTrimmed, getTrimmed, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getValByRegex, hasWarnedDeprecation, isDeprecated, iterator, main, onlyKeyExists, readFields, reloadConfiguration, reloadExistingConfigurations, set, set, setAllowNullValueProperties, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setDeprecatedProperties, setDouble, setEnum, setFloat, setIfUnset, setInt, setLong, setPattern, setQuietMode, setSocketAddr, setStrings, setTimeDuration, size, toString, unset, updateConnectAddr, updateConnectAddr, write, writeXml, writeXml
public AllocationConfiguration(Map<String,org.apache.hadoop.yarn.api.records.Resource> minQueueResources, Map<String,org.apache.hadoop.yarn.api.records.Resource> maxQueueResources, Map<String,Integer> queueMaxApps, Map<String,Integer> userMaxApps, Map<String,ResourceWeights> queueWeights, Map<String,Float> queueMaxAMShares, int userMaxAppsDefault, int queueMaxAppsDefault, org.apache.hadoop.yarn.api.records.Resource queueMaxResourcesDefault, float queueMaxAMShareDefault, Map<String,SchedulingPolicy> schedulingPolicies, SchedulingPolicy defaultSchedulingPolicy, Map<String,Long> minSharePreemptionTimeouts, Map<String,Long> fairSharePreemptionTimeouts, Map<String,Float> fairSharePreemptionThresholds, Map<String,Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList>> queueAcls, Map<String,Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList>> resAcls, QueuePlacementPolicy placementPolicy, Map<FSQueueType,Set<String>> configuredQueues, ReservationQueueConfiguration globalReservationQueueConfig, Set<String> reservableQueues)
public AllocationConfiguration(org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.security.authorize.AccessControlList getQueueAcl(String queue, org.apache.hadoop.yarn.api.records.QueueACL operation)
public Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> getReservationAcls(String queue)
ReservationSchedulerConfiguration
AccessControlList
of users for each
ReservationACL
acl on thee specified queue.getReservationAcls
in class ReservationSchedulerConfiguration
queue
- the queue with which to check a user's permissions.ReservationACL
to AccessControlList
which contains a list of users that have the specified permission level.public long getMinSharePreemptionTimeout(String queueName)
public long getFairSharePreemptionTimeout(String queueName)
public float getFairSharePreemptionThreshold(String queueName)
public ResourceWeights getQueueWeight(String queue)
public void setQueueWeight(String queue, ResourceWeights weight)
public int getUserMaxApps(String user)
public int getQueueMaxApps(String queue)
public float getQueueMaxAMShare(String queue)
public org.apache.hadoop.yarn.api.records.Resource getMinResources(String queue)
public org.apache.hadoop.yarn.api.records.Resource getMaxResources(String queueName)
public boolean hasAccess(String queueName, org.apache.hadoop.yarn.api.records.QueueACL acl, org.apache.hadoop.security.UserGroupInformation user)
public SchedulingPolicy getSchedulingPolicy(String queueName)
public SchedulingPolicy getDefaultSchedulingPolicy()
public Map<FSQueueType,Set<String>> getConfiguredQueues()
public QueuePlacementPolicy getPlacementPolicy()
public boolean isReservable(String queue)
ReservationSchedulerConfiguration
isReservable
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic long getReservationWindow(String queue)
ReservationSchedulerConfiguration
SharingPolicy
checks for validitygetReservationWindow
in class ReservationSchedulerConfiguration
queue
- name of the queueSharingPolicy
public float getAverageCapacity(String queue)
ReservationSchedulerConfiguration
ReservationSchedulerConfiguration.getReservationWindow(java.lang.String)
by the
the SharingPolicy
to check aggregate used capacitygetAverageCapacity
in class ReservationSchedulerConfiguration
queue
- name of the queueSharingPolicy
public float getInstantaneousMaxCapacity(String queue)
ReservationSchedulerConfiguration
SharingPolicy
allowsgetInstantaneousMaxCapacity
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic String getReservationAdmissionPolicy(String queue)
ReservationSchedulerConfiguration
SharingPolicy
class associated with the queuegetReservationAdmissionPolicy
in class ReservationSchedulerConfiguration
queue
- name of the queueSharingPolicy
public String getReservationAgent(String queue)
ReservationSchedulerConfiguration
ReservationAgent
class associated with the
queuegetReservationAgent
in class ReservationSchedulerConfiguration
queue
- name of the queueReservationAgent
public boolean getShowReservationAsQueues(String queue)
ReservationSchedulerConfiguration
getShowReservationAsQueues
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic String getReplanner(String queue)
ReservationSchedulerConfiguration
Planner
class associated with the
queuegetReplanner
in class ReservationSchedulerConfiguration
queue
- name of the queuePlanner
public boolean getMoveOnExpiry(String queue)
ReservationSchedulerConfiguration
ReservationDefinition
expiresgetMoveOnExpiry
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic long getEnforcementWindow(String queue)
ReservationSchedulerConfiguration
Planner
will verify
the Plan
s satisfy the constraintsgetEnforcementWindow
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic void setReservationWindow(long window)
public void setAverageCapacity(int avgCapacity)
Copyright © 2017 Apache Software Foundation. All Rights Reserved.