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 Plans 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, getEnumSet, 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, substituteCommonVariables, toString, unset, updateConnectAddr, updateConnectAddr, write, writeXml, writeXml, writeXml, writeXmlclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic 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)
ReservationSchedulerConfigurationAccessControlList of users for each
ReservationACL acl on thee specified queue.getReservationAcls in class ReservationSchedulerConfigurationqueue - 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)
ReservationSchedulerConfigurationisReservable in class ReservationSchedulerConfigurationqueue - name of the queuepublic long getReservationWindow(String queue)
ReservationSchedulerConfigurationSharingPolicy
checks for validitygetReservationWindow in class ReservationSchedulerConfigurationqueue - name of the queueSharingPolicypublic float getAverageCapacity(String queue)
ReservationSchedulerConfigurationReservationSchedulerConfiguration.getReservationWindow(java.lang.String) by the
the SharingPolicy to check aggregate used capacitygetAverageCapacity in class ReservationSchedulerConfigurationqueue - name of the queueSharingPolicypublic float getInstantaneousMaxCapacity(String queue)
ReservationSchedulerConfigurationSharingPolicy allowsgetInstantaneousMaxCapacity in class ReservationSchedulerConfigurationqueue - name of the queuepublic String getReservationAdmissionPolicy(String queue)
ReservationSchedulerConfigurationSharingPolicy class associated with the queuegetReservationAdmissionPolicy in class ReservationSchedulerConfigurationqueue - name of the queueSharingPolicypublic String getReservationAgent(String queue)
ReservationSchedulerConfigurationReservationAgent class associated with the
queuegetReservationAgent in class ReservationSchedulerConfigurationqueue - name of the queueReservationAgentpublic boolean getShowReservationAsQueues(String queue)
ReservationSchedulerConfigurationgetShowReservationAsQueues in class ReservationSchedulerConfigurationqueue - name of the queuepublic String getReplanner(String queue)
ReservationSchedulerConfigurationPlanner class associated with the
queuegetReplanner in class ReservationSchedulerConfigurationqueue - name of the queuePlannerpublic boolean getMoveOnExpiry(String queue)
ReservationSchedulerConfigurationReservationDefinition expiresgetMoveOnExpiry in class ReservationSchedulerConfigurationqueue - name of the queuepublic long getEnforcementWindow(String queue)
ReservationSchedulerConfigurationPlanner will verify
the Plans satisfy the constraintsgetEnforcementWindow in class ReservationSchedulerConfigurationqueue - name of the queue@VisibleForTesting public void setReservationWindow(long window)
@VisibleForTesting public void setAverageCapacity(int avgCapacity)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.