diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java
index 14950cac1c..afa85483d1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java
@@ -618,12 +618,12 @@ public boolean isUntrackedNode(String hostName) {
}
/**
- * 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 @@ private int readDecommissioningTimeout(Configuration pConf) {
/**
* 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);
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAuditLogger.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAuditLogger.java
index cc54d0b586..1b3a49433f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAuditLogger.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAuditLogger.java
@@ -489,6 +489,7 @@ public static void logFailure(String user, String operation, String perm,
* @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.
*
*
* Note that the {@link RMAuditLogger} uses tabs ('\t') as a key-val delimiter
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMSecretManagerService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMSecretManagerService.java
index 32369ba53e..1a0047b821 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMSecretManagerService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMSecretManagerService.java
@@ -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());
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMServerUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMServerUtils.java
index de7a762660..39a27e73fe 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMServerUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMServerUtils.java
@@ -241,7 +241,15 @@ private static String validateContainerIdAndVersion(
/**
* 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 ask,
Resource maximumAllocation, String queueName, YarnScheduler scheduler,
@@ -264,9 +272,13 @@ public static void normalizeAndValidateRequests(List ask,
/**
* Validate increase/decrease request.
+ *
*
* - Throw exception when any other error happens
*
+ * @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 @@ private static boolean validateIncreaseDecreaseRequest(RMContext rmContext,
* 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 containerReleaseList,
@@ -394,7 +407,7 @@ public static UserGroupInformation verifyAdminAccess(
* @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 static YarnApplicationAttemptState createApplicationAttemptState(
/**
* 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 rmProxyUsers = new HashMap();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
index 1bcfdbbafa..da500add4c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
@@ -1657,6 +1657,7 @@ private boolean isOpportunisticSchedulingEnabled(Configuration conf) {
/**
* Create RMDelegatedNodeLabelsUpdater based on configuration.
+ * @return RMDelegatedNodeLabelsUpdater.
*/
protected RMDelegatedNodeLabelsUpdater createRMDelegatedNodeLabelsUpdater() {
if (conf.getBoolean(YarnConfiguration.NODE_LABELS_ENABLED,
@@ -1813,9 +1814,9 @@ private void setSchedulerRecoveryStartAndWaitTime(RMState state,
}
/**
- * 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 static InetSocketAddress getBindAddress(Configuration conf) {
/**
* Deletes the RMStateStore
*
- * @param conf
- * @throws Exception
+ * @param conf Configuration.
+ * @throws Exception error occur.
*/
@VisibleForTesting
static void deleteRMStateStore(Configuration conf) throws Exception {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java
index b0b148c117..cf2aed41e0 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java
@@ -194,8 +194,8 @@ protected void serviceInit(Configuration conf) throws Exception {
/**
* 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 void loadDynamicResourceConfiguration(Configuration conf)
/**
* Update DynamicResourceConfiguration with new configuration.
- * @param conf
+ * @param conf DynamicResourceConfiguration.
*/
public void updateDynamicResourceConfiguration(
DynamicResourceConfiguration conf) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/CapacitySchedulerPreemptionUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/CapacitySchedulerPreemptionUtils.java
index 3382ead741..99c691c773 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/CapacitySchedulerPreemptionUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/CapacitySchedulerPreemptionUtils.java
@@ -144,6 +144,7 @@ private static void deductPreemptableResourcePerApp(
* 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
* resourceToObtainByPartition
*/
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/PreemptableResourceCalculator.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/PreemptableResourceCalculator.java
index 7563c36b92..2c4c7164fe 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/PreemptableResourceCalculator.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/PreemptableResourceCalculator.java
@@ -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,
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/NodeAttributesManagerImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/NodeAttributesManagerImpl.java
index b0b98ad9b4..161e104e75 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/NodeAttributesManagerImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/NodeAttributesManagerImpl.java
@@ -271,9 +271,11 @@ private void replaceNodeToAttribute(String nodeHost, String prefix,
}
/**
- * @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 @@ protected Map> validate(
}
/**
+ * 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,
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMDelegatedNodeLabelsUpdater.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMDelegatedNodeLabelsUpdater.java
index ba0c430d77..a4f74a91f7 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMDelegatedNodeLabelsUpdater.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMDelegatedNodeLabelsUpdater.java
@@ -102,7 +102,8 @@ protected void serviceStart() throws Exception {
/**
* Terminate the timer.
- * @throws Exception
+ *
+ * @throws Exception exception occurs.
*/
@Override
protected void serviceStop() throws Exception {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementFactory.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementFactory.java
index 301b3a314d..bab17775b4 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementFactory.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementFactory.java
@@ -46,6 +46,8 @@ private 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)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementRule.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementRule.java
index 50d686ad37..ca4c9e1d7a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementRule.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementRule.java
@@ -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
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/VariableContext.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/VariableContext.java
index e8e419c64e..f2c5f5422d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/VariableContext.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/VariableContext.java
@@ -179,6 +179,7 @@ public void putExtraDataset(String name, Set set) {
/**
* 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 getExtraDataset(String name) {
return extraDataset.get(name);
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java
index a93ed1bc6b..49e25eb8f1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java
@@ -791,7 +791,9 @@ public ProxyCAState getProxyCAState() {
/**
* 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 @@ protected void serviceStart() throws Exception {
/**
* 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 @@ protected void serviceStop() throws Exception {
/**
* 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 @@ protected void serviceStop() throws Exception {
* 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 void checkVersion() throws Exception {
/**
* 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 void checkVersion() throws Exception {
* 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 @@ protected long nextEpoch(long epoch){
* 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 @@ protected long nextEpoch(long epoch){
* 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 void updateFencedState() {
* 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 @@ protected abstract void updateApplicationStateInternal(ApplicationId appId,
* 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 void updateApplicationAttemptState(
/**
* 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 @@ protected abstract void updateApplicationAttemptStateInternal(
/**
* 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 void storeRMDelegationToken(
/**
* 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 void removeRMDelegationToken(
/**
* 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 void updateRMDelegationToken(
/**
* 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 void storeRMDTMasterKey(DelegationKey delegationKey) {
/**
* 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 void removeRMDTMasterKey(DelegationKey delegationKey) {
/**
* 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 void removeReservation(String planName, String reservationIdName) {
* 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 @@ protected abstract void storeReservationState(
* 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 @@ protected abstract void removeReservationState(String planName,
/**
* 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 void storeOrUpdateAMRMTokenSecretManager(
* 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 void removeApplication(RMApp app) {
/**
* 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 @@ protected abstract void removeApplicationStateInternal(
* 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 synchronized void removeApplicationAttempt(
* 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 @@ private void notifyApplicationAttempt(RMAppAttemptEvent event) {
/**
* 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 {
@@ -1328,16 +1420,18 @@ public void handle(RMStateStoreEvent event) {
}
/**
- * 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 @@ protected EventHandler getRMStateStoreEventHandler() {
/**
* 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 void storeProxyCACert(X509Certificate caCert,
/**
* 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;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStoreUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStoreUtils.java
index 870c0ff30a..13a4d84955 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStoreUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStoreUtils.java
@@ -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)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/package-info.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/package-info.java
index cbbeb3d01d..da5455f7b6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/package-info.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/package-info.java
@@ -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;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/AMRMTokenSecretManagerState.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/AMRMTokenSecretManagerState.java
index 89b4ff0fc7..fc03d7a948 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/AMRMTokenSecretManagerState.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/AMRMTokenSecretManagerState.java
@@ -51,7 +51,8 @@ public static AMRMTokenSecretManagerState newInstance(
}
/**
- * {@link AMRMTokenSecretManager} current Master key
+ * {@link AMRMTokenSecretManager} current Master key.
+ * @return MasterKey.
*/
@Public
@Unstable
@@ -62,7 +63,8 @@ public static AMRMTokenSecretManagerState newInstance(
public abstract void setCurrentMasterKey(MasterKey currentMasterKey);
/**
- * {@link AMRMTokenSecretManager} next Master key
+ * {@link AMRMTokenSecretManager} next Master key.
+ * @return MasterKey.
*/
@Public
@Unstable
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/ApplicationAttemptStateData.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/ApplicationAttemptStateData.java
index 27e80cd30e..31972d4712 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/ApplicationAttemptStateData.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/ApplicationAttemptStateData.java
@@ -143,7 +143,7 @@ public static ApplicationAttemptStateData newInstance(
/**
* Set the final tracking Url of the AM.
- * @param url
+ * @param url tracking url.
*/
public abstract void setFinalTrackingUrl(String url);
/**
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/ApplicationStateData.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/ApplicationStateData.java
index 8b908e56d0..c94b27770f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/ApplicationStateData.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/records/ApplicationStateData.java
@@ -192,7 +192,8 @@ public int getFirstAttemptId() {
public abstract void setLaunchTime(long launchTime);
/**
- * The application submitter
+ * The application submitter.
+ * @param user submitter user name.
*/
@Public
@Unstable
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.java
index 3f350961d5..687890e286 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.java
@@ -380,6 +380,10 @@ protected abstract List extends Queue> getChildReservationQueues(
/**
* 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 @@ protected abstract void createDefaultReservationQueue(String planQueueName,
* 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}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/PeriodicRLESparseResourceAllocation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/PeriodicRLESparseResourceAllocation.java
index 39b69249f9..894abd0f07 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/PeriodicRLESparseResourceAllocation.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/PeriodicRLESparseResourceAllocation.java
@@ -178,7 +178,6 @@ public boolean removeInterval(ReservationInterval interval,
* 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;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMApp.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMApp.java
index 949b34e8bb..fbf54a1813 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMApp.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMApp.java
@@ -290,8 +290,10 @@ ApplicationReport createAndGetApplicationReport(String clientUserName,
Map getLogAggregationReportsForApp();
LogAggregationStatus getLogAggregationStatusForAppReport();
+
/**
* Return the node label expression of the AM container.
+ * @return the node label expression.
*/
String getAmNodeLabelExpression();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java
index ca88b8be32..e73b66a259 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java
@@ -1900,10 +1900,11 @@ public Map getApplicationSchedulingEnvs() {
}
/**
- * 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 */
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttempt.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttempt.java
index 5d78c8b354..5044169607 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttempt.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttempt.java
@@ -241,6 +241,8 @@ public interface RMAppAttempt extends EventHandler {
*
*
killed by RM because of RM restart or failover.
*
+ *
+ * @return attempt retry count.
*/
boolean shouldCountTowardsMaxAttemptRetry();
@@ -258,7 +260,7 @@ public interface RMAppAttempt extends EventHandler {
/**
* To capture Launch diagnostics of the app.
- * @param amLaunchDiagnostics
+ * @param amLaunchDiagnostics amLaunchDiagnostics.
*/
void updateAMLaunchDiagnostics(String amLaunchDiagnostics);
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
index 7e417cc9dc..22d4eaafd7 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
@@ -922,8 +922,8 @@ public void setContainerId(ContainerId containerId) {
/**
* catch the InvalidStateTransition.
- * @param state
- * @param rmContainerEventType
+ * @param state RMContainerState.
+ * @param rmContainerEventType RMContainerEventType.
*/
@VisibleForTesting
protected void onInvalidStateTransition(
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
index 5d60b4fbe0..daf44891b6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
@@ -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();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java
index b8aaea5de3..81a9ed8efc 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java
@@ -1203,8 +1203,8 @@ public void transition(RMNodeImpl rmNode, RMNodeEvent event) {
/**
* 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 static void deactivateNode(RMNodeImpl rmNode, NodeState finalState) {
/**
* Report node is RUNNING.
- * @param rmNode
- * @param containers
+ * @param rmNode RMNode.
+ * @param containers NMContainerStatus List.
*/
public static void reportNodeRunning(RMNodeImpl rmNode,
List containers) {
@@ -1242,8 +1242,8 @@ public static void reportNodeRunning(RMNodeImpl rmNode,
/**
* 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) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
index 8772ddb44e..4ccc30ce39 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
@@ -314,6 +314,7 @@ public List getTransferredContainers(
* Add blacklisted NodeIds to the list that is passed.
*
* @param app application attempt.
+ * @return blacklisted NodeIds.
*/
public List getBlacklistedNodes(final SchedulerApplicationAttempt app) {
@@ -850,6 +851,9 @@ public void killAllAppsInQueue(String queueName)
/**
* Process resource update on a node.
+ *
+ * @param nm RMNode.
+ * @param resourceOption resourceOption.
*/
public void updateNodeResource(RMNode nm,
ResourceOption resourceOption) {
@@ -1329,6 +1333,7 @@ protected void normalizeResourceRequests(List asks) {
* Normalize a list of resource requests
* using queue maximum resource allocations.
* @param asks resource requests
+ * @param queueName queue Name.
*/
protected void normalizeResourceRequests(List asks,
String queueName) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ApplicationPlacementAllocatorFactory.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ApplicationPlacementAllocatorFactory.java
index 71d657debe..33504a5cea 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ApplicationPlacementAllocatorFactory.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ApplicationPlacementAllocatorFactory.java
@@ -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 getAppPlacementAllocator(
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/MutableConfigurationProvider.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/MutableConfigurationProvider.java
index b44e2bf650..a9059872af 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/MutableConfigurationProvider.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/MutableConfigurationProvider.java
@@ -82,6 +82,7 @@ void confirmPendingMutation(LogMutation pendingMutation,
/**
* Get the last updated scheduler config version.
* @return Last updated scheduler config version.
+ * @throws Exception exception occurs.
*/
long getConfigVersion() throws Exception;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/NodeFilter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/NodeFilter.java
index 7b3e7a2ce7..ce1f375d24 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/NodeFilter.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/NodeFilter.java
@@ -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);
}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/PreemptableResourceScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/PreemptableResourceScheduler.java
index b73c538669..249637c3a6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/PreemptableResourceScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/PreemptableResourceScheduler.java
@@ -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);
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/QueueMetrics.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/QueueMetrics.java
index 0bfee4d335..82bff453aa 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/QueueMetrics.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/QueueMetrics.java
@@ -314,7 +314,7 @@ public synchronized QueueMetrics getUserMetrics(String userName) {
* QueueMetrics (B)
* metrics
*
- * @param partition
+ * @param partition Node Partition
* @return QueueMetrics
*/
public synchronized QueueMetrics getPartitionQueueMetrics(String partition) {
@@ -603,7 +603,7 @@ public void setAvailableResourcesToQueue(String partition, Resource limit) {
/**
* 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 void setAvailableResourcesToQueue(Resource limit) {
* 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 void setAvailableResourcesToUser(String partition, String user,
* 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 @@ private void computeAllocateResources(int containers, Resource res,
/**
* 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());
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ResourceScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ResourceScheduler.java
index dcb6edd3ba..84f3467703 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ResourceScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ResourceScheduler.java
@@ -49,7 +49,8 @@ public interface ResourceScheduler extends YarnScheduler, Recoverable {
/**
* Re-initialize the ResourceScheduler.
* @param conf configuration
- * @throws IOException
+ * @param rmContext RMContext.
+ * @throws IOException an I/O exception has occurred.
*/
void reinitialize(Configuration conf, RMContext rmContext) throws IOException;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedContainerChangeRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedContainerChangeRequest.java
index 94b006cdb2..fb3181e0b2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedContainerChangeRequest.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedContainerChangeRequest.java
@@ -65,7 +65,8 @@ public RMContext getRmContext() {
}
/**
* 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
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
index 2c84d39924..5121453e39 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
@@ -801,6 +801,7 @@ List pullContainersToTransfer() {
* Called when AM heartbeats. These containers were recovered by the RM after
* the AM had registered. They are reported to the AM in the
* AllocateResponse#containersFromPreviousAttempts.
+ * @return Container List.
*/
public List pullPreviousAttemptContainers() {
writeLock.lock();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
index 2d1ddd70cf..1ffd6a758f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
@@ -246,6 +246,8 @@ public synchronized Resource getTotalResource() {
/**
* 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) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerUtils.java
index 05370c6c52..1c7446b493 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerUtils.java
@@ -199,6 +199,12 @@ private static ContainerStatus createAbnormalContainerStatus(
/**
* 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 static void normalizeRequest(
* 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 @@ private static void checkQueueLabelInLabelManager(String labelExpression,
/**
* 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 queueLabels,
String labelExpression, RMContext rmContext) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
index a975ad90bd..e06517bf48 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
@@ -61,12 +61,13 @@
public interface YarnScheduler extends EventHandler {
/**
- * 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 @@ Allocation allocate(ApplicationAttemptId appAttemptId,
/**
* 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 @@ ApplicationResourceUsageReport getAppResourceUsageReport(
/**
* 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 true if the user has the permission,
* false otherwise
*/
@@ -212,7 +215,8 @@ boolean checkAccess(UserGroupInformation callerUGI,
/**
* 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 @@ boolean checkAccess(UserGroupInformation callerUGI,
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 void preValidateMoveApplication(ApplicationId appId,
* 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 void preValidateMoveApplication(ApplicationId appId,
* 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 void preValidateMoveApplication(ApplicationId appId,
* 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 void preValidateMoveApplication(ApplicationId appId,
* 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 void preValidateMoveApplication(ApplicationId appId,
* @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 getPlanQueues() throws YarnException;
@@ -322,6 +328,7 @@ void setEntitlement(String queue, QueueEntitlement entitlement)
* @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 Priority checkAndGetApplicationPriority(Priority priorityRequestedByApp,
* @param user who submitted the application
*
* @return updated priority
+ * @throws YarnException when yarn exception occur.
*/
public Priority updateApplicationPriority(Priority newPriority,
ApplicationId applicationId, SettableFuture
+ *
+ * @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(
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfigValidator.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfigValidator.java
index 5ddc709b57..a0467e21c8 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfigValidator.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfigValidator.java
@@ -119,6 +119,8 @@ public static void validateVCores(Configuration conf) {
*
* @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,
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java
index 757120e162..85731310e4 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerConfiguration.java
@@ -1709,7 +1709,10 @@ public boolean getIntraQueuePreemptionDisabled(String queue,
}
/**
- * 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 getConfiguredNodeLabels(String queuePath) {
Set configuredNodeLabels = new HashSet();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerContext.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerContext.java
index 5795a7e30f..e60a92ffd3 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerContext.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacitySchedulerContext.java
@@ -58,6 +58,7 @@ public interface CapacitySchedulerContext {
/**
* Get the yarn configuration.
+ * @return yarn configuration.
*/
Configuration getConf();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ManagedParentQueue.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ManagedParentQueue.java
index 6867c6baf9..4f7ed40518 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ManagedParentQueue.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ManagedParentQueue.java
@@ -389,9 +389,11 @@ public boolean shouldFailAutoCreationWhenGuaranteedCapacityExceeded() {
}
/**
- * 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 queueManagementChanges)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/PlanQueue.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/PlanQueue.java
index 3bbbffe588..5051c739d5 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/PlanQueue.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/PlanQueue.java
@@ -188,7 +188,8 @@ public float getUserLimitFactor() {
}
/**
- * 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;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/InMemoryConfigurationStore.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/InMemoryConfigurationStore.java
index 0fc0ecc41f..20e33f7023 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/InMemoryConfigurationStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/InMemoryConfigurationStore.java
@@ -112,7 +112,7 @@ protected LinkedList getLogs() {
* 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 Version getConfStoreVersion() throws Exception {
/**
* 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 {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/YarnConfigurationStore.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/YarnConfigurationStore.java
index 425d63f6a6..0f44f43905 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/YarnConfigurationStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/YarnConfigurationStore.java
@@ -126,6 +126,7 @@ public abstract void confirmMutation(LogMutation pendingMutation,
/**
* 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 void confirmMutation(LogMutation pendingMutation,
/**
* Get the last updated config version.
* @return Last updated config version.
+ * @throws Exception On version fetch failure.
*/
public abstract long getConfigVersion() throws Exception;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/queuemanagement/GuaranteedOrZeroCapacityOverTimePolicy.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/queuemanagement/GuaranteedOrZeroCapacityOverTimePolicy.java
index 46bb40aee4..7461ef76aa 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/queuemanagement/GuaranteedOrZeroCapacityOverTimePolicy.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/queuemanagement/GuaranteedOrZeroCapacityOverTimePolicy.java
@@ -304,7 +304,7 @@ private void initializeLeafQueueTemplate(ManagedParentQueue parentQueue)
*
* @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 computeQueueManagementChanges()
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/AllocationTagsManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/AllocationTagsManager.java
index 850da23eff..dc69eba2bb 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/AllocationTagsManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/AllocationTagsManager.java
@@ -405,9 +405,10 @@ public void removeContainer(NodeId nodeId,
/**
* 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 allocationTags) {
@@ -644,7 +645,7 @@ public long getRackCardinalityByOp(String rack, AllocationTags tags,
* 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 getAllocationTagsWithCount(NodeId nodeId) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/Evaluable.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/Evaluable.java
index 6a7e54e470..981e342234 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/Evaluable.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/Evaluable.java
@@ -32,7 +32,7 @@ public interface Evaluable {
* 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;
}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/PlacementConstraintsUtil.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/PlacementConstraintsUtil.java
index 23a3c56695..3f6dbf203c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/PlacementConstraintsUtil.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/PlacementConstraintsUtil.java
@@ -347,7 +347,7 @@ private static boolean canSatisfyConstraints(ApplicationId appId,
* @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,
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/TargetApplicationsNamespace.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/TargetApplicationsNamespace.java
index 97fa3a33c4..d413ae7671 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/TargetApplicationsNamespace.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/constraint/TargetApplicationsNamespace.java
@@ -92,7 +92,7 @@ public Set getNamespaceScope() {
* 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)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/distributed/CentralizedOpportunisticContainerAllocator.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/distributed/CentralizedOpportunisticContainerAllocator.java
index 482612de25..e3ca8b8065 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/distributed/CentralizedOpportunisticContainerAllocator.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/distributed/CentralizedOpportunisticContainerAllocator.java
@@ -77,6 +77,7 @@ public CentralizedOpportunisticContainerAllocator(
* @param tokenSecretManager TokenSecretManager
* @param maxAllocationsPerAMHeartbeat max number of containers to be
* allocated in one AM heartbeat
+ * @param nodeQueueLoadMonitor NodeQueueLoadMonitor.
*/
public CentralizedOpportunisticContainerAllocator(
BaseContainerTokenSecretManager tokenSecretManager,
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationConfiguration.java
index ee80b2265f..b3705c6005 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationConfiguration.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationConfiguration.java
@@ -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 Map getReservationAcls(String
/**
* 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 long getMinSharePreemptionTimeout(String queueName) {
/**
* 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 long getFairSharePreemptionTimeout(String queueName) {
/**
* 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 =
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java
index 7a5bad5d58..7fab417d89 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java
@@ -189,6 +189,11 @@ public void serviceStop() throws Exception {
* 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)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
index 3b7055c757..0218eb3e8c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
@@ -131,6 +131,7 @@ public FSAppAttempt(FairScheduler scheduler,
/**
* Get metrics reference from containing queue.
+ * @return metrics reference from containing queue.
*/
public QueueMetrics getMetrics() {
return queue.getMetrics();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java
index 0479dd7cc4..7a643ef929 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java
@@ -483,6 +483,7 @@ public boolean isEmpty() {
/**
* 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;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java
index fea2dc0fe8..3e99ebae9f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java
@@ -304,7 +304,10 @@ public void setFairShare(Resource fairShare) {
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 boolean isPreemptable() {
*
* 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 @@ private void updatePreemptionVariables() {
/**
* Gets the children of this queue, if any.
+ *
+ * @return the children of this queue.
*/
public abstract List getChildQueues();
@@ -420,6 +425,8 @@ public abstract void collectSchedulerApplications(
/**
* 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 @@ boolean assignContainerPreCheck(FSSchedulerNode node) {
/**
* 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;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java
index a865d7543d..32a3b7be4b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java
@@ -465,6 +465,12 @@ public int getContinuousSchedulingSleepMs() {
* 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 @@ protected void addApplication(ApplicationId applicationId,
/**
* 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,
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/MaxRunningAppsEnforcer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/MaxRunningAppsEnforcer.java
index fb3a2c37f5..29501540c1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/MaxRunningAppsEnforcer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/MaxRunningAppsEnforcer.java
@@ -119,6 +119,8 @@ public boolean exceedQueueMaxRunningApps(FSQueue queue) {
/**
* 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 void trackRunnableApp(FSAppAttempt app) {
/**
* 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 void updateRunnabilityOnReload() {
*
* 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 @@ private void updateAppsRunnability(List>
/**
* 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 void untrackRunnableApp(FSAppAttempt app) {
}
/**
- * 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 void untrackNonRunnableApp(FSAppAttempt app) {
/**
* 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> appLists) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java
index 07cbb1d708..1b12e563ab 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java
@@ -543,6 +543,8 @@ private void removeQueue(FSQueue queue) {
/**
* 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 FSQueue getQueue(String name) {
/**
* 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 boolean exists(String name) {
/**
* Get a collection of all leaf queues.
+ * @return a collection of all leaf queues.
*/
public Collection getLeafQueues() {
synchronized (queues) {
@@ -572,6 +579,7 @@ public Collection getLeafQueues() {
/**
* Get a collection of all queues.
+ * @return a collection of all queues.
*/
public Collection getQueues() {
synchronized (queues) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/Schedulable.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/Schedulable.java
index bd1ff7ada2..ee393dffe6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/Schedulable.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/Schedulable.java
@@ -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);
/**
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/SchedulingPolicy.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/SchedulingPolicy.java
index 1fed9b08c5..8ec455a6bc 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/SchedulingPolicy.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/SchedulingPolicy.java
@@ -84,7 +84,7 @@ public static SchedulingPolicy getInstance(
*
* @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")
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/policies/ComputeFairShares.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/policies/ComputeFairShares.java
index 97bb4c5617..6d9cad25ab 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/policies/ComputeFairShares.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/policies/ComputeFairShares.java
@@ -45,9 +45,9 @@ private 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 static void computeShares(
* 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,
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/placement/MultiNodeLookupPolicy.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/placement/MultiNodeLookupPolicy.java
index 662e34d1dc..509187823b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/placement/MultiNodeLookupPolicy.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/placement/MultiNodeLookupPolicy.java
@@ -51,6 +51,8 @@ public interface MultiNodeLookupPolicy {
*
* @param nodes
* a collection working nm's.
+ * @param partition
+ * node label
*/
void addAndRefreshNodesSet(Collection nodes, String partition);
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/policy/SchedulableEntity.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/policy/SchedulableEntity.java
index e2a690947a..3c5ef26c0c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/policy/SchedulableEntity.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/policy/SchedulableEntity.java
@@ -29,35 +29,43 @@
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();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/AMRMTokenSecretManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/AMRMTokenSecretManager.java
index b398721c81..59fdc57234 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/AMRMTokenSecretManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/AMRMTokenSecretManager.java
@@ -76,7 +76,9 @@ public class AMRMTokenSecretManager extends
new HashSet();
/**
- * 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 MasterKeyData getMasterKey() {
/**
* Populate persisted password of AMRMToken back to AMRMTokenSecretManager.
+ * @param token AMRMTokenIdentifier.
+ * @throws IOException an I/O exception has occurred.
*/
public void addPersistedPassword(Token token)
throws IOException {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
index d0e0bf6174..8040ce9771 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
@@ -632,7 +632,9 @@ private boolean skipTokenRenewal(Token> token)
}
/**
- * 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)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
index e3596fa34c..1f686c96f9 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
@@ -262,7 +262,7 @@ public void unregisterApplicationAttempt(ApplicationAttemptId appAttemptId) {
/**
* 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();
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/QueueACLsManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/QueueACLsManager.java
index 96e14c8674..af176a0454 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/QueueACLsManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/QueueACLsManager.java
@@ -52,7 +52,7 @@ public QueueACLsManager(ResourceScheduler scheduler, Configuration conf) {
/**
* 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(
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/RMContainerTokenSecretManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/RMContainerTokenSecretManager.java
index 54cd67cf31..0cb2eee55e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/RMContainerTokenSecretManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/RMContainerTokenSecretManager.java
@@ -193,6 +193,7 @@ public Token createContainerToken(ContainerId containerId,
* @param containerType Container Type
* @param execType Execution Type
* @param allocationRequestId allocationRequestId
+ * @param allocationTags allocation Tags
* @return the container-token
*/
public Token createContainerToken(ContainerId containerId,
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/volume/csi/VolumeManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/volume/csi/VolumeManager.java
index 32563cb367..b67d143d9f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/volume/csi/VolumeManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/volume/csi/VolumeManager.java
@@ -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 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.
*/
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebServiceProtocol.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebServiceProtocol.java
index 4034ed7afc..47de8ee591 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebServiceProtocol.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebServiceProtocol.java
@@ -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 @@ String dumpSchedulerLogs(String time, HttpServletRequest hsr)
* 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 @@ ActivitiesInfo getActivities(HttpServletRequest hsr, String nodeId,
* 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;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerInfo.java
index 442a54ceee..245582fd57 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerInfo.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerInfo.java
@@ -50,7 +50,7 @@ public FairSchedulerInfo(FairScheduler fs) {
/**
* Get the fair share assigned to the appAttemptId.
- * @param appAttemptId
+ * @param appAttemptId the application attempt id
* @return The fair share assigned to the appAttemptId,
* FairSchedulerInfo#INVALID_FAIR_SHARE if the scheduler does
* not know about this application attempt.
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.java
index 9804a36099..446b7928bf 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.java
@@ -154,6 +154,7 @@ protected FairSchedulerQueueInfoList getChildQueues(FSQueue queue,
/**
* 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 float getSteadyFairShareMemoryFraction() {
/**
* 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 float getFairShareMemoryFraction() {
/**
* 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 ResourceInfo getDemandResources() {
/**
* 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 float getUsedMemoryFraction() {
/**
* 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 float getMaxResourcesFraction() {
/**
* Returns the name of the scheduling policy used by this queue.
+ * @return SchedulingPolicy.
*/
public String getSchedulingPolicy() {
return schedulingPolicy;