From f0c0a094fffd324c276ee7e7cb2eebf803bd7a8d Mon Sep 17 00:00:00 2001 From: Mahadev Konar Date: Sun, 27 Nov 2011 23:17:09 +0000 Subject: [PATCH] MAPREDUCE-3371. Review and improve the yarn-api javadocs. (Ravi Prakash via mahadev) - Merging r1206899 from trunk. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1206909 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 ++ .../apache/hadoop/yarn/api/AMRMProtocol.java | 4 +- .../hadoop/yarn/api/ClientRMProtocol.java | 5 ++- .../hadoop/yarn/api/ContainerManager.java | 9 ++-- .../api/protocolrecords/AllocateRequest.java | 11 +++-- .../api/protocolrecords/AllocateResponse.java | 2 +- .../GetAllApplicationsRequest.java | 2 + .../GetClusterMetricsRequest.java | 2 + .../GetClusterNodesRequest.java | 2 + .../GetClusterNodesResponse.java | 2 +- .../GetContainerStatusResponse.java | 2 +- .../GetNewApplicationRequest.java | 2 + .../GetNewApplicationResponse.java | 2 +- .../GetQueueUserAclsInfoRequest.java | 2 + .../StartContainerResponse.java | 42 +++++++++++++++++++ .../StopContainerResponse.java | 2 + .../SubmitApplicationResponse.java | 2 + .../hadoop/yarn/api/records/AMResponse.java | 4 +- .../yarn/api/records/ApplicationReport.java | 3 +- .../ApplicationResourceUsageReport.java | 29 +++++++++++++ .../records/ApplicationSubmissionContext.java | 2 +- .../hadoop/yarn/api/records/Container.java | 3 +- .../api/records/ContainerLaunchContext.java | 19 +++++---- .../yarn/api/records/NodeHealthStatus.java | 2 - .../hadoop/yarn/api/records/Priority.java | 13 ++++++ .../hadoop/yarn/api/records/QueueInfo.java | 2 +- .../distributedshell/ApplicationMaster.java | 2 +- .../containermanager/AuxServices.java | 2 +- 28 files changed, 141 insertions(+), 36 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index ccc5bb5177e..34252d94423 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -53,6 +53,9 @@ Release 0.23.1 - Unreleased MAPREDUCE-3411. Performance Upgrade for jQuery (Jonathan Eagles via mahadev) + MAPREDUCE-3371. Review and improve the yarn-api javadocs. (Ravi Prakash + via mahadev) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/AMRMProtocol.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/AMRMProtocol.java index d436f8e67fa..a0f220c2dcb 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/AMRMProtocol.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/AMRMProtocol.java @@ -91,8 +91,8 @@ public interface AMRMProtocol { * *

This also doubles up as a heartbeat to let the * ResourceManager know that the ApplicationMaster - * is alive. Thus, applications should use periodically make this call to - * be kept alive.

+ * is alive. Thus, applications should periodically make this call to be kept + * alive. The frequency depends on ??

* *

The ResourceManager responds with list of allocated * {@link Container}, status of completed containers and headroom information diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java index fb934591354..64b9cb64104 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java @@ -68,7 +68,8 @@ public interface ClientRMProtocol { * {@link GetNewApplicationResponse}.

* * @param request request to get a new ApplicationId - * @return new ApplicationId to be used to submit an application + * @return response containing the new ApplicationId to be used + * to submit an application * @throws YarnRemoteException * @see #submitApplication(SubmitApplicationRequest) */ @@ -216,7 +217,7 @@ public interface ClientRMProtocol { /** *

The interface used by clients to get information about queue - * acls for current users from the ResourceManager. + * acls for current user from the ResourceManager. *

* *

The ResourceManager responds with queue acls for all diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ContainerManager.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ContainerManager.java index 1d16cec26cd..0bb559a9fc5 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ContainerManager.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ContainerManager.java @@ -79,7 +79,7 @@ public interface ContainerManager { * to stop a {@link Container} allocated to it using this interface. *

* - *

The ApplicationMaster

sends a + *

The ApplicationMaster sends a * {@link StopContainerRequest} which includes the {@link ContainerId} of the * container to be stopped.

* @@ -105,8 +105,8 @@ public interface ContainerManager { * current status of a Container from the * NodeManager.

* - *

The ApplicationMaster

sends a - * {@link GetContainerStatusRequest} which includes the {@link ContainerId} of + *

The ApplicationMaster sends a + * {@link GetContainerStatusRequest} which includes the {@link ContainerId} of * the container whose status is needed.

* *

The NodeManager responds with @@ -115,7 +115,8 @@ public interface ContainerManager { * * @param request request to get ContainerStatus of a container * with the specified ContainerId - * @return ContainerStatus of the container + * @return response containing the ContainerStatus of the + * container * @throws YarnRemoteException */ @Public diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java index ff03dfea9e0..b3727a3f5c4 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java @@ -50,7 +50,6 @@ import org.apache.hadoop.yarn.api.records.ResourceRequest; *

  • * A list of unused {@link Container} which are being returned. *
  • - *
  • * *

    * @@ -81,7 +80,7 @@ public interface AllocateRequest { void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId); /** - * Get the response id. + * Get the response id used to track duplicate responses. * @return response id */ @Public @@ -89,7 +88,7 @@ public interface AllocateRequest { int getResponseId(); /** - * Set the response id + * Set the response id used to track duplicate responses. * @param id response id */ @Public @@ -113,7 +112,7 @@ public interface AllocateRequest { void setProgress(float progress); /** - * Get the list of ResourceRequest to upate the + * Get the list of ResourceRequest to update the * ResourceManager about the application's resource requirements. * @return the list of ResourceRequest */ @@ -130,9 +129,9 @@ public interface AllocateRequest { int getAskCount(); /** - * Add list of ResourceRequest to upate the + * Add list of ResourceRequest to update the * ResourceManager about the application's resource requirements. - * @param resourceRequest list of ResourceRequest to upate the + * @param resourceRequest list of ResourceRequest to update the * ResourceManager about the application's * resource requirements */ diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java index cdf8382b013..267a252918c 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java @@ -34,7 +34,7 @@ import org.apache.hadoop.yarn.api.records.Container; *