java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>>, org.apache.hadoop.io.Writablepublic 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 | Description |
|---|---|
AllocationConfiguration(QueueProperties queueProperties,
AllocationFileParser allocationFileParser,
ReservationQueueConfiguration globalReservationQueueConfig) |
Create a fully initialised configuration for the scheduler.
|
AllocationConfiguration(FairScheduler scheduler) |
Create a base scheduler configuration with just the defaults set.
|
| Modifier and Type | Method | Description |
|---|---|---|
float |
getAverageCapacity(java.lang.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 |
java.util.Map<FSQueueType,java.util.Set<java.lang.String>> |
getConfiguredQueues() |
|
java.lang.String |
getDefaultQueueLabel() |
|
SchedulingPolicy |
getDefaultSchedulingPolicy() |
|
long |
getEnforcementWindow(java.lang.String queue) |
Gets the time in milliseconds for which the
Planner will verify
the Plans satisfy the constraints |
float |
getFairSharePreemptionThreshold(java.lang.String queueName) |
Get a queue's fair share preemption threshold in the allocation file.
|
long |
getFairSharePreemptionTimeout(java.lang.String queueName) |
Get a queue's fair share preemption timeout configured in the allocation
file, in milliseconds.
|
float |
getInstantaneousMaxCapacity(java.lang.String queue) |
Gets the maximum capacity at any time that the
SharingPolicy allows |
java.util.Map<java.lang.String,java.lang.String> |
getLabels() |
|
long |
getMinSharePreemptionTimeout(java.lang.String queueName) |
Get a queue's min share preemption timeout configured in the allocation
file, in milliseconds.
|
boolean |
getMoveOnExpiry(java.lang.String queue) |
Gets whether the applications should be killed or moved to the parent queue
when the
ReservationDefinition expires |
java.util.Map<java.lang.String,java.util.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() |
|
java.lang.String |
getReplanner(java.lang.String queue) |
Gets the name of the
Planner class associated with the
queue |
java.util.Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> |
getReservationAcls(java.lang.String queue) |
Gets a map containing the
AccessControlList of users for each
ReservationACL acl on thee specified queue. |
java.lang.String |
getReservationAdmissionPolicy(java.lang.String queue) |
Gets the name of the
SharingPolicy class associated with the queue |
java.lang.String |
getReservationAgent(java.lang.String queue) |
Gets the name of the
ReservationAgent class associated with the
queue |
long |
getReservationWindow(java.lang.String queue) |
Gets the length of time in milliseconds for which the
SharingPolicy
checks for validity |
boolean |
getShowReservationAsQueues(java.lang.String queue) |
Checks whether the reservation queues be hidden or visible
|
java.util.Map<java.lang.String,java.lang.Integer> |
getUserMaxApps() |
|
int |
getUserMaxApps(java.lang.String user) |
|
int |
getUserMaxAppsDefault() |
|
void |
initFSQueue(FSQueue queue) |
Initialize a
FSQueue with queue-specific properties and its
metrics. |
boolean |
isPreemptable(java.lang.String queueName) |
|
boolean |
isReservable(java.lang.String queue) |
Checks if the queue participates in reservation based scheduling
|
void |
setAverageCapacity(int avgCapacity) |
|
void |
setReservationWindow(long window) |
addDefaultResource, addDefaultResource, addDeprecation, addDeprecation, addDeprecation, addDeprecation, addDeprecations, addResource, addResource, 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, writeXmlpublic 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 java.util.Map<java.lang.String,java.util.Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList>> getQueueAcls()
public java.util.Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> getReservationAcls(java.lang.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(java.lang.String queueName)
queueName - queue name.public long getFairSharePreemptionTimeout(java.lang.String queueName)
queueName - queue Name.public float getFairSharePreemptionThreshold(java.lang.String queueName)
queueName - queue Name.public boolean isPreemptable(java.lang.String queueName)
public int getUserMaxApps(java.lang.String user)
public java.util.Map<java.lang.String,java.lang.Integer> getUserMaxApps()
public int getQueueMaxAppsDefault()
public int getUserMaxAppsDefault()
public float getQueueMaxAMShareDefault()
public SchedulingPolicy getDefaultSchedulingPolicy()
public java.util.Map<FSQueueType,java.util.Set<java.lang.String>> getConfiguredQueues()
public boolean isReservable(java.lang.String queue)
ReservationSchedulerConfigurationisReservable in class ReservationSchedulerConfigurationqueue - name of the queuepublic long getReservationWindow(java.lang.String queue)
ReservationSchedulerConfigurationSharingPolicy
checks for validitygetReservationWindow in class ReservationSchedulerConfigurationqueue - name of the queueSharingPolicypublic float getAverageCapacity(java.lang.String queue)
ReservationSchedulerConfigurationReservationSchedulerConfiguration.getReservationWindow(java.lang.String) by the
the SharingPolicy to check aggregate used capacitygetAverageCapacity in class ReservationSchedulerConfigurationqueue - name of the queueSharingPolicypublic java.util.Map<java.lang.String,java.lang.String> getLabels()
public java.lang.String getDefaultQueueLabel()
public float getInstantaneousMaxCapacity(java.lang.String queue)
ReservationSchedulerConfigurationSharingPolicy allowsgetInstantaneousMaxCapacity in class ReservationSchedulerConfigurationqueue - name of the queuepublic java.lang.String getReservationAdmissionPolicy(java.lang.String queue)
ReservationSchedulerConfigurationSharingPolicy class associated with the queuegetReservationAdmissionPolicy in class ReservationSchedulerConfigurationqueue - name of the queueSharingPolicypublic java.lang.String getReservationAgent(java.lang.String queue)
ReservationSchedulerConfigurationReservationAgent class associated with the
queuegetReservationAgent in class ReservationSchedulerConfigurationqueue - name of the queueReservationAgentpublic boolean getShowReservationAsQueues(java.lang.String queue)
ReservationSchedulerConfigurationgetShowReservationAsQueues in class ReservationSchedulerConfigurationqueue - name of the queuepublic java.lang.String getReplanner(java.lang.String queue)
ReservationSchedulerConfigurationPlanner class associated with the
queuegetReplanner in class ReservationSchedulerConfigurationqueue - name of the queuePlannerpublic boolean getMoveOnExpiry(java.lang.String queue)
ReservationSchedulerConfigurationReservationDefinition expiresgetMoveOnExpiry in class ReservationSchedulerConfigurationqueue - name of the queuepublic long getEnforcementWindow(java.lang.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–2025 Apache Software Foundation. All rights reserved.