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 14950cac1cf..afa85483d11 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 class NodesListManager extends CompositeService implements
}
/**
- * Refresh the nodes gracefully
+ * Refresh the nodes gracefully.
*
- * @param yarnConf
+ * @param yarnConf yarn configuration.
* @param timeout decommission timeout, null means default timeout.
- * @throws IOException
- * @throws YarnException
+ * @throws IOException io error occur.
+ * @throws YarnException exceptions from yarn servers.
*/
public void refreshNodesGracefully(Configuration yarnConf, Integer timeout)
throws IOException, YarnException {
@@ -685,6 +685,9 @@ public class NodesListManager extends CompositeService implements
/**
* A NodeId instance needed upon startup for populating inactive nodes Map.
* It only knows the hostname/ip and marks the port to -1 or invalid.
+ *
+ * @param host host name.
+ * @return node id.
*/
public static NodeId createUnknownNodeId(String host) {
return NodeId.newInstance(host, -1);
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 cc54d0b5861..1b3a49433fd 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 class RMAuditLogger {
* @param description Some additional information as to why the operation
* failed.
* @param appId ApplicationId in which operation was performed.
+ * @param attemptId Application Attempt Id in which operation was performed.
*
*
* 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 32369ba53ed..1a0047b8215 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 de7a7626600..39a27e73feb 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 @@ public class RMServerUtils {
/**
* Utility method to validate a list resource requests, by ensuring that the
- * requested memory/vcore is non-negative and not greater than max
+ * requested memory/vcore is non-negative and not greater than max.
+ *
+ * @param ask resource request.
+ * @param maximumAllocation Maximum Allocation.
+ * @param queueName queue name.
+ * @param scheduler YarnScheduler.
+ * @param rmContext RMContext.
+ * @param nodeLabelsEnabled the node labels feature enabled.
+ * @throws InvalidResourceRequestException when there is invalid request.
*/
public static void normalizeAndValidateRequests(List ask,
Resource maximumAllocation, String queueName, YarnScheduler scheduler,
@@ -264,9 +272,13 @@ public class RMServerUtils {
/**
* 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 @@ public class RMServerUtils {
* application master.
* @param appAttemptId Application attempt Id
* @throws InvalidContainerReleaseException
+ * an Application Master tries to release containers not belonging to it using.
*/
public static void
validateContainerReleaseRequest(List containerReleaseList,
@@ -394,7 +407,7 @@ public class RMServerUtils {
* @param module like AdminService or NodeLabelManager
* @param LOG the logger to use
* @return {@link UserGroupInformation} of the current user
- * @throws IOException
+ * @throws IOException an I/O exception has occurred.
*/
public static UserGroupInformation verifyAdminAccess(
YarnAuthorizationProvider authorizer, String method, String module,
@@ -509,7 +522,9 @@ public class RMServerUtils {
/**
* Find all configs whose name starts with
* YarnConfiguration.RM_PROXY_USER_PREFIX, and add a record for each one by
- * replacing the prefix with ProxyUsers.CONF_HADOOP_PROXYUSER
+ * replacing the prefix with ProxyUsers.CONF_HADOOP_PROXYUSER.
+ *
+ * @param conf Configuration.
*/
public static void processRMProxyUsersConf(Configuration conf) {
Map 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 1bcfdbbafa8..da500add4cb 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 @@ public class ResourceManager extends CompositeService
/**
* Create RMDelegatedNodeLabelsUpdater based on configuration.
+ * @return RMDelegatedNodeLabelsUpdater.
*/
protected RMDelegatedNodeLabelsUpdater createRMDelegatedNodeLabelsUpdater() {
if (conf.getBoolean(YarnConfiguration.NODE_LABELS_ENABLED,
@@ -1813,9 +1814,9 @@ public class ResourceManager extends CompositeService
}
/**
- * Retrieve RM bind address from configuration
+ * Retrieve RM bind address from configuration.
*
- * @param conf
+ * @param conf Configuration.
* @return InetSocketAddress
*/
public static InetSocketAddress getBindAddress(Configuration conf) {
@@ -1826,8 +1827,8 @@ public class ResourceManager extends CompositeService
/**
* Deletes the RMStateStore
*
- * @param conf
- * @throws Exception
+ * @param conf Configuration.
+ * @throws Exception error occur.
*/
@VisibleForTesting
static void deleteRMStateStore(Configuration conf) throws Exception {
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 b0b148c117f..cf2aed41e00 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 @@ public class ResourceTrackerService extends AbstractService implements
/**
* Load DynamicResourceConfiguration from dynamic-resources.xml.
- * @param conf
- * @throws IOException
+ * @param conf Configuration.
+ * @throws IOException an I/O exception has occurred.
*/
public void loadDynamicResourceConfiguration(Configuration conf)
throws IOException {
@@ -219,7 +219,7 @@ public class ResourceTrackerService extends AbstractService implements
/**
* Update DynamicResourceConfiguration with new configuration.
- * @param conf
+ * @param conf DynamicResourceConfiguration.
*/
public void updateDynamicResourceConfiguration(
DynamicResourceConfiguration conf) {
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 3382ead7412..99c691c7733 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 @@ public class CapacitySchedulerPreemptionUtils {
* stop preempt container when: all major resource type
* {@literal <=} 0 for to-preempt.
* This is default preemption behavior of inter-queue preemption
+ * @param curCandidates RMContainer Set.
* @return should we preempt rmContainer. If we should, deduct from
* 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 7563c36b924..2c4c7164fed 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 b0b98ad9b48..161e104e75b 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 @@ public class NodeAttributesManagerImpl extends NodeAttributesManager {
}
/**
- * @param nodeAttributeMapping
- * @param newAttributesToBeAdded
- * @param isRemoveOperation : to indicate whether its a remove operation.
+ * Validate for attributes.
+ *
+ * @param nodeAttributeMapping NodeAttribute Mapping
+ * @param newAttributesToBeAdded new Attributes ToBeAdded
+ * @param isRemoveOperation : to indicate whether it's a remove operation.
* @return Map of String to Map of NodeAttribute to AttributeValue
* @throws IOException : on invalid mapping in the current request or against
* already existing NodeAttributes.
@@ -328,12 +330,13 @@ public class NodeAttributesManagerImpl extends NodeAttributesManager {
}
/**
+ * Validate For AttributeType Mismatch.
*
- * @param isRemoveOperation
- * @param attribute
- * @param newAttributes
- * @return Whether its a new Attribute added
- * @throws IOException
+ * @param isRemoveOperation to indicate whether it's a remove operation.
+ * @param attribute NodeAttribute.
+ * @param newAttributes new Attributes.
+ * @return Whether it's a new Attribute added
+ * @throws IOException an I/O exception of some sort has occurred.
*/
private boolean validateForAttributeTypeMismatch(boolean isRemoveOperation,
NodeAttribute attribute,
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 ba0c430d77f..a4f74a91f7e 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 @@ public class RMDelegatedNodeLabelsUpdater extends CompositeService {
/**
* 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 301b3a314dc..bab17775b43 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 @@ public final class PlacementFactory {
* @param ruleStr The name of the class to instantiate
* @param conf The configuration object to set for the rule
* @return Created class instance
+ * @throws ClassNotFoundException
+ * no definition for the class with the specified name could be found.
*/
public static PlacementRule getPlacementRule(String ruleStr,
Configuration conf)
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 50d686ad370..ca4c9e1d7a2 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 e8e419c64eb..f2c5f5422d8 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 class VariableContext {
/**
* Returns the dataset referenced by the name.
* @param name Name of the set to be returned.
+ * @return the dataset referenced by the name.
*/
public Set 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 a93ed1bc6b4..49e25eb8f13 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 abstract class RMStateStore extends AbstractService {
/**
* Dispatcher used to send state operation completion events to
- * ResourceManager services
+ * ResourceManager services.
+ *
+ * @param dispatcher Dispatcher.
*/
public void setRMDispatcher(Dispatcher dispatcher) {
this.rmDispatcher = dispatcher;
@@ -827,13 +829,18 @@ public abstract class RMStateStore extends AbstractService {
/**
* Derived classes initialize themselves using this method.
+ *
+ * @param conf Configuration.
+ * @throws Exception error occur.
*/
protected abstract void initInternal(Configuration conf) throws Exception;
/**
* Derived classes start themselves using this method.
* The base class is started and the event dispatcher is ready to use at
- * this point
+ * this point.
+ *
+ * @throws Exception error occur.
*/
protected abstract void startInternal() throws Exception;
@@ -846,7 +853,9 @@ public abstract class RMStateStore extends AbstractService {
/**
* Derived classes close themselves using this method.
* The base class will be closed and the event dispatcher will be shutdown
- * after this
+ * after this.
+ *
+ * @throws Exception error occur.
*/
protected abstract void closeInternal() throws Exception;
@@ -860,6 +869,8 @@ public abstract class RMStateStore extends AbstractService {
* 5) Within a major upgrade, say 1.2 to 2.0:
* throw exception and indicate user to use a separate upgrade tool to
* upgrade RM state.
+ *
+ * @throws Exception error occur.
*/
public void checkVersion() throws Exception {
Version loadedVersion = loadVersion();
@@ -884,22 +895,28 @@ public abstract class RMStateStore extends AbstractService {
/**
* Derived class use this method to load the version information from state
* store.
+ * @throws Exception error occur.
+ * @return current version.
*/
protected abstract Version loadVersion() throws Exception;
/**
* Derived class use this method to store the version information.
+ * @throws Exception error occur.
*/
protected abstract void storeVersion() throws Exception;
/**
* Get the current version of the underlying state store.
+ * @return current version.
*/
protected abstract Version getCurrentVersion();
/**
* Get the current epoch of RM and increment the value.
+ * @throws Exception error occur.
+ * @return current epoch.
*/
public abstract long getAndIncrementEpoch() throws Exception;
@@ -907,6 +924,9 @@ public abstract class RMStateStore extends AbstractService {
* Compute the next epoch value by incrementing by one.
* Wraps around if the epoch range is exceeded so that
* when federation is enabled epoch collisions can be avoided.
+ *
+ * @param epoch epoch value.
+ * @return next epoch value.
*/
protected long nextEpoch(long epoch){
long epochVal = epoch - baseEpoch + 1;
@@ -920,7 +940,9 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* The derived class must recover state from the store and return a new
* RMState object populated with that state
- * This must not be called on the dispatcher thread
+ * This must not be called on the dispatcher thread.
+ * @throws Exception error occur.
+ * @return RMState.
*/
public abstract RMState loadState() throws Exception;
@@ -928,7 +950,9 @@ public abstract class RMStateStore extends AbstractService {
* Non-Blocking API
* ResourceManager services use this to store the application's state
* This does not block the dispatcher threads
- * RMAppStoredEvent will be sent on completion to notify the RMApp
+ * RMAppStoredEvent will be sent on completion to notify the RMApp.
+ *
+ * @param app rmApp.
*/
@SuppressWarnings("unchecked")
public void storeNewApplication(RMApp app) {
@@ -969,6 +993,10 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* Derived classes must implement this method to store the state of an
* application.
+ *
+ * @param appId application Id.
+ * @param appStateData application StateData.
+ * @throws Exception error occur.
*/
protected abstract void storeApplicationStateInternal(ApplicationId appId,
ApplicationStateData appStateData) throws Exception;
@@ -981,7 +1009,9 @@ public abstract class RMStateStore extends AbstractService {
* Non-blocking API
* ResourceManager services call this to store state on an application attempt
* This does not block the dispatcher threads
- * RMAppAttemptStoredEvent will be sent on completion to notify the RMAppAttempt
+ * RMAppAttemptStoredEvent will be sent on completion to notify the RMAppAttempt.
+ *
+ * @param appAttempt RM AppAttempt.
*/
public void storeNewApplicationAttempt(RMAppAttempt appAttempt) {
Credentials credentials = getCredentialsFromAppAttempt(appAttempt);
@@ -1011,7 +1041,11 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to store the state of an
- * application attempt
+ * application attempt.
+ *
+ * @param attemptId Application AttemptId.
+ * @param attemptStateData Application AttemptStateData.
+ * @throws Exception error occur.
*/
protected abstract void storeApplicationAttemptStateInternal(
ApplicationAttemptId attemptId,
@@ -1023,7 +1057,10 @@ public abstract class RMStateStore extends AbstractService {
/**
* RMDTSecretManager call this to store the state of a delegation token
- * and sequence number
+ * and sequence number.
+ *
+ * @param rmDTIdentifier RMDelegationTokenIdentifier.
+ * @param renewDate token renew date.
*/
public void storeRMDelegationToken(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) {
@@ -1034,14 +1071,20 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to store the state of
- * RMDelegationToken and sequence number
+ * RMDelegationToken and sequence number.
+ *
+ * @param rmDTIdentifier RMDelegationTokenIdentifier.
+ * @param renewDate token renew date.
+ * @throws Exception error occur.
*/
protected abstract void storeRMDelegationTokenState(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate)
throws Exception;
/**
- * RMDTSecretManager call this to remove the state of a delegation token
+ * RMDTSecretManager call this to remove the state of a delegation token.
+ *
+ * @param rmDTIdentifier RMDelegationTokenIdentifier.
*/
public void removeRMDelegationToken(
RMDelegationTokenIdentifier rmDTIdentifier) {
@@ -1051,14 +1094,20 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
- * Derived classes must implement this method to remove the state of RMDelegationToken
+ * Derived classes must implement this method to remove the state of RMDelegationToken.
+ *
+ * @param rmDTIdentifier RMDelegationTokenIdentifier.
+ * @throws Exception error occurs.
*/
protected abstract void removeRMDelegationTokenState(
RMDelegationTokenIdentifier rmDTIdentifier) throws Exception;
/**
* RMDTSecretManager call this to update the state of a delegation token
- * and sequence number
+ * and sequence number.
+ *
+ * @param rmDTIdentifier RMDelegationTokenIdentifier.
+ * @param renewDate token renew date.
*/
public void updateRMDelegationToken(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) {
@@ -1069,14 +1118,20 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to update the state of
- * RMDelegationToken and sequence number
+ * RMDelegationToken and sequence number.
+ *
+ * @param rmDTIdentifier RMDelegationTokenIdentifier.
+ * @param renewDate token renew date.
+ * @throws Exception error occurs.
*/
protected abstract void updateRMDelegationTokenState(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate)
throws Exception;
/**
- * RMDTSecretManager call this to store the state of a master key
+ * RMDTSecretManager call this to store the state of a master key.
+ *
+ * @param delegationKey DelegationToken Master Key.
*/
public void storeRMDTMasterKey(DelegationKey delegationKey) {
handleStoreEvent(new RMStateStoreRMDTMasterKeyEvent(delegationKey,
@@ -1086,13 +1141,18 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to store the state of
- * DelegationToken Master Key
+ * DelegationToken Master Key.
+ *
+ * @param delegationKey DelegationToken Master Key.
+ * @throws Exception error occur.
*/
protected abstract void storeRMDTMasterKeyState(DelegationKey delegationKey)
throws Exception;
/**
- * RMDTSecretManager call this to remove the state of a master key
+ * RMDTSecretManager call this to remove the state of a master key.
+ *
+ * @param delegationKey DelegationToken Master Key.
*/
public void removeRMDTMasterKey(DelegationKey delegationKey) {
handleStoreEvent(new RMStateStoreRMDTMasterKeyEvent(delegationKey,
@@ -1101,6 +1161,10 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking Apis to maintain reservation state.
+ *
+ * @param reservationAllocation reservation Allocation.
+ * @param planName plan Name.
+ * @param reservationIdName reservationId Name.
*/
public void storeNewReservation(
ReservationAllocationStateProto reservationAllocation, String planName,
@@ -1120,6 +1184,11 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* Derived classes must implement this method to store the state of
* a reservation allocation.
+ *
+ * @param reservationAllocation reservation Allocation.
+ * @param planName plan Name.
+ * @param reservationIdName reservationId Name.
+ * @throws Exception error occurs.
*/
protected abstract void storeReservationState(
ReservationAllocationStateProto reservationAllocation, String planName,
@@ -1129,6 +1198,10 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* Derived classes must implement this method to remove the state of
* a reservation allocation.
+ *
+ * @param planName plan Name.
+ * @param reservationIdName reservationId Name.
+ * @throws Exception exception occurs.
*/
protected abstract void removeReservationState(String planName,
String reservationIdName) throws Exception;
@@ -1136,21 +1209,31 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to remove the state of
- * DelegationToken Master Key
+ * DelegationToken Master Key.
+ *
+ * @param delegationKey DelegationKey.
+ * @throws Exception exception occurs.
*/
protected abstract void removeRMDTMasterKeyState(DelegationKey delegationKey)
throws Exception;
/**
* Blocking API Derived classes must implement this method to store or update
- * the state of AMRMToken Master Key
+ * the state of AMRMToken Master Key.
+ *
+ * @param amrmTokenSecretManagerState amrmTokenSecretManagerState.
+ * @param isUpdate true, update; otherwise not update.
+ * @throws Exception exception occurs.
*/
protected abstract void storeOrUpdateAMRMTokenSecretManagerState(
AMRMTokenSecretManagerState amrmTokenSecretManagerState, boolean isUpdate)
throws Exception;
/**
- * Store or Update state of AMRMToken Master Key
+ * Store or Update state of AMRMToken Master Key.
+ *
+ * @param amrmTokenSecretManagerState amrmTokenSecretManagerState.
+ * @param isUpdate true, update; otherwise not update.
*/
public void storeOrUpdateAMRMTokenSecretManager(
AMRMTokenSecretManagerState amrmTokenSecretManagerState, boolean isUpdate) {
@@ -1165,6 +1248,8 @@ public abstract class RMStateStore extends AbstractService {
* store
* This does not block the dispatcher threads
* There is no notification of completion for this operation.
+ *
+ * @param app RMApp.
*/
@SuppressWarnings("unchecked")
public void removeApplication(RMApp app) {
@@ -1183,7 +1268,10 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to remove the state of an
- * application and its attempts
+ * application and its attempts.
+ *
+ * @param appState ApplicationStateData.
+ * @throws Exception error occurs.
*/
protected abstract void removeApplicationStateInternal(
ApplicationStateData appState) throws Exception;
@@ -1194,6 +1282,8 @@ public abstract class RMStateStore extends AbstractService {
* store
* This does not block the dispatcher threads
* There is no notification of completion for this operation.
+ *
+ * @param applicationAttemptId applicationAttemptId.
*/
@SuppressWarnings("unchecked")
public synchronized void removeApplicationAttempt(
@@ -1206,6 +1296,8 @@ public abstract class RMStateStore extends AbstractService {
* Blocking API
* Derived classes must implement this method to remove the state of specified
* attempt.
+ * @param attemptId application attempt id.
+ * @throws Exception exception occurs.
*/
protected abstract void removeApplicationAttemptInternal(
ApplicationAttemptId attemptId) throws Exception;
@@ -1316,7 +1408,7 @@ public abstract class RMStateStore extends AbstractService {
/**
* EventHandler implementation which forward events to the FSRMStateStore
- * This hides the EventHandle methods of the store from its public interface
+ * This hides the EventHandle methods of the store from its public interface
*/
private final class ForwardingEventHandler
implements EventHandler {
@@ -1328,16 +1420,18 @@ public abstract class RMStateStore extends AbstractService {
}
/**
- * Derived classes must implement this method to delete the state store
- * @throws Exception
+ * Derived classes must implement this method to delete the state store.
+ *
+ * @throws Exception exception occurs.
*/
public abstract void deleteStore() throws Exception;
/**
* Derived classes must implement this method to remove application from the
- * state store
- *
- * @throws Exception
+ * state store.
+ *
+ * @param removeAppId application Id.
+ * @throws Exception exception occurs.
*/
public abstract void removeApplication(ApplicationId removeAppId)
throws Exception;
@@ -1362,6 +1456,8 @@ public abstract class RMStateStore extends AbstractService {
/**
* ProxyCAManager calls this to store the CA Certificate and Private Key.
+ * @param caCert X509Certificate.
+ * @param caPrivateKey PrivateKey.
*/
public void storeProxyCACert(X509Certificate caCert,
PrivateKey caPrivateKey) {
@@ -1372,7 +1468,11 @@ public abstract class RMStateStore extends AbstractService {
/**
* Blocking API
* Derived classes must implement this method to store the CA Certificate
- * and Private Key
+ * and Private Key.
+ *
+ * @param caCert X509Certificate.
+ * @param caPrivateKey PrivateKey.
+ * @throws Exception error occurs.
*/
protected abstract void storeProxyCACertState(
X509Certificate caCert, PrivateKey caPrivateKey) throws Exception;
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 870c0ff30a9..13a4d849556 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 cbbeb3d01d0..da5455f7b6e 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 89b4ff0fc7a..fc03d7a948a 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 abstract class AMRMTokenSecretManagerState {
}
/**
- * {@link AMRMTokenSecretManager} current Master key
+ * {@link AMRMTokenSecretManager} current Master key.
+ * @return MasterKey.
*/
@Public
@Unstable
@@ -62,7 +63,8 @@ public abstract class AMRMTokenSecretManagerState {
public abstract void setCurrentMasterKey(MasterKey currentMasterKey);
/**
- * {@link AMRMTokenSecretManager} next Master key
+ * {@link AMRMTokenSecretManager} next Master key.
+ * @return MasterKey.
*/
@Public
@Unstable
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 27e80cd30e3..31972d47129 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 abstract class ApplicationAttemptStateData {
/**
* 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 8b908e56d0a..c94b27770f5 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 abstract class ApplicationStateData {
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 3f350961d59..687890e286e 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 @@ public abstract class AbstractSchedulerPlanFollower implements PlanFollower {
/**
* Add a new reservation queue for reservation currResId for this planQueue.
+ *
+ * @param planQueueName name of the reservable queue.
+ * @param queue the queue for the current {@link Plan}.
+ * @param currResId curr reservationId.
*/
protected abstract void addReservationQueue(String planQueueName, Queue queue,
String currResId);
@@ -399,6 +403,7 @@ public abstract class AbstractSchedulerPlanFollower implements PlanFollower {
* Get plan resources for this planQueue.
*
* @param plan the current {@link Plan} being considered
+ * @param queue the queue for the current {@link Plan}
* @param clusterResources the resources available in the cluster
*
* @return the resources allocated to the specified {@link Plan}
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 39b69249f94..894abd0f073 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 class PeriodicRLESparseResourceAllocation
* maximum capacity.
* @param period periodic offset at which capacities are evaluated.
* @return the maximum {@link Resource} across the specified time instants.
- * @return true if removal is successful, false otherwise
*/
public Resource getMaximumPeriodicCapacity(long tick, long period) {
Resource maxResource;
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 949b34e8bb5..fbf54a18131 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 @@ public interface RMApp extends EventHandler {
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 ca88b8be328..e73b66a259d 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 class RMAppImpl implements RMApp, Recoverable {
}
/**
- * catch the InvalidStateTransition.
- * @param state
- * @param rmAppEventType
- */
+ * catch the InvalidStateTransition.
+ *
+ * @param state RMAppState.
+ * @param rmAppEventType RMAppEventType.
+ */
protected void onInvalidStateTransition(RMAppEventType rmAppEventType,
RMAppState state){
/* TODO fail the application on the failed transition */
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 5d78c8b354d..5044169607b 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 7e417cc9dc8..22d4eaafd75 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 class RMContainerImpl implements RMContainer {
/**
* 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 5d60b4fbe06..daf44891b6f 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 b8aaea5de33..81a9ed8efc1 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 class RMNodeImpl implements RMNode, EventHandler {
/**
* Put a node in deactivated (decommissioned or shutdown) status.
- * @param rmNode
- * @param finalState
+ * @param rmNode RMNode.
+ * @param finalState NodeState.
*/
public static void deactivateNode(RMNodeImpl rmNode, NodeState finalState) {
@@ -1226,8 +1226,8 @@ public class RMNodeImpl implements RMNode, EventHandler {
/**
* 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 class RMNodeImpl implements RMNode, EventHandler {
/**
* 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 8772ddb44e6..4ccc30ce39f 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 abstract class AbstractYarnScheduler
* 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 abstract class AbstractYarnScheduler
/**
* Process resource update on a node.
+ *
+ * @param nm RMNode.
+ * @param resourceOption resourceOption.
*/
public void updateNodeResource(RMNode nm,
ResourceOption resourceOption) {
@@ -1329,6 +1333,7 @@ public abstract class AbstractYarnScheduler
* Normalize a list of resource requests
* using queue maximum resource allocations.
* @param asks resource requests
+ * @param queueName queue Name.
*/
protected void normalizeResourceRequests(List 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 71d657debee..33504a5ceae 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 b44e2bf650a..a9059872af5 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 @@ public interface MutableConfigurationProvider {
/**
* 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 7b3e7a2ce75..ce1f375d249 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 b73c5386690..249637c3a6d 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 0bfee4d3350..82bff453aa0 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 class QueueMetrics implements MetricsSource {
* QueueMetrics (B)
* metrics
*
- * @param partition
+ * @param partition Node Partition
* @return QueueMetrics
*/
public synchronized QueueMetrics getPartitionQueueMetrics(String partition) {
@@ -603,7 +603,7 @@ public class QueueMetrics implements MetricsSource {
/**
* Set Available resources with support for resource vectors.
*
- * @param limit
+ * @param limit Resource.
*/
public void setAvailableResources(Resource limit) {
availableMB.set(limit.getMemorySize());
@@ -631,7 +631,7 @@ public class QueueMetrics implements MetricsSource {
* resources become available.
*
* @param partition Node Partition
- * @param user
+ * @param user Name of the user.
* @param limit resource limit
*/
public void setAvailableResourcesToUser(String partition, String user,
@@ -657,8 +657,8 @@ public class QueueMetrics implements MetricsSource {
* Increment pending resource metrics
*
* @param partition Node Partition
- * @param user
- * @param containers
+ * @param user Name of the user.
+ * @param containers containers count.
* @param res the TOTAL delta of resources note this is different from the
* other APIs which use per container resource
*/
@@ -852,8 +852,8 @@ public class QueueMetrics implements MetricsSource {
/**
* Allocate Resource for container size change.
* @param partition Node Partition
- * @param user
- * @param res
+ * @param user Name of the user
+ * @param res Resource.
*/
public void allocateResources(String partition, String user, Resource res) {
allocatedMB.incr(res.getMemorySize());
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 dcb6edd3ba3..84f3467703b 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 94b006cdb22..fb3181e0b2c 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 class SchedContainerChangeRequest implements
}
/**
* Delta capacity = target - before, so if it is a decrease request, delta
- * capacity will be negative
+ * capacity will be negative.
+ * @return delta Capacity.
*/
public synchronized Resource getDeltaCapacity() {
// Only calculate deltaCapacity once
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 2c84d399242..5121453e395 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 @@ public class SchedulerApplicationAttempt implements SchedulableEntity {
* Called when AM heartbeats. These containers were recovered by the RM after
* the AM had registered. They are reported to the AM in the
* 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 2d1ddd70cf7..1ffd6a758f7 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 abstract class SchedulerNode {
/**
* Check if a container is launched by this node.
+ *
+ * @param containerId containerId.
* @return If the container is launched by the node.
*/
public synchronized boolean isValidContainer(ContainerId containerId) {
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 05370c6c525..1c7446b4936 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 @@ public class SchedulerUtils {
/**
* Utility method to normalize a resource request, by ensuring that the
* requested memory is a multiple of minMemory and is not zero.
+ *
+ * @param ask resource request.
+ * @param resourceCalculator {@link ResourceCalculator} the resource
+ * calculator to use.
+ * @param minimumResource minimum Resource.
+ * @param maximumResource maximum Resource.
*/
@VisibleForTesting
public static void normalizeRequest(
@@ -215,6 +221,12 @@ public class SchedulerUtils {
* Utility method to normalize a resource request, by ensuring that the
* requested memory is a multiple of increment resource and is not zero.
*
+ * @param ask resource request.
+ * @param resourceCalculator {@link ResourceCalculator} the resource
+ * calculator to use.
+ * @param minimumResource minimum Resource.
+ * @param maximumResource maximum Resource.
+ * @param incrementResource increment Resource.
* @return normalized resource
*/
public static Resource getNormalizedResource(
@@ -531,7 +543,14 @@ public class SchedulerUtils {
/**
* Check queue label expression, check if node label in queue's
- * node-label-expression existed in clusterNodeLabels if rmContext != null
+ * node-label-expression existed in clusterNodeLabels if rmContext != null.
+ *
+ * @param queueLabels queue Labels.
+ * @param labelExpression label expression.
+ * @param rmContext rmContext.
+ * @return true, if node label in queue's node-label-expression existed in clusterNodeLabels;
+ * otherwise false.
+ *
*/
public static boolean checkQueueLabelExpression(Set 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 a975ad90bd6..e06517bf484 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 @@ import org.apache.hadoop.thirdparty.com.google.common.util.concurrent.SettableFu
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 @@ public interface YarnScheduler extends EventHandler {
/**
* Get node resource usage report.
- * @param nodeId
+ *
+ * @param nodeId nodeId.
* @return the {@link SchedulerNodeReport} for the node or null
* if nodeId does not point to a defined node.
*/
@@ -191,10 +193,11 @@ public interface YarnScheduler extends EventHandler {
/**
* 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 @@ public interface YarnScheduler extends EventHandler {
/**
* Get the container for the given containerId.
- * @param containerId
+ *
+ * @param containerId the given containerId.
* @return the container for the given containerId.
*/
@LimitedPrivate("yarn")
@@ -220,9 +224,9 @@ public interface YarnScheduler extends EventHandler {
public RMContainer getRMContainer(ContainerId containerId);
/**
- * Moves the given application to the given queue
- * @param appId
- * @param newQueue
+ * Moves the given application to the given queue.
+ * @param appId application Id
+ * @param newQueue the given queue.
* @return the name of the queue the application was placed into
* @throws YarnException if the move cannot be carried out
*/
@@ -246,9 +250,9 @@ public interface YarnScheduler extends EventHandler {
* Completely drain sourceQueue of applications, by moving all of them to
* destQueue.
*
- * @param sourceQueue
- * @param destQueue
- * @throws YarnException
+ * @param sourceQueue sourceQueue.
+ * @param destQueue destQueue.
+ * @throws YarnException when yarn exception occur.
*/
void moveAllApps(String sourceQueue, String destQueue) throws YarnException;
@@ -256,7 +260,7 @@ public interface YarnScheduler extends EventHandler {
* Terminate all applications in the specified queue.
*
* @param queueName the name of queue to be drained
- * @throws YarnException
+ * @throws YarnException when yarn exception occur.
*/
void killAllAppsInQueue(String queueName) throws YarnException;
@@ -266,7 +270,7 @@ public interface YarnScheduler extends EventHandler {
* must be a leaf, etc..).
*
* @param queueName name of the queue to remove
- * @throws YarnException
+ * @throws YarnException when yarn exception occur.
*/
void removeQueue(String queueName) throws YarnException;
@@ -276,7 +280,8 @@ public interface YarnScheduler extends EventHandler {
* attached to existing parent, must have zero entitlement).
*
* @param newQueue the queue being added.
- * @throws YarnException
+ * @throws YarnException when yarn exception occur.
+ * @throws IOException when io exception occur.
*/
void addQueue(Queue newQueue) throws YarnException, IOException;
@@ -289,14 +294,15 @@ public interface YarnScheduler extends EventHandler {
* @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 @@ public interface YarnScheduler extends EventHandler {
* @param applicationId
* Application ID
* @return Updated Priority from scheduler
+ * @throws YarnException when yarn exception occur.
*/
public Priority checkAndGetApplicationPriority(Priority priorityRequestedByApp,
UserGroupInformation user, String queuePath, ApplicationId applicationId)
@@ -339,6 +346,7 @@ public interface YarnScheduler extends EventHandler {
* @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 5ddc709b57c..a0467e21c81 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 final class CapacitySchedulerConfigValidator {
*
* @param queues existing queues
* @param newQueues new queues
+ * @param newConf Capacity Scheduler Configuration.
+ * @throws IOException an I/O exception has occurred.
*/
public static void validateQueueHierarchy(
CSQueueStore queues,
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 757120e1621..85731310e42 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 class CapacitySchedulerConfiguration extends ReservationSchedulerConfigur
}
/**
- * Get configured node labels in a given queuePath
+ * Get configured node labels in a given queuePath.
+ *
+ * @param queuePath queue path.
+ * @return configured node labels.
*/
public Set 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 5795a7e30fa..e60a92ffd33 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 6867c6baf9d..4f7ed405184 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 class ManagedParentQueue extends AbstractManagedParentQueue {
}
/**
- * Asynchronously called from scheduler to apply queue management changes
+ * Asynchronously called from scheduler to apply queue management changes.
*
- * @param queueManagementChanges
+ * @param queueManagementChanges QueueManagementChange List.
+ * @throws IOException an I/O exception has occurred.
+ * @throws SchedulerDynamicEditException when validate and apply QueueManagementChanges fails.
*/
public void validateAndApplyQueueManagementChanges(
List 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 3bbbffe5881..5051c739d5c 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 class PlanQueue extends AbstractManagedParentQueue {
}
/**
- * Determine whether to hide/show the ReservationQueues
+ * Determine whether to hide/show the ReservationQueues.
+ * @return true, show ReservationQueues; false, hide ReservationQueues.
*/
public boolean showReservationsAsQueues() {
return showReservationsAsQueues;
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 0fc0ecc41fa..20e33f70236 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 @@ public class InMemoryConfigurationStore extends YarnConfigurationStore {
* As there is no configuration store for versioning purposes,
* a conf store version is not applicable.
* @return null Conf store version not applicable for this store.
- * @throws Exception
+ * @throws Exception if any exception occurs during getConfStoreVersion.
*/
@Override
public Version getConfStoreVersion() throws Exception {
@@ -123,7 +123,7 @@ public class InMemoryConfigurationStore extends YarnConfigurationStore {
/**
* Configuration mutations not logged (i.e. not persisted). As such, they are
* not persisted and not versioned. Hence, no version information to store.
- * @throws Exception
+ * @throws Exception if any exception occurs during store Version.
*/
@Override
public void storeVersion() throws Exception {
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 425d63f6a66..0f44f439056 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 class YarnConfigurationStore {
/**
* Retrieve the persisted configuration.
* @return configuration as key-value
+ * @throws IOException an I/O exception has occurred.
*/
public abstract Configuration retrieve() throws IOException;
@@ -139,6 +140,7 @@ public abstract class YarnConfigurationStore {
/**
* Get the last updated config version.
* @return Last updated config version.
+ * @throws Exception On version fetch failure.
*/
public abstract long getConfigVersion() throws Exception;
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 46bb40aee47..7461ef76aa2 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 @@ public class GuaranteedOrZeroCapacityOverTimePolicy
*
* @return List of Queue Management change suggestions which could potentially
* be committed/rejected by the scheduler due to validation failures
- * @throws SchedulerDynamicEditException
+ * @throws SchedulerDynamicEditException when compute queueManagement changes fails.
*/
@Override
public List 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 850da23effb..dc69eba2bbb 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 class AllocationTagsManager {
/**
* Helper method to just remove the tags associated with a container.
- * @param nodeId
- * @param applicationId
- * @param allocationTags
+ *
+ * @param nodeId nodeId.
+ * @param applicationId application Id
+ * @param allocationTags application Tags.
*/
public void removeTags(NodeId nodeId, ApplicationId applicationId,
Set allocationTags) {
@@ -644,7 +645,7 @@ public class AllocationTagsManager {
* Returns a map whose key is the allocation tag and value is the
* count of allocations with this tag.
*
- * @param nodeId
+ * @param nodeId nodeId.
* @return allocation tag to count mapping
*/
public Map 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 6a7e54e4708..981e342234e 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 23a3c566959..3f6dbf203c2 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 @@ public final class PlacementConstraintsUtil {
* @param atm allocation tags manager
* @param dcOpt optional diagnostics collector
* @return true if the given node satisfies the constraint of the request
- * @throws InvalidAllocationTagsQueryException
+ * @throws InvalidAllocationTagsQueryException if given string is not in valid format.
*/
public static boolean canSatisfyConstraints(ApplicationId applicationId,
SchedulingRequest request, SchedulerNode schedulerNode,
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 97fa3a33c41..d413ae76716 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 abstract class TargetApplicationsNamespace implements
* in this method.
*
* @param target a generic type target that impacts this evaluation.
- * @throws InvalidAllocationTagsQueryException
+ * @throws InvalidAllocationTagsQueryException if given string is not in valid format.
*/
@Override
public void evaluate(TargetApplications target)
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 482612de250..e3ca8b8065b 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 class CentralizedOpportunisticContainerAllocator extends
* @param tokenSecretManager TokenSecretManager
* @param maxAllocationsPerAMHeartbeat max number of containers to be
* allocated in one AM heartbeat
+ * @param nodeQueueLoadMonitor NodeQueueLoadMonitor.
*/
public CentralizedOpportunisticContainerAllocator(
BaseContainerTokenSecretManager tokenSecretManager,
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 ee80b2265f7..b3705c60057 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 class AllocationConfiguration extends ReservationSchedulerConfiguration {
/**
* Get a queue's min share preemption timeout configured in the allocation
* file, in milliseconds. Return -1 if not set.
+ *
+ * @param queueName queue name.
+ * @return min share preemption timeout, return -1f if not set.
*/
public long getMinSharePreemptionTimeout(String queueName) {
Long minSharePreemptionTimeout = minSharePreemptionTimeouts.get(queueName);
@@ -211,6 +214,9 @@ public class AllocationConfiguration extends ReservationSchedulerConfiguration {
/**
* Get a queue's fair share preemption timeout configured in the allocation
* file, in milliseconds. Return -1 if not set.
+ *
+ * @param queueName queue Name.
+ * @return fair share preemption timeout, return -1f if not set.
*/
public long getFairSharePreemptionTimeout(String queueName) {
Long fairSharePreemptionTimeout = fairSharePreemptionTimeouts.get(queueName);
@@ -221,6 +227,9 @@ public class AllocationConfiguration extends ReservationSchedulerConfiguration {
/**
* Get a queue's fair share preemption threshold in the allocation file.
* Return -1f if not set.
+ *
+ * @param queueName queue Name.
+ * @return preemption threshold, return -1f if not set.
*/
public float getFairSharePreemptionThreshold(String queueName) {
Float fairSharePreemptionThreshold =
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 7a5bad5d580..7fab417d893 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 class AllocationFileLoaderService extends AbstractService {
* Path to XML file containing allocations. If the
* path is relative, it is searched for in the
* classpath, but loaded like a regular File.
+ *
+ * @param conf configuration.
+ * @return Allocation File Path.
+ * @throws UnsupportedFileSystemException
+ * File system for a given file system name/scheme is not supported.
*/
@VisibleForTesting
public Path getAllocationFile(Configuration conf)
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 3b7055c757c..0218eb3e8c5 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 class FSAppAttempt extends SchedulerApplicationAttempt
/**
* 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 0479dd7cc48..7a643ef9295 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 class FSLeafQueue extends FSQueue {
/**
* TODO: Based on how frequently this is called, we might want to club
* counting pending and active apps in the same method.
+ * @return active apps.
*/
public int getNumActiveApps() {
int numActiveApps = 0;
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 fea2dc0fe8c..3e99ebae9f6 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 abstract class FSQueue implements Queue, Schedulable {
LOG.debug("The updated fairShare for {} is {}", getName(), fairShare);
}
- /** Get the steady fair share assigned to this Schedulable. */
+ /**
+ * Get the steady fair share assigned to this Schedulable.
+ * @return the steady fair share assigned to this Schedulable.
+ */
public Resource getSteadyFairShare() {
return steadyFairShare;
}
@@ -364,7 +367,7 @@ public abstract class FSQueue implements Queue, Schedulable {
*
* To be called holding the scheduler writelock.
*
- * @param fairShare
+ * @param fairShare queue's fairshare.
*/
public void update(Resource fairShare) {
setFairShare(fairShare);
@@ -407,6 +410,8 @@ public abstract class FSQueue implements Queue, Schedulable {
/**
* Gets the children of this queue, if any.
+ *
+ * @return the children of this queue.
*/
public abstract List getChildQueues();
@@ -420,6 +425,8 @@ public abstract class FSQueue implements Queue, Schedulable {
/**
* Return the number of apps for which containers can be allocated.
* Includes apps in subqueues.
+ *
+ * @return the number of apps.
*/
public abstract int getNumRunnableApps();
@@ -447,6 +454,8 @@ public abstract class FSQueue implements Queue, Schedulable {
/**
* Returns true if queue has at least one app running.
+ *
+ * @return true, if queue has at least one app running; otherwise, false;
*/
public boolean isActive() {
return getNumRunnableApps() > 0;
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 a865d7543dd..32a3b7be4be 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 class FairScheduler extends
* Add a new application to the scheduler, with a given id, queue name, and
* user. This will accept a new app even if the user or queue is above
* configured limits, but the app will not be marked as runnable.
+ *
+ * @param applicationId applicationId.
+ * @param queueName queue name.
+ * @param user submit application user.
+ * @param isAppRecovering true, app recover; false, app not recover.
+ * @param placementContext application placement context.
*/
protected void addApplication(ApplicationId applicationId,
String queueName, String user, boolean isAppRecovering,
@@ -588,6 +594,10 @@ public class FairScheduler extends
/**
* Add a new application attempt to the scheduler.
+ *
+ * @param applicationAttemptId application AttemptId.
+ * @param transferStateFromPreviousAttempt transferStateFromPreviousAttempt.
+ * @param isAttemptRecovering true, attempt recovering;false, attempt not recovering.
*/
protected void addApplicationAttempt(
ApplicationAttemptId applicationAttemptId,
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 fb3a2c37f5c..29501540c16 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 class MaxRunningAppsEnforcer {
/**
* Tracks the given new runnable app for purposes of maintaining max running
* app limits.
+ *
+ * @param app FSAppAttempt, the given application.
*/
public void trackRunnableApp(FSAppAttempt app) {
String user = app.getUser();
@@ -138,6 +140,8 @@ public class MaxRunningAppsEnforcer {
/**
* Tracks the given new non runnable app so that it can be made runnable when
* it would not violate max running app limits.
+ *
+ * @param app FSAppAttempt, the given application.
*/
public void trackNonRunnableApp(FSAppAttempt app) {
String user = app.getUser();
@@ -170,6 +174,9 @@ public class MaxRunningAppsEnforcer {
*
* Runs in O(n log(n)) where n is the number of queues that are under the
* highest queue that went from having no slack to having slack.
+ *
+ * @param queue FSLeafQueue, the given queue.
+ * @param app FSAppAttempt, the given application.
*/
public void updateRunnabilityOnAppRemoval(FSAppAttempt app, FSLeafQueue queue) {
AllocationConfiguration allocConf = scheduler.getAllocationConfiguration();
@@ -271,6 +278,8 @@ public class MaxRunningAppsEnforcer {
/**
* Updates the relevant tracking variables after a runnable app with the given
* queue and user has been removed.
+ *
+ * @param app FSAppAttempt.
*/
public void untrackRunnableApp(FSAppAttempt app) {
// Update usersRunnableApps
@@ -292,7 +301,9 @@ public class MaxRunningAppsEnforcer {
}
/**
- * Stops tracking the given non-runnable app
+ * Stops tracking the given non-runnable app.
+ *
+ * @param app FSAppAttempt.
*/
public void untrackNonRunnableApp(FSAppAttempt app) {
usersNonRunnableApps.remove(app.getUser(), app);
@@ -301,6 +312,9 @@ public class MaxRunningAppsEnforcer {
/**
* Traverses the queue hierarchy under the given queue to gather all lists
* of non-runnable applications.
+ *
+ * @param queue FSQueue
+ * @param appLists FSAppAttempt List.
*/
private void gatherPossiblyRunnableAppLists(FSQueue queue,
List> 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 07cbb1d7082..1b12e563ab4 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 @@ public class QueueManager {
/**
* Gets a queue by name.
+ * @param name queue name.
+ * @return queue objects, FSQueue.
*/
public FSQueue getQueue(String name) {
name = ensureRootPrefix(name);
@@ -553,6 +555,10 @@ public class QueueManager {
/**
* Return whether a queue exists already.
+ *
+ * @param name queue name.
+ * @return Returns true if the queue exists,
+ * otherwise returns false.
*/
public boolean exists(String name) {
name = ensureRootPrefix(name);
@@ -563,6 +569,7 @@ public class QueueManager {
/**
* Get a collection of all leaf queues.
+ * @return a collection of all leaf queues.
*/
public Collection getLeafQueues() {
synchronized (queues) {
@@ -572,6 +579,7 @@ public class QueueManager {
/**
* 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 bd1ff7ada25..ee393dffe64 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 1fed9b08c55..8ec455a6bcb 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 abstract class SchedulingPolicy {
*
* @param policy canonical class name or "drf" or "fair" or "fifo"
* @return a {@link SchedulingPolicy} instance parsed from given policy
- * @throws AllocationConfigurationException
+ * @throws AllocationConfigurationException for any errors.
*
*/
@SuppressWarnings("unchecked")
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 97bb4c56175..6d9cad25ab9 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 @@ public final class ComputeFairShares {
* shares considering only active schedulables ie schedulables which have
* running apps.
*
- * @param schedulables
- * @param totalResources
- * @param type
+ * @param schedulables given schedulables.
+ * @param totalResources totalResources.
+ * @param type type of the resource.
*/
public static void computeShares(
Collection extends Schedulable> schedulables, Resource totalResources,
@@ -60,9 +60,9 @@ public final class ComputeFairShares {
* share is an allocation of shares considering all queues, i.e.,
* active and inactive.
*
- * @param queues
- * @param totalResources
- * @param type
+ * @param queues {@link FSQueue}s whose shares are to be updated.
+ * @param totalResources totalResources.
+ * @param type type of the resource.
*/
public static void computeSteadyShares(
Collection extends FSQueue> queues, Resource totalResources,
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 662e34d1dc6..509187823b0 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 e2a690947ae..3c5ef26c0c0 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 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceUsage;
public interface SchedulableEntity {
/**
- * Id - each entity must have a unique id
+ * Id - each entity must have a unique id.
+ * @return id.
*/
public String getId();
/**
* Compare the passed SchedulableEntity to this one for input order.
* Input order is implementation defined and should reflect the
- * correct ordering for first-in first-out processing
+ * correct ordering for first-in first-out processing.
+ *
+ * @param other SchedulableEntity.
+ * @return correct ordering.
*/
public int compareInputOrderTo(SchedulableEntity other);
/**
- * View of Resources wanted and consumed by the entity
+ * View of Resources wanted and consumed by the entity.
+ * @return ResourceUsage.
*/
public ResourceUsage getSchedulingResourceUsage();
/**
- * Get the priority of the application
+ * Get the priority of the application.
+ * @return priority of the application.
*/
public Priority getPriority();
/**
* Whether application was running before RM restart.
+ * @return true, application was running before RM restart;
+ * otherwise false.
*/
public boolean isRecovering();
/**
* Get partition corresponding to this entity.
- * @return partition
+ * @return partition node label.
*/
String getPartition();
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 b398721c813..59fdc57234c 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 class AMRMTokenSecretManager extends
/**
* Populate persisted password of AMRMToken back to AMRMTokenSecretManager.
+ * @param token AMRMTokenIdentifier.
+ * @throws IOException an I/O exception has occurred.
*/
public void addPersistedPassword(Token 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 d0e0bf61748..8040ce9771a 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 @@ public class DelegationTokenRenewer extends AbstractService {
}
/**
- * set task to renew the token
+ * set task to renew the token.
+ * @param token DelegationTokenToRenew.
+ * @throws IOException if an IO error occurred.
*/
@VisibleForTesting
protected void setTimerForTokenRenewal(DelegationTokenToRenew token)
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 e3596fa34c5..1f686c96f93 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 class NMTokenSecretManagerInRM extends BaseNMTokenSecretManager {
/**
* This is to be called when NodeManager reconnects or goes down. This will
* remove if NMTokens if present for any running application from cache.
- * @param nodeId
+ * @param nodeId Node Id.
*/
public void removeNodeKey(NodeId nodeId) {
this.writeLock.lock();
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 96e14c86742..af176a0454d 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 abstract class QueueACLsManager {
/**
* Get queue acl manager corresponding to the scheduler.
* @param scheduler the scheduler for which the queue acl manager is required
- * @param conf
+ * @param conf Configuration.
* @return {@link QueueACLsManager}
*/
public static QueueACLsManager getQueueACLsManager(
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 54cd67cf312..0cb2eee55ed 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 class RMContainerTokenSecretManager extends
* @param containerType Container Type
* @param execType Execution Type
* @param allocationRequestId allocationRequestId
+ * @param allocationTags allocation Tags
* @return the container-token
*/
public Token createContainerToken(ContainerId containerId,
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 32563cb3673..b67d143d9f7 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 4034ed7afc6..47de8ee591a 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 @@ public interface RMWebServiceProtocol {
* It is a PathParam.
* @param resourceOption The resource change.
* @throws AuthorizationException If the user is not authorized.
+ * @return the resources of a specific node.
*/
ResourceInfo updateNodeResource(HttpServletRequest hsr, String nodeId,
ResourceOptionInfo resourceOption) throws AuthorizationException;
@@ -223,6 +225,7 @@ public interface RMWebServiceProtocol {
* aggregated. It is a QueryParam.
* @param activitiesCount number of activities
* @return last n activities
+ * @throws InterruptedException if interrupted.
*/
BulkActivitiesInfo getBulkActivities(HttpServletRequest hsr,
String groupBy, int activitiesCount) throws InterruptedException;
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 442a54ceeef..245582fd571 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 class FairSchedulerInfo extends SchedulerInfo {
/**
* Get the fair share assigned to the appAttemptId.
- * @param appAttemptId
+ * @param appAttemptId the application attempt id
* @return The fair share assigned to the appAttemptId,
* 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 9804a36099c..446b7928bf9 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 @@ public class FairSchedulerQueueInfo {
/**
* Returns the steady fair share as a fraction of the entire cluster capacity.
+ * @return steady fairshare memoryfraction.
*/
public float getSteadyFairShareMemoryFraction() {
return fractionMemSteadyFairShare;
@@ -161,6 +162,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the fair share as a fraction of the entire cluster capacity.
+ * @return fair share memory fraction.
*/
public float getFairShareMemoryFraction() {
return fractionMemFairShare;
@@ -168,13 +170,15 @@ public class FairSchedulerQueueInfo {
/**
* Returns the steady fair share of this queue in megabytes.
+ * @return steady fair share.
*/
public ResourceInfo getSteadyFairShare() {
return steadyFairResources;
}
/**
- * Returns the fair share of this queue in megabytes
+ * Returns the fair share of this queue in megabytes.
+ * @return fair share.
*/
public ResourceInfo getFairShare() {
return fairResources;
@@ -232,6 +236,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the memory used by this queue as a fraction of the entire
* cluster capacity.
+ * @return used memory fraction.
*/
public float getUsedMemoryFraction() {
return fractionMemUsed;
@@ -240,6 +245,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the capacity of this queue as a fraction of the entire cluster
* capacity.
+ * @return max resources fraction.
*/
public float getMaxResourcesFraction() {
return fractionMemMaxShare;
@@ -247,6 +253,7 @@ public class FairSchedulerQueueInfo {
/**
* Returns the name of the scheduling policy used by this queue.
+ * @return SchedulingPolicy.
*/
public String getSchedulingPolicy() {
return schedulingPolicy;