YARN-11394. Fix hadoop-yarn-server-resourcemanager module Java Doc Errors. (#5288)

Contributed by Shilun Fan
This commit is contained in:
slfan1989 2023-02-21 22:39:32 +08:00 committed by GitHub
parent acf82d4d55
commit 4e6e2f318c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
82 changed files with 545 additions and 167 deletions

View File

@ -618,12 +618,12 @@ public class NodesListManager extends CompositeService implements
}
/**
* Refresh the nodes gracefully
* Refresh the nodes gracefully.
*
* @param yarnConf
* @param yarnConf yarn configuration.
* @param timeout decommission timeout, null means default timeout.
* @throws IOException
* @throws YarnException
* @throws IOException io error occur.
* @throws YarnException exceptions from yarn servers.
*/
public void refreshNodesGracefully(Configuration yarnConf, Integer timeout)
throws IOException, YarnException {
@ -685,6 +685,9 @@ public class NodesListManager extends CompositeService implements
/**
* A NodeId instance needed upon startup for populating inactive nodes Map.
* It only knows the hostname/ip and marks the port to -1 or invalid.
*
* @param host host name.
* @return node id.
*/
public static NodeId createUnknownNodeId(String host) {
return NodeId.newInstance(host, -1);

View File

@ -489,6 +489,7 @@ public class RMAuditLogger {
* @param description Some additional information as to why the operation
* failed.
* @param appId ApplicationId in which operation was performed.
* @param attemptId Application Attempt Id in which operation was performed.
*
* <br><br>
* Note that the {@link RMAuditLogger} uses tabs ('\t') as a key-val delimiter

View File

@ -44,7 +44,8 @@ public class RMSecretManagerService extends AbstractService {
/**
* Construct the service.
*
* @param conf Configuration.
* @param rmContext RMContext.
*/
public RMSecretManagerService(Configuration conf, RMContextImpl rmContext) {
super(RMSecretManagerService.class.getName());

View File

@ -241,7 +241,15 @@ public class RMServerUtils {
/**
* Utility method to validate a list resource requests, by ensuring that the
* requested memory/vcore is non-negative and not greater than max
* requested memory/vcore is non-negative and not greater than max.
*
* @param ask resource request.
* @param maximumAllocation Maximum Allocation.
* @param queueName queue name.
* @param scheduler YarnScheduler.
* @param rmContext RMContext.
* @param nodeLabelsEnabled the node labels feature enabled.
* @throws InvalidResourceRequestException when there is invalid request.
*/
public static void normalizeAndValidateRequests(List<ResourceRequest> ask,
Resource maximumAllocation, String queueName, YarnScheduler scheduler,
@ -264,9 +272,13 @@ public class RMServerUtils {
/**
* Validate increase/decrease request.
*
* <pre>
* - Throw exception when any other error happens
* </pre>
* @param request SchedContainerChangeRequest.
* @param increase true, add container; false, decrease container.
* @throws InvalidResourceRequestException when there is invalid request.
*/
public static void checkSchedContainerChangeRequest(
SchedContainerChangeRequest request, boolean increase)
@ -362,6 +374,7 @@ public class RMServerUtils {
* application master.
* @param appAttemptId Application attempt Id
* @throws InvalidContainerReleaseException
* an Application Master tries to release containers not belonging to it using.
*/
public static void
validateContainerReleaseRequest(List<ContainerId> containerReleaseList,
@ -394,7 +407,7 @@ public class RMServerUtils {
* @param module like AdminService or NodeLabelManager
* @param LOG the logger to use
* @return {@link UserGroupInformation} of the current user
* @throws IOException
* @throws IOException an I/O exception has occurred.
*/
public static UserGroupInformation verifyAdminAccess(
YarnAuthorizationProvider authorizer, String method, String module,
@ -509,7 +522,9 @@ public class RMServerUtils {
/**
* Find all configs whose name starts with
* YarnConfiguration.RM_PROXY_USER_PREFIX, and add a record for each one by
* replacing the prefix with ProxyUsers.CONF_HADOOP_PROXYUSER
* replacing the prefix with ProxyUsers.CONF_HADOOP_PROXYUSER.
*
* @param conf Configuration.
*/
public static void processRMProxyUsersConf(Configuration conf) {
Map<String, String> rmProxyUsers = new HashMap<String, String>();

View File

@ -1657,6 +1657,7 @@ public class ResourceManager extends CompositeService
/**
* Create RMDelegatedNodeLabelsUpdater based on configuration.
* @return RMDelegatedNodeLabelsUpdater.
*/
protected RMDelegatedNodeLabelsUpdater createRMDelegatedNodeLabelsUpdater() {
if (conf.getBoolean(YarnConfiguration.NODE_LABELS_ENABLED,
@ -1813,9 +1814,9 @@ public class ResourceManager extends CompositeService
}
/**
* Retrieve RM bind address from configuration
* Retrieve RM bind address from configuration.
*
* @param conf
* @param conf Configuration.
* @return InetSocketAddress
*/
public static InetSocketAddress getBindAddress(Configuration conf) {
@ -1826,8 +1827,8 @@ public class ResourceManager extends CompositeService
/**
* Deletes the RMStateStore
*
* @param conf
* @throws Exception
* @param conf Configuration.
* @throws Exception error occur.
*/
@VisibleForTesting
static void deleteRMStateStore(Configuration conf) throws Exception {

View File

@ -194,8 +194,8 @@ public class ResourceTrackerService extends AbstractService implements
/**
* Load DynamicResourceConfiguration from dynamic-resources.xml.
* @param conf
* @throws IOException
* @param conf Configuration.
* @throws IOException an I/O exception has occurred.
*/
public void loadDynamicResourceConfiguration(Configuration conf)
throws IOException {
@ -219,7 +219,7 @@ public class ResourceTrackerService extends AbstractService implements
/**
* Update DynamicResourceConfiguration with new configuration.
* @param conf
* @param conf DynamicResourceConfiguration.
*/
public void updateDynamicResourceConfiguration(
DynamicResourceConfiguration conf) {

View File

@ -144,6 +144,7 @@ public class CapacitySchedulerPreemptionUtils {
* stop preempt container when: all major resource type
* {@literal <=} 0 for to-preempt.
* This is default preemption behavior of inter-queue preemption
* @param curCandidates RMContainer Set.
* @return should we preempt rmContainer. If we should, deduct from
* <code>resourceToObtainByPartition</code>
*/

View File

@ -42,13 +42,22 @@ public class PreemptableResourceCalculator
LoggerFactory.getLogger(PreemptableResourceCalculator.class);
/**
* PreemptableResourceCalculator constructor
* PreemptableResourceCalculator constructor.
*
* @param preemptionContext
* @param preemptionContext context.
* @param isReservedPreemptionCandidatesSelector this will be set by
* different implementation of candidate selectors, please refer to
* TempQueuePerPartition#offer for details.
* @param allowQueuesBalanceAfterAllQueuesSatisfied
* Should resources be preempted from an over-served queue when the
* requesting queues are all at or over their guarantees?
* An example is, there're 10 queues under root, guaranteed resource
* of them are all 10%.
* Assume there're two queues are using resources, queueA uses 10%
* queueB uses 90%. For all queues are guaranteed, but it's not fair
* for queueA.
* We wanna make this behavior can be configured. By default it is
* not allowed.
*/
public PreemptableResourceCalculator(
CapacitySchedulerPreemptionContext preemptionContext,

View File

@ -271,9 +271,11 @@ public class NodeAttributesManagerImpl extends NodeAttributesManager {
}
/**
* @param nodeAttributeMapping
* @param newAttributesToBeAdded
* @param isRemoveOperation : to indicate whether its a remove operation.
* Validate for attributes.
*
* @param nodeAttributeMapping NodeAttribute Mapping
* @param newAttributesToBeAdded new Attributes ToBeAdded
* @param isRemoveOperation : to indicate whether it's a remove operation.
* @return Map of String to Map of NodeAttribute to AttributeValue
* @throws IOException : on invalid mapping in the current request or against
* already existing NodeAttributes.
@ -328,12 +330,13 @@ public class NodeAttributesManagerImpl extends NodeAttributesManager {
}
/**
* Validate For AttributeType Mismatch.
*
* @param isRemoveOperation
* @param attribute
* @param newAttributes
* @return Whether its a new Attribute added
* @throws IOException
* @param isRemoveOperation to indicate whether it's a remove operation.
* @param attribute NodeAttribute.
* @param newAttributes new Attributes.
* @return Whether it's a new Attribute added
* @throws IOException an I/O exception of some sort has occurred.
*/
private boolean validateForAttributeTypeMismatch(boolean isRemoveOperation,
NodeAttribute attribute,

View File

@ -102,7 +102,8 @@ public class RMDelegatedNodeLabelsUpdater extends CompositeService {
/**
* Terminate the timer.
* @throws Exception
*
* @throws Exception exception occurs.
*/
@Override
protected void serviceStop() throws Exception {

View File

@ -46,6 +46,8 @@ public final class PlacementFactory {
* @param ruleStr The name of the class to instantiate
* @param conf The configuration object to set for the rule
* @return Created class instance
* @throws ClassNotFoundException
* no definition for the class with the specified name could be found.
*/
public static PlacementRule getPlacementRule(String ruleStr,
Configuration conf)

View File

@ -36,6 +36,7 @@ public abstract class PlacementRule {
/**
* Set the config based on the passed in argument. This construct is used to
* not pollute this abstract class with implementation specific references.
* @param initArg initialization arguments.
*/
public void setConfig(Object initArg) {
// Default is a noop

View File

@ -179,6 +179,7 @@ public class VariableContext {
/**
* Returns the dataset referenced by the name.
* @param name Name of the set to be returned.
* @return the dataset referenced by the name.
*/
public Set<String> getExtraDataset(String name) {
return extraDataset.get(name);

View File

@ -791,7 +791,9 @@ public abstract class RMStateStore extends AbstractService {
/**
* Dispatcher used to send state operation completion events to
* ResourceManager services
* ResourceManager services.
*
* @param dispatcher Dispatcher.
*/
public void setRMDispatcher(Dispatcher dispatcher) {
this.rmDispatcher = dispatcher;
@ -827,13 +829,18 @@ public abstract class RMStateStore extends AbstractService {
/**
* Derived classes initialize themselves using this method.
*
* @param conf Configuration.
* @throws Exception error occur.
*/
protected abstract void initInternal(Configuration conf) throws Exception;
/**
* Derived classes start themselves using this method.
* The base class is started and the event dispatcher is ready to use at
* this point
* this point.
*
* @throws Exception error occur.
*/
protected abstract void startInternal() throws Exception;
@ -846,7 +853,9 @@ public abstract class RMStateStore extends AbstractService {
/**
* Derived classes close themselves using this method.
* The base class will be closed and the event dispatcher will be shutdown
* after this
* after this.
*
* @throws Exception error occur.
*/
protected abstract void closeInternal() throws Exception;
@ -860,6 +869,8 @@ public abstract class RMStateStore extends AbstractService {
* 5) Within a major upgrade, say 1.2 to 2.0:
* throw exception and indicate user to use a separate upgrade tool to
* upgrade RM state.
*
* @throws Exception error occur.
*/
public void checkVersion() throws Exception {
Version loadedVersion = loadVersion();
@ -884,22 +895,28 @@ public abstract class RMStateStore extends AbstractService {
/**
* Derived class use this method to load the version information from state
* store.
* @throws Exception error occur.
* @return current version.
*/
protected abstract Version loadVersion() throws Exception;
/**
* Derived class use this method to store the version information.
* @throws Exception error occur.
*/
protected abstract void storeVersion() throws Exception;
/**
* Get the current version of the underlying state store.
* @return current version.
*/
protected abstract Version getCurrentVersion();
/**
* Get the current epoch of RM and increment the value.
* @throws Exception error occur.
* @return current epoch.
*/
public abstract long getAndIncrementEpoch() throws Exception;
@ -907,6 +924,9 @@ public abstract class RMStateStore extends AbstractService {
* Compute the next epoch value by incrementing by one.
* Wraps around if the epoch range is exceeded so that
* when federation is enabled epoch collisions can be avoided.
*
* @param epoch epoch value.
* @return next epoch value.
*/
protected long nextEpoch(long epoch){
long epochVal = epoch - baseEpoch + 1;
@ -920,7 +940,9 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* The derived class must recover state from the store and return a new
* RMState object populated with that state
* This must not be called on the dispatcher thread
* This must not be called on the dispatcher thread.
* @throws Exception error occur.
* @return RMState.
*/
public abstract RMState loadState() throws Exception;
@ -928,7 +950,9 @@ public abstract class RMStateStore extends AbstractService {
* Non-Blocking API
* ResourceManager services use this to store the application's state
* This does not block the dispatcher threads
* RMAppStoredEvent will be sent on completion to notify the RMApp
* RMAppStoredEvent will be sent on completion to notify the RMApp.
*
* @param app rmApp.
*/
@SuppressWarnings("unchecked")
public void storeNewApplication(RMApp app) {
@ -969,6 +993,10 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* Derived classes must implement this method to store the state of an
* application.
*
* @param appId application Id.
* @param appStateData application StateData.
* @throws Exception error occur.
*/
protected abstract void storeApplicationStateInternal(ApplicationId appId,
ApplicationStateData appStateData) throws Exception;
@ -981,7 +1009,9 @@ public abstract class RMStateStore extends AbstractService {
* Non-blocking API
* ResourceManager services call this to store state on an application attempt
* This does not block the dispatcher threads
* RMAppAttemptStoredEvent will be sent on completion to notify the RMAppAttempt
* RMAppAttemptStoredEvent will be sent on completion to notify the RMAppAttempt.
*
* @param appAttempt RM AppAttempt.
*/
public void storeNewApplicationAttempt(RMAppAttempt appAttempt) {
Credentials credentials = getCredentialsFromAppAttempt(appAttempt);
@ -1011,7 +1041,11 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to store the state of an
* application attempt
* application attempt.
*
* @param attemptId Application AttemptId.
* @param attemptStateData Application AttemptStateData.
* @throws Exception error occur.
*/
protected abstract void storeApplicationAttemptStateInternal(
ApplicationAttemptId attemptId,
@ -1023,7 +1057,10 @@ public abstract class RMStateStore extends AbstractService {
/**
* RMDTSecretManager call this to store the state of a delegation token
* and sequence number
* and sequence number.
*
* @param rmDTIdentifier RMDelegationTokenIdentifier.
* @param renewDate token renew date.
*/
public void storeRMDelegationToken(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) {
@ -1034,14 +1071,20 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to store the state of
* RMDelegationToken and sequence number
* RMDelegationToken and sequence number.
*
* @param rmDTIdentifier RMDelegationTokenIdentifier.
* @param renewDate token renew date.
* @throws Exception error occur.
*/
protected abstract void storeRMDelegationTokenState(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate)
throws Exception;
/**
* RMDTSecretManager call this to remove the state of a delegation token
* RMDTSecretManager call this to remove the state of a delegation token.
*
* @param rmDTIdentifier RMDelegationTokenIdentifier.
*/
public void removeRMDelegationToken(
RMDelegationTokenIdentifier rmDTIdentifier) {
@ -1051,14 +1094,20 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to remove the state of RMDelegationToken
* Derived classes must implement this method to remove the state of RMDelegationToken.
*
* @param rmDTIdentifier RMDelegationTokenIdentifier.
* @throws Exception error occurs.
*/
protected abstract void removeRMDelegationTokenState(
RMDelegationTokenIdentifier rmDTIdentifier) throws Exception;
/**
* RMDTSecretManager call this to update the state of a delegation token
* and sequence number
* and sequence number.
*
* @param rmDTIdentifier RMDelegationTokenIdentifier.
* @param renewDate token renew date.
*/
public void updateRMDelegationToken(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) {
@ -1069,14 +1118,20 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to update the state of
* RMDelegationToken and sequence number
* RMDelegationToken and sequence number.
*
* @param rmDTIdentifier RMDelegationTokenIdentifier.
* @param renewDate token renew date.
* @throws Exception error occurs.
*/
protected abstract void updateRMDelegationTokenState(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate)
throws Exception;
/**
* RMDTSecretManager call this to store the state of a master key
* RMDTSecretManager call this to store the state of a master key.
*
* @param delegationKey DelegationToken Master Key.
*/
public void storeRMDTMasterKey(DelegationKey delegationKey) {
handleStoreEvent(new RMStateStoreRMDTMasterKeyEvent(delegationKey,
@ -1086,13 +1141,18 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to store the state of
* DelegationToken Master Key
* DelegationToken Master Key.
*
* @param delegationKey DelegationToken Master Key.
* @throws Exception error occur.
*/
protected abstract void storeRMDTMasterKeyState(DelegationKey delegationKey)
throws Exception;
/**
* RMDTSecretManager call this to remove the state of a master key
* RMDTSecretManager call this to remove the state of a master key.
*
* @param delegationKey DelegationToken Master Key.
*/
public void removeRMDTMasterKey(DelegationKey delegationKey) {
handleStoreEvent(new RMStateStoreRMDTMasterKeyEvent(delegationKey,
@ -1101,6 +1161,10 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking Apis to maintain reservation state.
*
* @param reservationAllocation reservation Allocation.
* @param planName plan Name.
* @param reservationIdName reservationId Name.
*/
public void storeNewReservation(
ReservationAllocationStateProto reservationAllocation, String planName,
@ -1120,6 +1184,11 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* Derived classes must implement this method to store the state of
* a reservation allocation.
*
* @param reservationAllocation reservation Allocation.
* @param planName plan Name.
* @param reservationIdName reservationId Name.
* @throws Exception error occurs.
*/
protected abstract void storeReservationState(
ReservationAllocationStateProto reservationAllocation, String planName,
@ -1129,6 +1198,10 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* Derived classes must implement this method to remove the state of
* a reservation allocation.
*
* @param planName plan Name.
* @param reservationIdName reservationId Name.
* @throws Exception exception occurs.
*/
protected abstract void removeReservationState(String planName,
String reservationIdName) throws Exception;
@ -1136,21 +1209,31 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to remove the state of
* DelegationToken Master Key
* DelegationToken Master Key.
*
* @param delegationKey DelegationKey.
* @throws Exception exception occurs.
*/
protected abstract void removeRMDTMasterKeyState(DelegationKey delegationKey)
throws Exception;
/**
* Blocking API Derived classes must implement this method to store or update
* the state of AMRMToken Master Key
* the state of AMRMToken Master Key.
*
* @param amrmTokenSecretManagerState amrmTokenSecretManagerState.
* @param isUpdate true, update; otherwise not update.
* @throws Exception exception occurs.
*/
protected abstract void storeOrUpdateAMRMTokenSecretManagerState(
AMRMTokenSecretManagerState amrmTokenSecretManagerState, boolean isUpdate)
throws Exception;
/**
* Store or Update state of AMRMToken Master Key
* Store or Update state of AMRMToken Master Key.
*
* @param amrmTokenSecretManagerState amrmTokenSecretManagerState.
* @param isUpdate true, update; otherwise not update.
*/
public void storeOrUpdateAMRMTokenSecretManager(
AMRMTokenSecretManagerState amrmTokenSecretManagerState, boolean isUpdate) {
@ -1165,6 +1248,8 @@ public abstract class RMStateStore extends AbstractService {
* store
* This does not block the dispatcher threads
* There is no notification of completion for this operation.
*
* @param app RMApp.
*/
@SuppressWarnings("unchecked")
public void removeApplication(RMApp app) {
@ -1183,7 +1268,10 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to remove the state of an
* application and its attempts
* application and its attempts.
*
* @param appState ApplicationStateData.
* @throws Exception error occurs.
*/
protected abstract void removeApplicationStateInternal(
ApplicationStateData appState) throws Exception;
@ -1194,6 +1282,8 @@ public abstract class RMStateStore extends AbstractService {
* store
* This does not block the dispatcher threads
* There is no notification of completion for this operation.
*
* @param applicationAttemptId applicationAttemptId.
*/
@SuppressWarnings("unchecked")
public synchronized void removeApplicationAttempt(
@ -1206,6 +1296,8 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* Derived classes must implement this method to remove the state of specified
* attempt.
* @param attemptId application attempt id.
* @throws Exception exception occurs.
*/
protected abstract void removeApplicationAttemptInternal(
ApplicationAttemptId attemptId) throws Exception;
@ -1316,7 +1408,7 @@ public abstract class RMStateStore extends AbstractService {
/**
* EventHandler implementation which forward events to the FSRMStateStore
* This hides the EventHandle methods of the store from its public interface
* This hides the EventHandle methods of the store from its public interface
*/
private final class ForwardingEventHandler
implements EventHandler<RMStateStoreEvent> {
@ -1328,16 +1420,18 @@ public abstract class RMStateStore extends AbstractService {
}
/**
* Derived classes must implement this method to delete the state store
* @throws Exception
* Derived classes must implement this method to delete the state store.
*
* @throws Exception exception occurs.
*/
public abstract void deleteStore() throws Exception;
/**
* Derived classes must implement this method to remove application from the
* state store
*
* @throws Exception
* state store.
*
* @param removeAppId application Id.
* @throws Exception exception occurs.
*/
public abstract void removeApplication(ApplicationId removeAppId)
throws Exception;
@ -1362,6 +1456,8 @@ public abstract class RMStateStore extends AbstractService {
/**
* ProxyCAManager calls this to store the CA Certificate and Private Key.
* @param caCert X509Certificate.
* @param caPrivateKey PrivateKey.
*/
public void storeProxyCACert(X509Certificate caCert,
PrivateKey caPrivateKey) {
@ -1372,7 +1468,11 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to store the CA Certificate
* and Private Key
* and Private Key.
*
* @param caCert X509Certificate.
* @param caPrivateKey PrivateKey.
* @throws Exception error occurs.
*/
protected abstract void storeProxyCACertState(
X509Certificate caCert, PrivateKey caPrivateKey) throws Exception;

View File

@ -48,6 +48,7 @@ public class RMStateStoreUtils {
* @param fsIn The {@link DataInputStream} containing RM Delegation Token data
* @return An {@link RMDelegationTokenIdentifierData} containing the read in
* RM Delegation Token
* @throws IOException an I/O exception has occurred.
*/
public static RMDelegationTokenIdentifierData
readRMDelegationTokenIdentifierData(DataInputStream fsIn)

View File

@ -16,6 +16,9 @@
* limitations under the License.
*/
/**
* This package contains classes to recovery the resourcemanager.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.hadoop.yarn.server.resourcemanager.recovery;

View File

@ -51,7 +51,8 @@ public abstract class AMRMTokenSecretManagerState {
}
/**
* {@link AMRMTokenSecretManager} current Master key
* {@link AMRMTokenSecretManager} current Master key.
* @return MasterKey.
*/
@Public
@Unstable
@ -62,7 +63,8 @@ public abstract class AMRMTokenSecretManagerState {
public abstract void setCurrentMasterKey(MasterKey currentMasterKey);
/**
* {@link AMRMTokenSecretManager} next Master key
* {@link AMRMTokenSecretManager} next Master key.
* @return MasterKey.
*/
@Public
@Unstable

View File

@ -143,7 +143,7 @@ public abstract class ApplicationAttemptStateData {
/**
* Set the final tracking Url of the AM.
* @param url
* @param url tracking url.
*/
public abstract void setFinalTrackingUrl(String url);
/**

View File

@ -192,7 +192,8 @@ public abstract class ApplicationStateData {
public abstract void setLaunchTime(long launchTime);
/**
* The application submitter
* The application submitter.
* @param user submitter user name.
*/
@Public
@Unstable

View File

@ -380,6 +380,10 @@ public abstract class AbstractSchedulerPlanFollower implements PlanFollower {
/**
* Add a new reservation queue for reservation currResId for this planQueue.
*
* @param planQueueName name of the reservable queue.
* @param queue the queue for the current {@link Plan}.
* @param currResId curr reservationId.
*/
protected abstract void addReservationQueue(String planQueueName, Queue queue,
String currResId);
@ -399,6 +403,7 @@ public abstract class AbstractSchedulerPlanFollower implements PlanFollower {
* Get plan resources for this planQueue.
*
* @param plan the current {@link Plan} being considered
* @param queue the queue for the current {@link Plan}
* @param clusterResources the resources available in the cluster
*
* @return the resources allocated to the specified {@link Plan}

View File

@ -178,7 +178,6 @@ public class PeriodicRLESparseResourceAllocation
* maximum capacity.
* @param period periodic offset at which capacities are evaluated.
* @return the maximum {@link Resource} across the specified time instants.
* @return true if removal is successful, false otherwise
*/
public Resource getMaximumPeriodicCapacity(long tick, long period) {
Resource maxResource;

View File

@ -290,8 +290,10 @@ public interface RMApp extends EventHandler<RMAppEvent> {
Map<NodeId, LogAggregationReport> getLogAggregationReportsForApp();
LogAggregationStatus getLogAggregationStatusForAppReport();
/**
* Return the node label expression of the AM container.
* @return the node label expression.
*/
String getAmNodeLabelExpression();

View File

@ -1900,10 +1900,11 @@ public class RMAppImpl implements RMApp, Recoverable {
}
/**
* catch the InvalidStateTransition.
* @param state
* @param rmAppEventType
*/
* catch the InvalidStateTransition.
*
* @param state RMAppState.
* @param rmAppEventType RMAppEventType.
*/
protected void onInvalidStateTransition(RMAppEventType rmAppEventType,
RMAppState state){
/* TODO fail the application on the failed transition */

View File

@ -241,6 +241,8 @@ public interface RMAppAttempt extends EventHandler<RMAppAttemptEvent> {
* </li>
* <li>killed by RM because of RM restart or failover.</li>
* </ul>
*
* @return attempt retry count.
*/
boolean shouldCountTowardsMaxAttemptRetry();
@ -258,7 +260,7 @@ public interface RMAppAttempt extends EventHandler<RMAppAttemptEvent> {
/**
* To capture Launch diagnostics of the app.
* @param amLaunchDiagnostics
* @param amLaunchDiagnostics amLaunchDiagnostics.
*/
void updateAMLaunchDiagnostics(String amLaunchDiagnostics);

View File

@ -922,8 +922,8 @@ public class RMContainerImpl implements RMContainer {
/**
* catch the InvalidStateTransition.
* @param state
* @param rmContainerEventType
* @param state RMContainerState.
* @param rmContainerEventType RMContainerEventType.
*/
@VisibleForTesting
protected void onInvalidStateTransition(

View File

@ -95,7 +95,8 @@ public interface RMNode {
/**
* the node manager version of the node received as part of the
* registration with the resource manager
* registration with the resource manager.
* @return node manager version.
*/
public String getNodeManagerVersion();

View File

@ -1203,8 +1203,8 @@ public class RMNodeImpl implements RMNode, EventHandler<RMNodeEvent> {
/**
* Put a node in deactivated (decommissioned or shutdown) status.
* @param rmNode
* @param finalState
* @param rmNode RMNode.
* @param finalState NodeState.
*/
public static void deactivateNode(RMNodeImpl rmNode, NodeState finalState) {
@ -1226,8 +1226,8 @@ public class RMNodeImpl implements RMNode, EventHandler<RMNodeEvent> {
/**
* Report node is RUNNING.
* @param rmNode
* @param containers
* @param rmNode RMNode.
* @param containers NMContainerStatus List.
*/
public static void reportNodeRunning(RMNodeImpl rmNode,
List<NMContainerStatus> containers) {
@ -1242,8 +1242,8 @@ public class RMNodeImpl implements RMNode, EventHandler<RMNodeEvent> {
/**
* Report node is UNUSABLE and update metrics.
* @param rmNode
* @param finalState
* @param rmNode RMNode.
* @param finalState NodeState.
*/
public static void reportNodeUnusable(RMNodeImpl rmNode,
NodeState finalState) {

View File

@ -314,6 +314,7 @@ public abstract class AbstractYarnScheduler
* Add blacklisted NodeIds to the list that is passed.
*
* @param app application attempt.
* @return blacklisted NodeIds.
*/
public List<N> getBlacklistedNodes(final SchedulerApplicationAttempt app) {
@ -850,6 +851,9 @@ public abstract class AbstractYarnScheduler
/**
* Process resource update on a node.
*
* @param nm RMNode.
* @param resourceOption resourceOption.
*/
public void updateNodeResource(RMNode nm,
ResourceOption resourceOption) {
@ -1329,6 +1333,7 @@ public abstract class AbstractYarnScheduler
* Normalize a list of resource requests
* using queue maximum resource allocations.
* @param asks resource requests
* @param queueName queue Name.
*/
protected void normalizeResourceRequests(List<ResourceRequest> asks,
String queueName) {

View File

@ -39,6 +39,9 @@ public class ApplicationPlacementAllocatorFactory {
*
* @param appPlacementAllocatorName
* allocator class name.
* @param appSchedulingInfo app SchedulingInfo.
* @param schedulerRequestKey scheduler RequestKey.
* @param rmContext RMContext.
* @return Specific AppPlacementAllocator instance based on type
*/
public static AppPlacementAllocator<SchedulerNode> getAppPlacementAllocator(

View File

@ -82,6 +82,7 @@ public interface MutableConfigurationProvider {
/**
* Get the last updated scheduler config version.
* @return Last updated scheduler config version.
* @throws Exception exception occurs.
*/
long getConfigVersion() throws Exception;

View File

@ -28,6 +28,9 @@ public interface NodeFilter {
/**
* Criteria to accept node in the filtered list.
*
* @param node SchedulerNode.
* @return true, node accept; false, node not accept.
*/
boolean accept(SchedulerNode node);
}

View File

@ -42,8 +42,8 @@ public interface PreemptableResourceScheduler extends ResourceScheduler {
void markContainerForPreemption(ApplicationAttemptId aid, RMContainer container);
/**
* Ask the scheduler to forcibly interrupt the container given as input
* @param container
* Ask the scheduler to forcibly interrupt the container given as input.
* @param container RMContainer.
*/
void markContainerForKillable(RMContainer container);

View File

@ -314,7 +314,7 @@ public class QueueMetrics implements MetricsSource {
* QueueMetrics (B)
* metrics
*
* @param partition
* @param partition Node Partition
* @return QueueMetrics
*/
public synchronized QueueMetrics getPartitionQueueMetrics(String partition) {
@ -603,7 +603,7 @@ public class QueueMetrics implements MetricsSource {
/**
* Set Available resources with support for resource vectors.
*
* @param limit
* @param limit Resource.
*/
public void setAvailableResources(Resource limit) {
availableMB.set(limit.getMemorySize());
@ -631,7 +631,7 @@ public class QueueMetrics implements MetricsSource {
* resources become available.
*
* @param partition Node Partition
* @param user
* @param user Name of the user.
* @param limit resource limit
*/
public void setAvailableResourcesToUser(String partition, String user,
@ -657,8 +657,8 @@ public class QueueMetrics implements MetricsSource {
* Increment pending resource metrics
*
* @param partition Node Partition
* @param user
* @param containers
* @param user Name of the user.
* @param containers containers count.
* @param res the TOTAL delta of resources note this is different from the
* other APIs which use per container resource
*/
@ -852,8 +852,8 @@ public class QueueMetrics implements MetricsSource {
/**
* Allocate Resource for container size change.
* @param partition Node Partition
* @param user
* @param res
* @param user Name of the user
* @param res Resource.
*/
public void allocateResources(String partition, String user, Resource res) {
allocatedMB.incr(res.getMemorySize());

View File

@ -49,7 +49,8 @@ public interface ResourceScheduler extends YarnScheduler, Recoverable {
/**
* Re-initialize the <code>ResourceScheduler</code>.
* @param conf configuration
* @throws IOException
* @param rmContext RMContext.
* @throws IOException an I/O exception has occurred.
*/
void reinitialize(Configuration conf, RMContext rmContext) throws IOException;

View File

@ -65,7 +65,8 @@ public class SchedContainerChangeRequest implements
}
/**
* Delta capacity = target - before, so if it is a decrease request, delta
* capacity will be negative
* capacity will be negative.
* @return delta Capacity.
*/
public synchronized Resource getDeltaCapacity() {
// Only calculate deltaCapacity once

View File

@ -801,6 +801,7 @@ public class SchedulerApplicationAttempt implements SchedulableEntity {
* Called when AM heartbeats. These containers were recovered by the RM after
* the AM had registered. They are reported to the AM in the
* <code>AllocateResponse#containersFromPreviousAttempts</code>.
* @return Container List.
*/
public List<Container> pullPreviousAttemptContainers() {
writeLock.lock();

View File

@ -246,6 +246,8 @@ public abstract class SchedulerNode {
/**
* Check if a container is launched by this node.
*
* @param containerId containerId.
* @return If the container is launched by the node.
*/
public synchronized boolean isValidContainer(ContainerId containerId) {

View File

@ -199,6 +199,12 @@ public class SchedulerUtils {
/**
* Utility method to normalize a resource request, by ensuring that the
* requested memory is a multiple of minMemory and is not zero.
*
* @param ask resource request.
* @param resourceCalculator {@link ResourceCalculator} the resource
* calculator to use.
* @param minimumResource minimum Resource.
* @param maximumResource maximum Resource.
*/
@VisibleForTesting
public static void normalizeRequest(
@ -215,6 +221,12 @@ public class SchedulerUtils {
* Utility method to normalize a resource request, by ensuring that the
* requested memory is a multiple of increment resource and is not zero.
*
* @param ask resource request.
* @param resourceCalculator {@link ResourceCalculator} the resource
* calculator to use.
* @param minimumResource minimum Resource.
* @param maximumResource maximum Resource.
* @param incrementResource increment Resource.
* @return normalized resource
*/
public static Resource getNormalizedResource(
@ -531,7 +543,14 @@ public class SchedulerUtils {
/**
* Check queue label expression, check if node label in queue's
* node-label-expression existed in clusterNodeLabels if rmContext != null
* node-label-expression existed in clusterNodeLabels if rmContext != null.
*
* @param queueLabels queue Labels.
* @param labelExpression label expression.
* @param rmContext rmContext.
* @return true, if node label in queue's node-label-expression existed in clusterNodeLabels;
* otherwise false.
*
*/
public static boolean checkQueueLabelExpression(Set<String> queueLabels,
String labelExpression, RMContext rmContext) {

View File

@ -61,12 +61,13 @@ import org.apache.hadoop.thirdparty.com.google.common.util.concurrent.SettableFu
public interface YarnScheduler extends EventHandler<SchedulerEvent> {
/**
* Get queue information
* Get queue information.
*
* @param queueName queue name
* @param includeChildQueues include child queues?
* @param recursive get children queues?
* @return queue information
* @throws IOException
* @throws IOException an I/O exception has occurred.
*/
@Public
@Stable
@ -153,7 +154,8 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
/**
* Get node resource usage report.
* @param nodeId
*
* @param nodeId nodeId.
* @return the {@link SchedulerNodeReport} for the node or null
* if nodeId does not point to a defined node.
*/
@ -191,10 +193,11 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
/**
* Check if the user has permission to perform the operation.
* If the user has {@link QueueACL#ADMINISTER_QUEUE} permission,
* this user can view/modify the applications in this queue
* @param callerUGI
* @param acl
* @param queueName
* this user can view/modify the applications in this queue.
*
* @param callerUGI caller UserGroupInformation.
* @param acl queue ACL.
* @param queueName queue Name.
* @return <code>true</code> if the user has the permission,
* <code>false</code> otherwise
*/
@ -212,7 +215,8 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
/**
* Get the container for the given containerId.
* @param containerId
*
* @param containerId the given containerId.
* @return the container for the given containerId.
*/
@LimitedPrivate("yarn")
@ -220,9 +224,9 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
public RMContainer getRMContainer(ContainerId containerId);
/**
* Moves the given application to the given queue
* @param appId
* @param newQueue
* Moves the given application to the given queue.
* @param appId application Id
* @param newQueue the given queue.
* @return the name of the queue the application was placed into
* @throws YarnException if the move cannot be carried out
*/
@ -246,9 +250,9 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
* Completely drain sourceQueue of applications, by moving all of them to
* destQueue.
*
* @param sourceQueue
* @param destQueue
* @throws YarnException
* @param sourceQueue sourceQueue.
* @param destQueue destQueue.
* @throws YarnException when yarn exception occur.
*/
void moveAllApps(String sourceQueue, String destQueue) throws YarnException;
@ -256,7 +260,7 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
* Terminate all applications in the specified queue.
*
* @param queueName the name of queue to be drained
* @throws YarnException
* @throws YarnException when yarn exception occur.
*/
void killAllAppsInQueue(String queueName) throws YarnException;
@ -266,7 +270,7 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
* must be a leaf, etc..).
*
* @param queueName name of the queue to remove
* @throws YarnException
* @throws YarnException when yarn exception occur.
*/
void removeQueue(String queueName) throws YarnException;
@ -276,7 +280,8 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
* attached to existing parent, must have zero entitlement).
*
* @param newQueue the queue being added.
* @throws YarnException
* @throws YarnException when yarn exception occur.
* @throws IOException when io exception occur.
*/
void addQueue(Queue newQueue) throws YarnException, IOException;
@ -289,14 +294,15 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
* @param queue the queue for which we change entitlement
* @param entitlement the new entitlement for the queue (capacity,
* maxCapacity, etc..)
* @throws YarnException
* @throws YarnException when yarn exception occur.
*/
void setEntitlement(String queue, QueueEntitlement entitlement)
throws YarnException;
/**
* Gets the list of names for queues managed by the Reservation System
* Gets the list of names for queues managed by the Reservation System.
* @return the list of queues which support reservations
* @throws YarnException when yarn exception occur.
*/
public Set<String> getPlanQueues() throws YarnException;
@ -322,6 +328,7 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
* @param applicationId
* Application ID
* @return Updated Priority from scheduler
* @throws YarnException when yarn exception occur.
*/
public Priority checkAndGetApplicationPriority(Priority priorityRequestedByApp,
UserGroupInformation user, String queuePath, ApplicationId applicationId)
@ -339,6 +346,7 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
* @param user who submitted the application
*
* @return updated priority
* @throws YarnException when yarn exception occur.
*/
public Priority updateApplicationPriority(Priority newPriority,
ApplicationId applicationId, SettableFuture<Object> future,
@ -355,15 +363,18 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
List<Container> getTransferredContainers(ApplicationAttemptId appAttemptId);
/**
* Set the cluster max priority
* Set the cluster max priority.
*
* @param conf
* @throws YarnException
* @param conf Configuration.
* @throws YarnException when yarn exception occur.
*/
void setClusterMaxPriority(Configuration conf) throws YarnException;
/**
* @param attemptId
* Get pending resource request for specified application attempt.
*
* @param attemptId the id of the application attempt
* @return pending resource requests.
*/
List<ResourceRequest> getPendingResourceRequestsForAttempt(
ApplicationAttemptId attemptId);

View File

@ -53,7 +53,7 @@ public class AbstractAutoCreatedLeafQueue extends AbstractLeafQueue {
*
* @param entitlement the new entitlement for the queue (capacity,
* maxCapacity, etc..)
* @throws SchedulerDynamicEditException
* @throws SchedulerDynamicEditException when setEntitlement fails.
*/
public void setEntitlement(QueueEntitlement entitlement)
throws SchedulerDynamicEditException {
@ -86,11 +86,12 @@ public class AbstractAutoCreatedLeafQueue extends AbstractLeafQueue {
/**
* This methods to change capacity for a queue and adjusts its
* absoluteCapacity
* absoluteCapacity.
*
* @param nodeLabel nodeLabel.
* @param entitlement the new entitlement for the queue (capacity,
* maxCapacity, etc..)
* @throws SchedulerDynamicEditException
* @throws SchedulerDynamicEditException when setEntitlement fails.
*/
public void setEntitlement(String nodeLabel, QueueEntitlement entitlement)
throws SchedulerDynamicEditException {

View File

@ -659,6 +659,10 @@ public abstract class AbstractCSQueue implements CSQueue {
/**
* Returns whether we should continue to look at all heart beating nodes even
* after the reservation limit was hit.
*
* @return true,
* continue to look at all heart beating nodes even after the reservation limit was hit.
* otherwise false.
*/
@Private
public boolean isReservationsContinueLooking() {

View File

@ -323,6 +323,7 @@ public class AbstractLeafQueue extends AbstractCSQueue {
/**
* Used only by tests.
* @return minimumAllocationFactor.
*/
@Private
public float getMinimumAllocationFactor() {
@ -331,6 +332,7 @@ public class AbstractLeafQueue extends AbstractCSQueue {
/**
* Used only by tests.
* @return maxAMResourcePerQueuePercent.
*/
@Private
public float getMaxAMResourcePerQueuePercent() {
@ -2102,6 +2104,7 @@ public class AbstractLeafQueue extends AbstractCSQueue {
/**
* Obtain (read-only) collection of pending applications.
* @return collection of pending applications.
*/
public Collection<FiCaSchedulerApp> getPendingApplications() {
return Collections.unmodifiableCollection(pendingOrderingPolicy
@ -2110,6 +2113,8 @@ public class AbstractLeafQueue extends AbstractCSQueue {
/**
* Obtain (read-only) collection of active applications.
*
* @return collection of active applications.
*/
public Collection<FiCaSchedulerApp> getApplications() {
return Collections.unmodifiableCollection(orderingPolicy
@ -2118,6 +2123,8 @@ public class AbstractLeafQueue extends AbstractCSQueue {
/**
* Obtain (read-only) collection of all applications.
*
* @return collection of all applications.
*/
public Collection<FiCaSchedulerApp> getAllApplications() {
Collection<FiCaSchedulerApp> apps = new HashSet<FiCaSchedulerApp>(

View File

@ -64,7 +64,8 @@ public abstract class AbstractManagedParentQueue extends ParentQueue {
/**
* Add the specified child queue.
* @param childQueue reference to the child queue to be added
* @throws SchedulerDynamicEditException
* @throws SchedulerDynamicEditException when addChildQueue fails.
* @throws IOException an I/O exception has occurred.
*/
public void addChildQueue(CSQueue childQueue)
throws SchedulerDynamicEditException, IOException {
@ -87,7 +88,7 @@ public abstract class AbstractManagedParentQueue extends ParentQueue {
/**
* Remove the specified child queue.
* @param childQueue reference to the child queue to be removed
* @throws SchedulerDynamicEditException
* @throws SchedulerDynamicEditException when removeChildQueue fails.
*/
public void removeChildQueue(CSQueue childQueue)
throws SchedulerDynamicEditException {
@ -113,7 +114,8 @@ public abstract class AbstractManagedParentQueue extends ParentQueue {
/**
* Remove the specified child queue.
* @param childQueueName name of the child queue to be removed
* @throws SchedulerDynamicEditException
* @return child queue.
* @throws SchedulerDynamicEditException when removeChildQueue fails.
*/
public CSQueue removeChildQueue(String childQueueName)
throws SchedulerDynamicEditException {

View File

@ -26,22 +26,25 @@ import java.util.List;
public interface AutoCreatedQueueManagementPolicy {
/**
* Initialize policy
* Initialize policy.
* @param parentQueue parent queue
* @throws IOException an I/O exception has occurred.
*/
void init(ParentQueue parentQueue) throws IOException;
/**
* Reinitialize policy state ( if required )
* Reinitialize policy state ( if required ).
* @param parentQueue parent queue
* @throws IOException an I/O exception has occurred.
*/
void reinitialize(ParentQueue parentQueue) throws IOException;
/**
* Get initial template for the specified leaf queue
* Get initial template for the specified leaf queue.
* @param leafQueue the leaf queue
* @return initial leaf queue template configurations and capacities for
* auto created queue
* @throws SchedulerDynamicEditException when get initialLeafQueue Configuration fails.
*/
AutoCreatedLeafQueueConfig getInitialLeafQueueConfiguration(
AbstractAutoCreatedLeafQueue leafQueue)
@ -56,13 +59,17 @@ public interface AutoCreatedQueueManagementPolicy {
* are done in commitQueueManagementChanges.
*
* @return returns a list of suggested QueueEntitlementChange(s) which may
* or may not be be enforced by the scheduler
* or may not be enforced by the scheduler
* @throws SchedulerDynamicEditException when compute QueueManagementChanges fails.
*/
List<QueueManagementChange> computeQueueManagementChanges()
throws SchedulerDynamicEditException;
/**
* Commit/Update state for the specified queue management changes.
*
* @param queueManagementChanges QueueManagementChange List.
* @throws SchedulerDynamicEditException when commit QueueManagementChanges fails.
*/
void commitQueueManagementChanges(
List<QueueManagementChange> queueManagementChanges)

View File

@ -172,6 +172,8 @@ public class CSMaxRunningAppsEnforcer {
*
* Runs in O(n log(n)) where n is the number of queues that are under the
* highest queue that went from having no slack to having slack.
*
* @param app FiCaSchedulerApp.
*/
public void updateRunnabilityOnAppRemoval(FiCaSchedulerApp app) {
// childqueueX might have no pending apps itself, but if a queue higher up

View File

@ -190,12 +190,16 @@ public interface CSQueue extends SchedulerQueue<CSQueue> {
* @param applicationId the applicationId of the application being submitted
* @param user user who submitted the application
* @param queue queue to which the application is submitted
* @throws AccessControlException if any acl violation is there.
*/
public void submitApplication(ApplicationId applicationId, String user,
String queue) throws AccessControlException;
/**
* Submit an application attempt to the queue.
*
* @param application application whose attempt is being submitted.
* @param userName userName who submitted the application.
*/
public void submitApplicationAttempt(FiCaSchedulerApp application,
String userName);
@ -211,13 +215,16 @@ public interface CSQueue extends SchedulerQueue<CSQueue> {
/**
* An application submitted to this queue has finished.
* @param applicationId
* @param applicationId applicationId.
* @param user user who submitted the application
*/
public void finishApplication(ApplicationId applicationId, String user);
/**
* An application attempt submitted to this queue has finished.
*
* @param application application attempt.
* @param queue queue.
*/
public void finishApplicationAttempt(FiCaSchedulerApp application,
String queue);
@ -266,6 +273,7 @@ public interface CSQueue extends SchedulerQueue<CSQueue> {
* Reinitialize the queue.
* @param newlyParsedQueue new queue to re-initalize from
* @param clusterResource resources in the cluster
* @throws IOException an I/O exception has occurred.
*/
public void reinitialize(CSQueue newlyParsedQueue, Resource clusterResource)
throws IOException;
@ -346,6 +354,10 @@ public interface CSQueue extends SchedulerQueue<CSQueue> {
/**
* When partition of node updated, we will update queue's resource usage if it
* has container(s) running on that.
*
* @param nodePartition node label.
* @param resourceToInc resource.
* @param application application.
*/
public void incUsedResource(String nodePartition, Resource resourceToInc,
SchedulerApplicationAttempt application);
@ -353,6 +365,10 @@ public interface CSQueue extends SchedulerQueue<CSQueue> {
/**
* When partition of node updated, we will update queue's resource usage if it
* has container(s) running on that.
*
* @param nodePartition node label.
* @param resourceToDec resource.
* @param application application.
*/
public void decUsedResource(String nodePartition, Resource resourceToDec,
SchedulerApplicationAttempt application);

View File

@ -97,6 +97,11 @@ public class CSQueueUtils {
/**
* Update partitioned resource usage, if nodePartition == null, will update
* used resource for all partitions of this queue.
*
* @param rc resource calculator.
* @param totalPartitionResource total Partition Resource.
* @param nodePartition node label.
* @param childQueue child queue.
*/
public static void updateUsedCapacity(final ResourceCalculator rc,
final Resource totalPartitionResource, String nodePartition,
@ -212,6 +217,12 @@ public class CSQueueUtils {
* When nodePartition is null, all partition of
* used-capacity/absolute-used-capacity will be updated.
* </p>
*
* @param rc resource calculator.
* @param cluster cluster resource.
* @param childQueue child queue.
* @param nlm RMNodeLabelsManager.
* @param nodePartition node label.
*/
@Lock(CSQueue.class)
public static void updateQueueStatistics(

View File

@ -119,6 +119,8 @@ public final class CapacitySchedulerConfigValidator {
*
* @param queues existing queues
* @param newQueues new queues
* @param newConf Capacity Scheduler Configuration.
* @throws IOException an I/O exception has occurred.
*/
public static void validateQueueHierarchy(
CSQueueStore queues,

View File

@ -1709,7 +1709,10 @@ public class CapacitySchedulerConfiguration extends ReservationSchedulerConfigur
}
/**
* Get configured node labels in a given queuePath
* Get configured node labels in a given queuePath.
*
* @param queuePath queue path.
* @return configured node labels.
*/
public Set<String> getConfiguredNodeLabels(String queuePath) {
Set<String> configuredNodeLabels = new HashSet<String>();

View File

@ -58,6 +58,7 @@ public interface CapacitySchedulerContext {
/**
* Get the yarn configuration.
* @return yarn configuration.
*/
Configuration getConf();

View File

@ -389,9 +389,11 @@ public class ManagedParentQueue extends AbstractManagedParentQueue {
}
/**
* Asynchronously called from scheduler to apply queue management changes
* Asynchronously called from scheduler to apply queue management changes.
*
* @param queueManagementChanges
* @param queueManagementChanges QueueManagementChange List.
* @throws IOException an I/O exception has occurred.
* @throws SchedulerDynamicEditException when validate and apply QueueManagementChanges fails.
*/
public void validateAndApplyQueueManagementChanges(
List<QueueManagementChange> queueManagementChanges)

View File

@ -188,7 +188,8 @@ public class PlanQueue extends AbstractManagedParentQueue {
}
/**
* Determine whether to hide/show the ReservationQueues
* Determine whether to hide/show the ReservationQueues.
* @return true, show ReservationQueues; false, hide ReservationQueues.
*/
public boolean showReservationsAsQueues() {
return showReservationsAsQueues;

View File

@ -112,7 +112,7 @@ public class InMemoryConfigurationStore extends YarnConfigurationStore {
* As there is no configuration store for versioning purposes,
* a conf store version is not applicable.
* @return null Conf store version not applicable for this store.
* @throws Exception
* @throws Exception if any exception occurs during getConfStoreVersion.
*/
@Override
public Version getConfStoreVersion() throws Exception {
@ -123,7 +123,7 @@ public class InMemoryConfigurationStore extends YarnConfigurationStore {
/**
* Configuration mutations not logged (i.e. not persisted). As such, they are
* not persisted and not versioned. Hence, no version information to store.
* @throws Exception
* @throws Exception if any exception occurs during store Version.
*/
@Override
public void storeVersion() throws Exception {

View File

@ -126,6 +126,7 @@ public abstract class YarnConfigurationStore {
/**
* Retrieve the persisted configuration.
* @return configuration as key-value
* @throws IOException an I/O exception has occurred.
*/
public abstract Configuration retrieve() throws IOException;
@ -139,6 +140,7 @@ public abstract class YarnConfigurationStore {
/**
* Get the last updated config version.
* @return Last updated config version.
* @throws Exception On version fetch failure.
*/
public abstract long getConfigVersion() throws Exception;

View File

@ -304,7 +304,7 @@ public class GuaranteedOrZeroCapacityOverTimePolicy
*
* @return List of Queue Management change suggestions which could potentially
* be committed/rejected by the scheduler due to validation failures
* @throws SchedulerDynamicEditException
* @throws SchedulerDynamicEditException when compute queueManagement changes fails.
*/
@Override
public List<QueueManagementChange> computeQueueManagementChanges()

View File

@ -405,9 +405,10 @@ public class AllocationTagsManager {
/**
* Helper method to just remove the tags associated with a container.
* @param nodeId
* @param applicationId
* @param allocationTags
*
* @param nodeId nodeId.
* @param applicationId application Id
* @param allocationTags application Tags.
*/
public void removeTags(NodeId nodeId, ApplicationId applicationId,
Set<String> allocationTags) {
@ -644,7 +645,7 @@ public class AllocationTagsManager {
* Returns a map whose key is the allocation tag and value is the
* count of allocations with this tag.
*
* @param nodeId
* @param nodeId nodeId.
* @return allocation tag to count mapping
*/
public Map<String, Long> getAllocationTagsWithCount(NodeId nodeId) {

View File

@ -32,7 +32,7 @@ public interface Evaluable<T> {
* of current class.
*
* @param target a generic type target that impacts this evaluation.
* @throws YarnException
* @throws YarnException if evaluate error.
*/
void evaluate(T target) throws YarnException;
}

View File

@ -347,7 +347,7 @@ public final class PlacementConstraintsUtil {
* @param atm allocation tags manager
* @param dcOpt optional diagnostics collector
* @return true if the given node satisfies the constraint of the request
* @throws InvalidAllocationTagsQueryException
* @throws InvalidAllocationTagsQueryException if given string is not in valid format.
*/
public static boolean canSatisfyConstraints(ApplicationId applicationId,
SchedulingRequest request, SchedulerNode schedulerNode,

View File

@ -92,7 +92,7 @@ public abstract class TargetApplicationsNamespace implements
* in this method.
*
* @param target a generic type target that impacts this evaluation.
* @throws InvalidAllocationTagsQueryException
* @throws InvalidAllocationTagsQueryException if given string is not in valid format.
*/
@Override
public void evaluate(TargetApplications target)

View File

@ -77,6 +77,7 @@ public class CentralizedOpportunisticContainerAllocator extends
* @param tokenSecretManager TokenSecretManager
* @param maxAllocationsPerAMHeartbeat max number of containers to be
* allocated in one AM heartbeat
* @param nodeQueueLoadMonitor NodeQueueLoadMonitor.
*/
public CentralizedOpportunisticContainerAllocator(
BaseContainerTokenSecretManager tokenSecretManager,

View File

@ -108,7 +108,7 @@ public class AllocationConfiguration extends ReservationSchedulerConfiguration {
* configuration.
* @param allocationFileParser The allocation file parser
* @param globalReservationQueueConfig The reservation queue config
* @throws AllocationConfigurationException
* @throws AllocationConfigurationException for any errors.
*/
public AllocationConfiguration(QueueProperties queueProperties,
AllocationFileParser allocationFileParser,
@ -202,6 +202,9 @@ public class AllocationConfiguration extends ReservationSchedulerConfiguration {
/**
* Get a queue's min share preemption timeout configured in the allocation
* file, in milliseconds. Return -1 if not set.
*
* @param queueName queue name.
* @return min share preemption timeout, return -1f if not set.
*/
public long getMinSharePreemptionTimeout(String queueName) {
Long minSharePreemptionTimeout = minSharePreemptionTimeouts.get(queueName);
@ -211,6 +214,9 @@ public class AllocationConfiguration extends ReservationSchedulerConfiguration {
/**
* Get a queue's fair share preemption timeout configured in the allocation
* file, in milliseconds. Return -1 if not set.
*
* @param queueName queue Name.
* @return fair share preemption timeout, return -1f if not set.
*/
public long getFairSharePreemptionTimeout(String queueName) {
Long fairSharePreemptionTimeout = fairSharePreemptionTimeouts.get(queueName);
@ -221,6 +227,9 @@ public class AllocationConfiguration extends ReservationSchedulerConfiguration {
/**
* Get a queue's fair share preemption threshold in the allocation file.
* Return -1f if not set.
*
* @param queueName queue Name.
* @return preemption threshold, return -1f if not set.
*/
public float getFairSharePreemptionThreshold(String queueName) {
Float fairSharePreemptionThreshold =

View File

@ -189,6 +189,11 @@ public class AllocationFileLoaderService extends AbstractService {
* Path to XML file containing allocations. If the
* path is relative, it is searched for in the
* classpath, but loaded like a regular File.
*
* @param conf configuration.
* @return Allocation File Path.
* @throws UnsupportedFileSystemException
* File system for a given file system name/scheme is not supported.
*/
@VisibleForTesting
public Path getAllocationFile(Configuration conf)

View File

@ -131,6 +131,7 @@ public class FSAppAttempt extends SchedulerApplicationAttempt
/**
* Get metrics reference from containing queue.
* @return metrics reference from containing queue.
*/
public QueueMetrics getMetrics() {
return queue.getMetrics();

View File

@ -483,6 +483,7 @@ public class FSLeafQueue extends FSQueue {
/**
* TODO: Based on how frequently this is called, we might want to club
* counting pending and active apps in the same method.
* @return active apps.
*/
public int getNumActiveApps() {
int numActiveApps = 0;

View File

@ -304,7 +304,10 @@ public abstract class FSQueue implements Queue, Schedulable {
LOG.debug("The updated fairShare for {} is {}", getName(), fairShare);
}
/** Get the steady fair share assigned to this Schedulable. */
/**
* Get the steady fair share assigned to this Schedulable.
* @return the steady fair share assigned to this Schedulable.
*/
public Resource getSteadyFairShare() {
return steadyFairShare;
}
@ -364,7 +367,7 @@ public abstract class FSQueue implements Queue, Schedulable {
*
* To be called holding the scheduler writelock.
*
* @param fairShare
* @param fairShare queue's fairshare.
*/
public void update(Resource fairShare) {
setFairShare(fairShare);
@ -407,6 +410,8 @@ public abstract class FSQueue implements Queue, Schedulable {
/**
* Gets the children of this queue, if any.
*
* @return the children of this queue.
*/
public abstract List<FSQueue> getChildQueues();
@ -420,6 +425,8 @@ public abstract class FSQueue implements Queue, Schedulable {
/**
* Return the number of apps for which containers can be allocated.
* Includes apps in subqueues.
*
* @return the number of apps.
*/
public abstract int getNumRunnableApps();
@ -447,6 +454,8 @@ public abstract class FSQueue implements Queue, Schedulable {
/**
* Returns true if queue has at least one app running.
*
* @return true, if queue has at least one app running; otherwise, false;
*/
public boolean isActive() {
return getNumRunnableApps() > 0;

View File

@ -465,6 +465,12 @@ public class FairScheduler extends
* Add a new application to the scheduler, with a given id, queue name, and
* user. This will accept a new app even if the user or queue is above
* configured limits, but the app will not be marked as runnable.
*
* @param applicationId applicationId.
* @param queueName queue name.
* @param user submit application user.
* @param isAppRecovering true, app recover; false, app not recover.
* @param placementContext application placement context.
*/
protected void addApplication(ApplicationId applicationId,
String queueName, String user, boolean isAppRecovering,
@ -588,6 +594,10 @@ public class FairScheduler extends
/**
* Add a new application attempt to the scheduler.
*
* @param applicationAttemptId application AttemptId.
* @param transferStateFromPreviousAttempt transferStateFromPreviousAttempt.
* @param isAttemptRecovering true, attempt recovering;false, attempt not recovering.
*/
protected void addApplicationAttempt(
ApplicationAttemptId applicationAttemptId,

View File

@ -119,6 +119,8 @@ public class MaxRunningAppsEnforcer {
/**
* Tracks the given new runnable app for purposes of maintaining max running
* app limits.
*
* @param app FSAppAttempt, the given application.
*/
public void trackRunnableApp(FSAppAttempt app) {
String user = app.getUser();
@ -138,6 +140,8 @@ public class MaxRunningAppsEnforcer {
/**
* Tracks the given new non runnable app so that it can be made runnable when
* it would not violate max running app limits.
*
* @param app FSAppAttempt, the given application.
*/
public void trackNonRunnableApp(FSAppAttempt app) {
String user = app.getUser();
@ -170,6 +174,9 @@ public class MaxRunningAppsEnforcer {
*
* Runs in O(n log(n)) where n is the number of queues that are under the
* highest queue that went from having no slack to having slack.
*
* @param queue FSLeafQueue, the given queue.
* @param app FSAppAttempt, the given application.
*/
public void updateRunnabilityOnAppRemoval(FSAppAttempt app, FSLeafQueue queue) {
AllocationConfiguration allocConf = scheduler.getAllocationConfiguration();
@ -271,6 +278,8 @@ public class MaxRunningAppsEnforcer {
/**
* Updates the relevant tracking variables after a runnable app with the given
* queue and user has been removed.
*
* @param app FSAppAttempt.
*/
public void untrackRunnableApp(FSAppAttempt app) {
// Update usersRunnableApps
@ -292,7 +301,9 @@ public class MaxRunningAppsEnforcer {
}
/**
* Stops tracking the given non-runnable app
* Stops tracking the given non-runnable app.
*
* @param app FSAppAttempt.
*/
public void untrackNonRunnableApp(FSAppAttempt app) {
usersNonRunnableApps.remove(app.getUser(), app);
@ -301,6 +312,9 @@ public class MaxRunningAppsEnforcer {
/**
* Traverses the queue hierarchy under the given queue to gather all lists
* of non-runnable applications.
*
* @param queue FSQueue
* @param appLists FSAppAttempt List.
*/
private void gatherPossiblyRunnableAppLists(FSQueue queue,
List<List<FSAppAttempt>> appLists) {

View File

@ -543,6 +543,8 @@ public class QueueManager {
/**
* Gets a queue by name.
* @param name queue name.
* @return queue objects, FSQueue.
*/
public FSQueue getQueue(String name) {
name = ensureRootPrefix(name);
@ -553,6 +555,10 @@ public class QueueManager {
/**
* Return whether a queue exists already.
*
* @param name queue name.
* @return Returns true if the queue exists,
* otherwise returns false.
*/
public boolean exists(String name) {
name = ensureRootPrefix(name);
@ -563,6 +569,7 @@ public class QueueManager {
/**
* Get a collection of all leaf queues.
* @return a collection of all leaf queues.
*/
public Collection<FSLeafQueue> getLeafQueues() {
synchronized (queues) {
@ -572,6 +579,7 @@ public class QueueManager {
/**
* Get a collection of all queues.
* @return a collection of all queues.
*/
public Collection<FSQueue> getQueues() {
synchronized (queues) {

View File

@ -48,6 +48,7 @@ public interface Schedulable {
/**
* Name of job/queue, used for debugging as well as for breaking ties in
* scheduling order deterministically.
* @return Name of job/queue.
*/
String getName();
@ -55,16 +56,26 @@ public interface Schedulable {
* Maximum number of resources required by this Schedulable. This is defined as
* number of currently utilized resources + number of unlaunched resources (that
* are either not yet launched or need to be speculated).
* @return resources required by this Schedulable.
*/
Resource getDemand();
/** Get the aggregate amount of resources consumed by the schedulable. */
/**
* Get the aggregate amount of resources consumed by the schedulable.
* @return aggregate amount of resources.
*/
Resource getResourceUsage();
/** Minimum Resource share assigned to the schedulable. */
/**
* Minimum Resource share assigned to the schedulable.
* @return Minimum Resource share.
*/
Resource getMinShare();
/** Maximum Resource share assigned to the schedulable. */
/**
* Maximum Resource share assigned to the schedulable.
* @return Maximum Resource share.
*/
Resource getMaxShare();
/**
@ -77,10 +88,16 @@ public interface Schedulable {
*/
float getWeight();
/** Start time for jobs in FIFO queues; meaningless for QueueSchedulables.*/
/**
* Start time for jobs in FIFO queues; meaningless for QueueSchedulables.
* @return Start time for jobs.
*/
long getStartTime();
/** Job priority for jobs in FIFO queues; meaningless for QueueSchedulables. */
/**
* Job priority for jobs in FIFO queues; meaningless for QueueSchedulables.
* @return Job priority.
*/
Priority getPriority();
/** Refresh the Schedulable's demand and those of its children if any. */
@ -89,13 +106,22 @@ public interface Schedulable {
/**
* Assign a container on this node if possible, and return the amount of
* resources assigned.
*
* @param node FSSchedulerNode.
* @return the amount of resources assigned.
*/
Resource assignContainer(FSSchedulerNode node);
/** Get the fair share assigned to this Schedulable. */
/**
* Get the fair share assigned to this Schedulable.
* @return the fair share assigned to this Schedulable.
*/
Resource getFairShare();
/** Assign a fair share to this Schedulable. */
/**
* Assign a fair share to this Schedulable.
* @param fairShare a fair share to this Schedulable.
*/
void setFairShare(Resource fairShare);
/**

View File

@ -84,7 +84,7 @@ public abstract class SchedulingPolicy {
*
* @param policy canonical class name or "drf" or "fair" or "fifo"
* @return a {@link SchedulingPolicy} instance parsed from given policy
* @throws AllocationConfigurationException
* @throws AllocationConfigurationException for any errors.
*
*/
@SuppressWarnings("unchecked")

View File

@ -45,9 +45,9 @@ public final class ComputeFairShares {
* shares considering only active schedulables ie schedulables which have
* running apps.
*
* @param schedulables
* @param totalResources
* @param type
* @param schedulables given schedulables.
* @param totalResources totalResources.
* @param type type of the resource.
*/
public static void computeShares(
Collection<? extends Schedulable> schedulables, Resource totalResources,
@ -60,9 +60,9 @@ public final class ComputeFairShares {
* share is an allocation of shares considering all queues, i.e.,
* active and inactive.
*
* @param queues
* @param totalResources
* @param type
* @param queues {@link FSQueue}s whose shares are to be updated.
* @param totalResources totalResources.
* @param type type of the resource.
*/
public static void computeSteadyShares(
Collection<? extends FSQueue> queues, Resource totalResources,

View File

@ -51,6 +51,8 @@ public interface MultiNodeLookupPolicy<N extends SchedulerNode> {
*
* @param nodes
* a collection working nm's.
* @param partition
* node label
*/
void addAndRefreshNodesSet(Collection<N> nodes, String partition);

View File

@ -29,35 +29,43 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceUsage;
public interface SchedulableEntity {
/**
* Id - each entity must have a unique id
* Id - each entity must have a unique id.
* @return id.
*/
public String getId();
/**
* Compare the passed SchedulableEntity to this one for input order.
* Input order is implementation defined and should reflect the
* correct ordering for first-in first-out processing
* correct ordering for first-in first-out processing.
*
* @param other SchedulableEntity.
* @return correct ordering.
*/
public int compareInputOrderTo(SchedulableEntity other);
/**
* View of Resources wanted and consumed by the entity
* View of Resources wanted and consumed by the entity.
* @return ResourceUsage.
*/
public ResourceUsage getSchedulingResourceUsage();
/**
* Get the priority of the application
* Get the priority of the application.
* @return priority of the application.
*/
public Priority getPriority();
/**
* Whether application was running before RM restart.
* @return true, application was running before RM restart;
* otherwise false.
*/
public boolean isRecovering();
/**
* Get partition corresponding to this entity.
* @return partition
* @return partition node label.
*/
String getPartition();

View File

@ -76,7 +76,9 @@ public class AMRMTokenSecretManager extends
new HashSet<ApplicationAttemptId>();
/**
* Create an {@link AMRMTokenSecretManager}
* Create an {@link AMRMTokenSecretManager}.
* @param conf configuration.
* @param rmContext rm context.
*/
public AMRMTokenSecretManager(Configuration conf, RMContext rmContext) {
this.rmContext = rmContext;
@ -219,6 +221,8 @@ public class AMRMTokenSecretManager extends
/**
* Populate persisted password of AMRMToken back to AMRMTokenSecretManager.
* @param token AMRMTokenIdentifier.
* @throws IOException an I/O exception has occurred.
*/
public void addPersistedPassword(Token<AMRMTokenIdentifier> token)
throws IOException {

View File

@ -632,7 +632,9 @@ public class DelegationTokenRenewer extends AbstractService {
}
/**
* set task to renew the token
* set task to renew the token.
* @param token DelegationTokenToRenew.
* @throws IOException if an IO error occurred.
*/
@VisibleForTesting
protected void setTimerForTokenRenewal(DelegationTokenToRenew token)

View File

@ -262,7 +262,7 @@ public class NMTokenSecretManagerInRM extends BaseNMTokenSecretManager {
/**
* This is to be called when NodeManager reconnects or goes down. This will
* remove if NMTokens if present for any running application from cache.
* @param nodeId
* @param nodeId Node Id.
*/
public void removeNodeKey(NodeId nodeId) {
this.writeLock.lock();

View File

@ -52,7 +52,7 @@ public abstract class QueueACLsManager {
/**
* Get queue acl manager corresponding to the scheduler.
* @param scheduler the scheduler for which the queue acl manager is required
* @param conf
* @param conf Configuration.
* @return {@link QueueACLsManager}
*/
public static QueueACLsManager getQueueACLsManager(

View File

@ -193,6 +193,7 @@ public class RMContainerTokenSecretManager extends
* @param containerType Container Type
* @param execType Execution Type
* @param allocationRequestId allocationRequestId
* @param allocationTags allocation Tags
* @return the container-token
*/
public Token createContainerToken(ContainerId containerId,

View File

@ -43,30 +43,32 @@ public interface VolumeManager {
/**
* Start to supervise on a volume.
* @param volume
* @param volume volume.
* @return the volume being managed by the manager.
*/
Volume addOrGetVolume(Volume volume);
/**
* Execute volume provisioning tasks as backend threads.
* @param volumeProvisioningTask
* @param delaySecond
* @param volumeProvisioningTask A provisioning task encapsulates
* all the logic required by a storage system to provision a volume.
* @param delaySecond delay Second.
* @return ScheduledFuture.
*/
ScheduledFuture<VolumeProvisioningResults> schedule(
VolumeProvisioningTask volumeProvisioningTask, int delaySecond);
/**
* Register a csi-driver-adaptor to the volume manager.
* @param driverName
* @param client
* @param driverName driver name.
* @param client csi adaptor protocol client.
*/
void registerCsiDriverAdaptor(String driverName, CsiAdaptorProtocol client);
/**
* Returns the csi-driver-adaptor client from cache by the given driver name.
* If the client is not found, null is returned.
* @param driverName
* @param driverName driver name.
* @return a csi-driver-adaptor client working for given driver or null
* if the adaptor could not be found.
*/

View File

@ -98,6 +98,7 @@ public interface RMWebServiceProtocol {
* This method retrieves the cluster user information, and it is reachable by using
* {@link RMWSConsts#CLUSTER_USER_INFO}.
*
* @param hsr the servlet request
* @return the cluster user information
*/
ClusterUserInfo getClusterUserInfo(HttpServletRequest hsr);
@ -161,6 +162,7 @@ public interface RMWebServiceProtocol {
* It is a PathParam.
* @param resourceOption The resource change.
* @throws AuthorizationException If the user is not authorized.
* @return the resources of a specific node.
*/
ResourceInfo updateNodeResource(HttpServletRequest hsr, String nodeId,
ResourceOptionInfo resourceOption) throws AuthorizationException;
@ -223,6 +225,7 @@ public interface RMWebServiceProtocol {
* aggregated. It is a QueryParam.
* @param activitiesCount number of activities
* @return last n activities
* @throws InterruptedException if interrupted.
*/
BulkActivitiesInfo getBulkActivities(HttpServletRequest hsr,
String groupBy, int activitiesCount) throws InterruptedException;

View File

@ -50,7 +50,7 @@ public class FairSchedulerInfo extends SchedulerInfo {
/**
* Get the fair share assigned to the appAttemptId.
* @param appAttemptId
* @param appAttemptId the application attempt id
* @return The fair share assigned to the appAttemptId,
* <code>FairSchedulerInfo#INVALID_FAIR_SHARE</code> if the scheduler does
* not know about this application attempt.

View File

@ -154,6 +154,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the steady fair share as a fraction of the entire cluster capacity.
* @return steady fairshare memoryfraction.
*/
public float getSteadyFairShareMemoryFraction() {
return fractionMemSteadyFairShare;
@ -161,6 +162,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the fair share as a fraction of the entire cluster capacity.
* @return fair share memory fraction.
*/
public float getFairShareMemoryFraction() {
return fractionMemFairShare;
@ -168,13 +170,15 @@ public class FairSchedulerQueueInfo {
/**
* Returns the steady fair share of this queue in megabytes.
* @return steady fair share.
*/
public ResourceInfo getSteadyFairShare() {
return steadyFairResources;
}
/**
* Returns the fair share of this queue in megabytes
* Returns the fair share of this queue in megabytes.
* @return fair share.
*/
public ResourceInfo getFairShare() {
return fairResources;
@ -232,6 +236,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the memory used by this queue as a fraction of the entire
* cluster capacity.
* @return used memory fraction.
*/
public float getUsedMemoryFraction() {
return fractionMemUsed;
@ -240,6 +245,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the capacity of this queue as a fraction of the entire cluster
* capacity.
* @return max resources fraction.
*/
public float getMaxResourcesFraction() {
return fractionMemMaxShare;
@ -247,6 +253,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the name of the scheduling policy used by this queue.
* @return SchedulingPolicy.
*/
public String getSchedulingPolicy() {
return schedulingPolicy;