Forráskód Böngészése

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

Contributed by Shilun Fan
slfan1989 2 éve
szülő
commit
4a23389f5e
76 módosított fájl, 518 hozzáadás és 162 törlés
  1. 7 4
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java
  2. 1 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAuditLogger.java
  3. 2 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMSecretManagerService.java
  4. 18 3
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMServerUtils.java
  5. 5 4
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
  6. 3 3
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java
  7. 1 0
      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
  8. 11 2
      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
  9. 11 8
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/NodeAttributesManagerImpl.java
  10. 2 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMDelegatedNodeLabelsUpdater.java
  11. 2 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementFactory.java
  12. 1 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementRule.java
  13. 127 27
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java
  14. 1 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStoreUtils.java
  15. 3 0
      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. 4 2
      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
  17. 1 1
      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
  18. 2 1
      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
  19. 5 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.java
  20. 0 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/PeriodicRLESparseResourceAllocation.java
  21. 2 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMApp.java
  22. 5 4
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java
  23. 3 1
      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
  24. 2 2
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
  25. 2 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
  26. 6 6
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java
  27. 5 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
  28. 3 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ApplicationPlacementAllocatorFactory.java
  29. 1 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/MutableConfigurationProvider.java
  30. 3 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/NodeFilter.java
  31. 2 2
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/PreemptableResourceScheduler.java
  32. 7 7
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/QueueMetrics.java
  33. 2 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ResourceScheduler.java
  34. 2 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedContainerChangeRequest.java
  35. 1 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
  36. 2 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
  37. 20 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerUtils.java
  38. 34 23
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java
  39. 4 3
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractAutoCreatedLeafQueue.java
  40. 5 3
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractManagedParentQueue.java
  41. 2 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSMaxRunningAppsEnforcer.java
  42. 17 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueue.java
  43. 11 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueueUtils.java
  44. 2 0
      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
  45. 4 1
      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
  46. 1 0
      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
  47. 4 2
      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
  48. 2 1
      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
  49. 2 2
      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
  50. 2 0
      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
  51. 1 1
      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
  52. 5 4
      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
  53. 1 1
      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
  54. 1 1
      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
  55. 1 1
      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
  56. 1 0
      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
  57. 10 1
      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
  58. 5 0
      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
  59. 1 0
      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
  60. 1 0
      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
  61. 11 2
      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
  62. 10 0
      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
  63. 15 1
      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
  64. 8 0
      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
  65. 33 7
      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
  66. 1 1
      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
  67. 6 6
      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
  68. 2 0
      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
  69. 13 5
      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
  70. 5 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/AMRMTokenSecretManager.java
  71. 3 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
  72. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/NMTokenSecretManagerInRM.java
  73. 1 0
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/RMContainerTokenSecretManager.java
  74. 8 6
      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
  75. 1 1
      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
  76. 8 1
      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

+ 7 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java

@@ -615,12 +615,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 {
@@ -682,6 +682,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);

+ 1 - 0
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.
    *
    * <br><br>
    * Note that the {@link RMAuditLogger} uses tabs ('\t') as a key-val delimiter

+ 2 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMSecretManagerService.java

@@ -43,7 +43,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());

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

+ 5 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java

