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(FairScheduler scheduler)
Create a base scheduler configuration with just the defaults set.
|
AllocationConfiguration(QueueProperties queueProperties,
AllocationFileParser allocationFileParser,
ReservationQueueConfiguration globalReservationQueueConfig)
Create a fully initialised configuration for the scheduler.
|
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 |
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 |
Map<String,Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList>> |
getQueueAcls()
Get the map of ACLs of all queues.
|
float |
getQueueMaxAMShareDefault() |
int |
getQueueMaxAppsDefault() |
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 |
boolean |
getShowReservationAsQueues(String queue)
Checks whether the reservation queues be hidden or visible
|
Map<String,Integer> |
getUserMaxApps() |
int |
getUserMaxApps(String user) |
int |
getUserMaxAppsDefault() |
void |
initFSQueue(FSQueue queue)
Initialize a
FSQueue with queue-specific properties and its
metrics. |
boolean |
isPreemptable(String queueName) |
boolean |
isReservable(String queue)
Checks if the queue participates in reservation based scheduling
|
void |
setAverageCapacity(int avgCapacity) |
void |
setReservationWindow(long window) |
addDefaultResource, addDeprecation, addDeprecation, addDeprecation, addDeprecation, addDeprecations, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addTags, clear, dumpConfiguration, dumpConfiguration, dumpDeprecatedKeys, get, get, getAllPropertiesByTag, getAllPropertiesByTags, 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, getStorageSize, getStorageSize, getStringCollection, getStrings, getStrings, getTimeDuration, getTimeDuration, getTimeDuration, getTimeDuration, getTimeDurationHelper, getTimeDurations, getTrimmed, getTrimmed, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getValByRegex, hasWarnedDeprecation, isDeprecated, isPropertyTag, iterator, main, onlyKeyExists, readFields, reloadConfiguration, reloadExistingConfigurations, set, set, setAllowNullValueProperties, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setDeprecatedProperties, setDouble, setEnum, setFloat, setIfUnset, setInt, setLong, setPattern, setQuietMode, setRestrictSystemProperties, setRestrictSystemPropertiesDefault, setRestrictSystemProps, setSocketAddr, setStorageSize, setStrings, setTimeDuration, size, toString, unset, updateConnectAddr, updateConnectAddr, write, writeXml, writeXml, writeXml
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public AllocationConfiguration(QueueProperties queueProperties, AllocationFileParser allocationFileParser, ReservationQueueConfiguration globalReservationQueueConfig) throws AllocationConfigurationException
queueProperties
- The list of queues and their properties from the
configuration.allocationFileParser
- The allocation file parserglobalReservationQueueConfig
- The reservation queue configAllocationConfigurationException
- for any errors.public AllocationConfiguration(FairScheduler scheduler)
scheduler
- The FairScheduler
to create and initialise the
placement policy.public Map<String,Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList>> getQueueAcls()
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)
queueName
- queue name.public long getFairSharePreemptionTimeout(String queueName)
queueName
- queue Name.public float getFairSharePreemptionThreshold(String queueName)
queueName
- queue Name.public boolean isPreemptable(String queueName)
public int getUserMaxApps(String user)
public int getQueueMaxAppsDefault()
public int getUserMaxAppsDefault()
public float getQueueMaxAMShareDefault()
public SchedulingPolicy getDefaultSchedulingPolicy()
public Map<FSQueueType,Set<String>> getConfiguredQueues()
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 © 2008–2023 Apache Software Foundation. All rights reserved.