@@ -1589,6 +1589,7 @@ public class ResourceManager extends CompositeService
 
   /**
    * Create RMDelegatedNodeLabelsUpdater based on configuration.
+   * @return RMDelegatedNodeLabelsUpdater.
    */
   protected RMDelegatedNodeLabelsUpdater createRMDelegatedNodeLabelsUpdater() {
     if (conf.getBoolean(YarnConfiguration.NODE_LABELS_ENABLED,
@@ -1745,9 +1746,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) {
@@ -1758,8 +1759,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 {

+ 3 - 3
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) {

+ 1 - 0
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
    *         <code>resourceToObtainByPartition</code>
    */

+ 11 - 2
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,

+ 11 - 8
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/NodeAttributesManagerImpl.java

@@ -272,9 +272,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.
@@ -329,12 +331,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,

+ 2 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMDelegatedNodeLabelsUpdater.java

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

+ 2 - 0
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)

+ 1 - 0
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

+ 127 - 27
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<RMStateStoreEvent> {
@@ -1328,16 +1420,18 @@ public abstract class RMStateStore extends AbstractService {
   }
 
   /**
-   * Derived classes must implement this method to delete the state store
-   * @throws Exception
+   * Derived classes must implement this method to delete the state store.
+   *
+   * @throws Exception exception occurs.
    */
   public abstract void deleteStore() throws Exception;
 
   /**
    * Derived classes must implement this method to remove application from the
-   * state store
-   * 
-   * @throws Exception
+   * state store.
+   *
+   * @param removeAppId application Id.
+   * @throws Exception exception occurs.
    */
   public abstract void removeApplication(ApplicationId removeAppId)
       throws Exception;
@@ -1362,6 +1456,8 @@ public abstract class RMStateStore extends AbstractService {
 
   /**
    * ProxyCAManager calls this to store the CA Certificate and Private Key.
+   * @param caCert X509Certificate.
+   * @param caPrivateKey PrivateKey.
    */
   public void storeProxyCACert(X509Certificate caCert,
       PrivateKey caPrivateKey) {
@@ -1372,7 +1468,11 @@ public abstract class RMStateStore extends AbstractService {
   /**
    * Blocking API
    * Derived classes must implement this method to store the CA Certificate
-   * and Private Key
+   * and Private Key.
+   *
+   * @param caCert X509Certificate.
+   * @param caPrivateKey PrivateKey.
+   * @throws Exception error occurs.
    */
   protected abstract void storeProxyCACertState(
       X509Certificate caCert, PrivateKey caPrivateKey) throws Exception;

+ 1 - 0
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)

+ 3 - 0
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;

+ 4 - 2
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

+ 1 - 1
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);
   /**

+ 2 - 1
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

+ 5 - 0
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}

+ 0 - 1
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;

+ 2 - 0
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<RMAppEvent> {
   Map<NodeId, LogAggregationReport> getLogAggregationReportsForApp();
 
   LogAggregationStatus getLogAggregationStatusForAppReport();
+
   /**
    * Return the node label expression of the AM container.
+   * @return the node label expression.
    */
   String getAmNodeLabelExpression();
 

+ 5 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java

@@ -1896,10 +1896,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 */

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

+ 2 - 2
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(

+ 2 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java

@@ -94,7 +94,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();
 

+ 6 - 6
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java

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

+ 5 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java

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

+ 3 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ApplicationPlacementAllocatorFactory.java

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

+ 1 - 0
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;
 

+ 3 - 0
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);
 }

+ 2 - 2
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);
 

+ 7 - 7
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/QueueMetrics.java

@@ -297,7 +297,7 @@ public class QueueMetrics implements MetricsSource {
    *  QueueMetrics (B)
    *    metrics
    *
-   * @param partition
+   * @param partition Node Partition
    * @return QueueMetrics
    */
   public synchronized QueueMetrics getPartitionQueueMetrics(String partition) {
@@ -529,7 +529,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());
@@ -557,7 +557,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,
@@ -583,8 +583,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
    */
@@ -778,8 +778,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());

+ 2 - 1
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 <code>ResourceScheduler</code>.
    * @param conf configuration
-   * @throws IOException
+   * @param rmContext RMContext.
+   * @throws IOException an I/O exception has occurred.
    */
   void reinitialize(Configuration conf, RMContext rmContext) throws IOException;
 

+ 2 - 1
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

+ 1 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java

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

+ 2 - 0
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) {

+ 20 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerUtils.java

@@ -196,6 +196,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(
@@ -212,6 +218,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(
@@ -528,7 +540,14 @@ public class SchedulerUtils {
 
   /**
    * Check queue label expression, check if node label in queue's
-   * node-label-expression existed in clusterNodeLabels if rmContext != null
+   * node-label-expression existed in clusterNodeLabels if rmContext != null.
+   *
+   * @param queueLabels queue Labels.
+   * @param labelExpression label expression.
+   * @param rmContext rmContext.
+   * @return true, if node label in queue's node-label-expression existed in clusterNodeLabels;
+   * otherwise false.
+   *
    */
   public static boolean checkQueueLabelExpression(Set<String> queueLabels,
       String labelExpression, RMContext rmContext) {

+ 34 - 23
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<SchedulerEvent> {
 
   /**
-   * Get queue information
+   * Get queue information.
+   *
    * @param queueName queue name
    * @param includeChildQueues include child queues?
    * @param recursive get children queues?
    * @return queue information
-   * @throws IOException
+   * @throws IOException an I/O exception has occurred.
    */
   @Public
   @Stable
@@ -148,7 +149,8 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
 
   /**
    * Get node resource usage report.
-   * @param nodeId
+   *
+   * @param nodeId nodeId.
    * @return the {@link SchedulerNodeReport} for the node or null
    * if nodeId does not point to a defined node.
    */
@@ -186,10 +188,11 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
   /**
    * Check if the user has permission to perform the operation.
    * If the user has {@link QueueACL#ADMINISTER_QUEUE} permission,
-   * this user can view/modify the applications in this queue
-   * @param callerUGI
-   * @param acl
-   * @param queueName
+   * this user can view/modify the applications in this queue.
+   *
+   * @param callerUGI caller UserGroupInformation.
+   * @param acl queue ACL.
+   * @param queueName queue Name.
    * @return <code>true</code> if the user has the permission,
    *         <code>false</code> otherwise
    */
@@ -207,7 +210,8 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
 
   /**
    * Get the container for the given containerId.
-   * @param containerId
+   *
+   * @param containerId the given containerId.
    * @return the container for the given containerId.
    */
   @LimitedPrivate("yarn")
@@ -215,9 +219,9 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
   public RMContainer getRMContainer(ContainerId containerId);
 
   /**
-   * Moves the given application to the given queue
-   * @param appId
-   * @param newQueue
+   * Moves the given application to the given queue.
+   * @param appId application Id
+   * @param newQueue the given queue.
    * @return the name of the queue the application was placed into
    * @throws YarnException if the move cannot be carried out
    */
@@ -241,9 +245,9 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
    * Completely drain sourceQueue of applications, by moving all of them to
    * destQueue.
    *
-   * @param sourceQueue
-   * @param destQueue
-   * @throws YarnException
+   * @param sourceQueue sourceQueue.
+   * @param destQueue destQueue.
+   * @throws YarnException when yarn exception occur.
    */
   void moveAllApps(String sourceQueue, String destQueue) throws YarnException;
 
@@ -251,7 +255,7 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
    * Terminate all applications in the specified queue.
    *
    * @param queueName the name of queue to be drained
-   * @throws YarnException
+   * @throws YarnException when yarn exception occur.
    */
   void killAllAppsInQueue(String queueName) throws YarnException;
 
@@ -261,7 +265,7 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
    * must be a leaf, etc..).
    *
    * @param queueName name of the queue to remove
-   * @throws YarnException
+   * @throws YarnException when yarn exception occur.
    */
   void removeQueue(String queueName) throws YarnException;
 
@@ -271,7 +275,8 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
    * attached to existing parent, must have zero entitlement).
    *
    * @param newQueue the queue being added.
-   * @throws YarnException
+   * @throws YarnException when yarn exception occur.
+   * @throws IOException when io exception occur.
    */
   void addQueue(Queue newQueue) throws YarnException, IOException;
 
@@ -284,14 +289,15 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
    * @param queue the queue for which we change entitlement
    * @param entitlement the new entitlement for the queue (capacity,
    *              maxCapacity, etc..)
-   * @throws YarnException
+   * @throws YarnException when yarn exception occur.
    */
   void setEntitlement(String queue, QueueEntitlement entitlement)
       throws YarnException;
 
   /**
-   * Gets the list of names for queues managed by the Reservation System
+   * Gets the list of names for queues managed by the Reservation System.
    * @return the list of queues which support reservations
+   * @throws YarnException when yarn exception occur.
    */
   public Set<String> getPlanQueues() throws YarnException;  
 
@@ -317,6 +323,7 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
    * @param applicationId
    *          Application ID
    * @return Updated Priority from scheduler
+   * @throws YarnException when yarn exception occur.
    */
   public Priority checkAndGetApplicationPriority(Priority priorityRequestedByApp,
       UserGroupInformation user, String queuePath, ApplicationId applicationId)
@@ -334,6 +341,7 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
    * @param user who submitted the application
    *
    * @return updated priority
+   * @throws YarnException when yarn exception occur.
    */
   public Priority updateApplicationPriority(Priority newPriority,
       ApplicationId applicationId, SettableFuture<Object> future,
@@ -350,15 +358,18 @@ public interface YarnScheduler extends EventHandler<SchedulerEvent> {
   List<Container> getTransferredContainers(ApplicationAttemptId appAttemptId);
 
   /**
-   * Set the cluster max priority
+   * Set the cluster max priority.
    * 
-   * @param conf
-   * @throws YarnException
+   * @param conf Configuration.
+   * @throws YarnException when yarn exception occur.
    */
   void setClusterMaxPriority(Configuration conf) throws YarnException;
 
   /**
-   * @param attemptId
+   * Get pending resource request for specified application attempt.
+   *
+   * @param attemptId the id of the application attempt
+   * @return pending resource requests.
    */
   List<ResourceRequest> getPendingResourceRequestsForAttempt(
       ApplicationAttemptId attemptId);

+ 4 - 3
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractAutoCreatedLeafQueue.java

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

+ 5 - 3
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractManagedParentQueue.java

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

+ 2 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSMaxRunningAppsEnforcer.java

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

+ 17 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueue.java

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

+ 11 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueueUtils.java

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

+ 2 - 0
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

@@ -116,6 +116,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,

+ 4 - 1
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

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

+ 1 - 0
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();
 

+ 4 - 2
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

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

+ 2 - 1
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

@@ -165,7 +165,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;

+ 2 - 2
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 {

+ 2 - 0
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;
 

+ 1 - 1
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

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

+ 5 - 4
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<String> allocationTags) {
@@ -644,7 +645,7 @@ public class AllocationTagsManager {
    * Returns a map whose key is the allocation tag and value is the
    * count of allocations with this tag.
    *
-   * @param nodeId
+   * @param nodeId nodeId.
    * @return allocation tag to count mapping
    */
   public Map<String, Long> getAllocationTagsWithCount(NodeId nodeId) {

+ 1 - 1
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<T> {
    * of current class.
    *
    * @param target a generic type target that impacts this evaluation.
-   * @throws YarnException
+   * @throws YarnException if evaluate error.
    */
   void evaluate(T target) throws YarnException;
 }

+ 1 - 1
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,

+ 1 - 1
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)

+ 1 - 0
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,

+ 10 - 1
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 =

+ 5 - 0
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

@@ -185,6 +185,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)

+ 1 - 0
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();

+ 1 - 0
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

@@ -473,6 +473,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;

+ 11 - 2
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<FSQueue> getChildQueues();
   
@@ -420,6 +425,8 @@ public abstract class FSQueue implements Queue, Schedulable {
   /**
    * Return the number of apps for which containers can be allocated.
    * Includes apps in subqueues.
+   *
+   * @return the number of apps.
    */
   public abstract int getNumRunnableApps();
   
@@ -447,6 +454,8 @@ public abstract class FSQueue implements Queue, Schedulable {
 
   /**
    * Returns true if queue has at least one app running.
+   *
+   * @return true, if queue has at least one app running; otherwise, false;
    */
   public boolean isActive() {
     return getNumRunnableApps() > 0;

+ 10 - 0
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

@@ -463,6 +463,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,
@@ -582,6 +588,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,

+ 15 - 1
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<List<FSAppAttempt>> appLists) {

+ 8 - 0
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

@@ -548,6 +548,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);
@@ -558,6 +560,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);
@@ -568,6 +574,7 @@ public class QueueManager {
   
   /**
    * Get a collection of all leaf queues.
+   * @return a collection of all leaf queues.
    */
   public Collection<FSLeafQueue> getLeafQueues() {
     synchronized (queues) {
@@ -577,6 +584,7 @@ public class QueueManager {
   
   /**
    * Get a collection of all queues.
+   * @return a collection of all queues.
    */
   public Collection<FSQueue> getQueues() {
     synchronized (queues) {

+ 33 - 7
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);
 
   /**

+ 1 - 1
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")

+ 6 - 6
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,

+ 2 - 0
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<N extends SchedulerNode> {
    *
    * @param nodes
    *          a collection working nm's.
+   * @param partition
+   *          node label
    */
   void addAndRefreshNodesSet(Collection<N> nodes, String partition);
 

+ 13 - 5
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();
 

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

+ 3 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java

@@ -623,7 +623,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)

+ 1 - 1
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();

+ 1 - 0
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,

+ 8 - 6
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<VolumeProvisioningResults> schedule(
       VolumeProvisioningTask volumeProvisioningTask, int delaySecond);
 
   /**
    * Register a csi-driver-adaptor to the volume manager.
-   * @param driverName
-   * @param client
+   * @param driverName driver name.
+   * @param client csi adaptor protocol client.
    */
   void registerCsiDriverAdaptor(String driverName, CsiAdaptorProtocol client);
 
   /**
    * Returns the csi-driver-adaptor client from cache by the given driver name.
    * If the client is not found, null is returned.
-   * @param driverName
+   * @param driverName driver name.
    * @return a csi-driver-adaptor client working for given driver or null
    * if the adaptor could not be found.
    */

+ 1 - 1
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

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

+ 8 - 1
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;