From f0c0a094fffd324c276ee7e7cb2eebf803bd7a8d Mon Sep 17 00:00:00 2001
From: Mahadev Konar 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.
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}.
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
The ApplicationMaster
sends a
* {@link StopContainerRequest} which includes the {@link ContainerId} of the
* container to be stopped.
Container
from the
* NodeManager
.
*
- * The ApplicationMaster
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;
*
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;
* ApplicationMaster
that its
+ * A reboot flag to let the ApplicationMaster
know that its
* horribly out of sync and needs to reboot.The request from clients to get a report of all Applications
* in the cluster from the ResourceManager
.
Currently, this is empty.
+ * * @see ClientRMProtocol#getAllApplications(GetAllApplicationsRequest) */ @Public diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java index 81b93428036..e2c2ca48af8 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java @@ -25,6 +25,8 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol; /** *The request sent by clients to get cluster metrics from the
* ResourceManager
.
Currently, this is empty.
* * @see ClientRMProtocol#getClusterMetrics(GetClusterMetricsRequest) */ diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java index 35ab1693717..0bbbd280214 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java @@ -26,6 +26,8 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol; *The request from clients to get a report of all nodes
* in the cluster from the ResourceManager
.
Currently, this is empty.
+ * * @see ClientRMProtocol#getClusterNodes(GetClusterNodesRequest) */ @Public diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java index e9475fd8d2c..9acf9434647 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java @@ -29,7 +29,7 @@ import org.apache.hadoop.yarn.api.records.NodeReport; /** *The response sent by the ResourceManager
to a client
- * requesting an {@link NodeReport} for all nodes.
The NodeReport
contains per-node information such as
* available resources, number of containers, tracking url, rack name, health
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusResponse.java
index 03b361d8377..48ba6515261 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusResponse.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusResponse.java
@@ -27,7 +27,7 @@ import org.apache.hadoop.yarn.api.records.ContainerStatus;
/**
*
The response sent by the NodeManager
to the
- * ApplicationMaster
when asked to obtainer status
+ * ApplicationMaster
when asked to obtain the status
* of a container.
The request sent by clients to get a new {@link ApplicationId} for * submitting an application.
* + *Currently, this is empty.
+ * * @see ClientRMProtocol#getNewApplication(GetNewApplicationRequest) */ @Public diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationResponse.java index 4e7a7e565be..8da80e0afd6 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationResponse.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationResponse.java @@ -28,7 +28,7 @@ import org.apache.hadoop.yarn.api.records.Resource; /** *The response sent by the ResourceManager
to the client for
- * a request to a new {@link ApplicationId} for submitting applications.
The request sent by clients to the ResourceManager
to
* get queue acls for the current user.
Currently, this is empty.
+ * * @see ClientRMProtocol#getQueueUserAcls(GetQueueUserAclsInfoRequest) */ @Public diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerResponse.java index a83c520a7c2..b14715bbd6b 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerResponse.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerResponse.java @@ -35,11 +35,53 @@ import org.apache.hadoop.yarn.api.ContainerManager; @Public @Stable public interface StartContainerResponse { + /** + *Get the responses from all auxiliary services running on the
+ * NodeManager
.
The responses are returned as a Map between the auxiliary service names
+ * and their corresponding opaque blob ByteBuffer
s
NodeManager
+ *
+ * @param key The auxiliary service name whose response is desired.
+ * @return The opaque blob ByteBuffer
returned by the auxiliary
+ * service.
+ */
ByteBuffer getServiceResponse(String key);
+ /**
+ * Add to the list of auxiliary services which have been started on the
+ * NodeManager
. This is done only once when the
+ * NodeManager
starts up
+ * @param serviceResponse A map from auxiliary service names to the opaque
+ * blob ByteBuffer
s for that auxiliary service
+ */
void addAllServiceResponse(MapNodeManager
. This is done only once when the
+ * NodeManager
starts up
+ *
+ * @param key The auxiliary service name
+ * @param value The opaque blob ByteBuffer
managed by the
+ * auxiliary service
+ */
void setServiceResponse(String key, ByteBuffer value);
+
+ /**
+ * Remove a single auxiliary service from the StartContainerResponse object
+ * @param key The auxiliary service to remove
+ */
void removeServiceResponse(String key);
+
+ /**
+ * Remove all the auxiliary services from the StartContainerResponse object
+ */
void clearServiceResponse();
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerResponse.java
index 6bfd7cffe86..c94e6987423 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerResponse.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerResponse.java
@@ -27,6 +27,8 @@ import org.apache.hadoop.yarn.api.ContainerManager;
* ApplicationMaster
when asked to stop an
* allocated container.
*
+ * Currently, this is empty.
+ * * @see ContainerManager#stopContainer(StopContainerRequest) */ @Public diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationResponse.java index 618641be6ae..7acd24c87d7 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationResponse.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationResponse.java @@ -26,6 +26,8 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol; *The response sent by the ResourceManager
to a client on
* application submission.
Currently, this is empty.
+ * * @see ClientRMProtocol#submitApplication(SubmitApplicationRequest) */ @Public diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/AMResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/AMResponse.java index e009d2eb17d..8963d4a5bcf 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/AMResponse.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/AMResponse.java @@ -35,7 +35,7 @@ import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest; *ApplicationMaster
that its
+ * A reboot flag to let the ApplicationMaster
know that its
* horribly out of sync and needs to reboot.ApplicationMaster
is running.ApplicationMaster
is running.ApplicationMaster
.Resource
+ * @return the used Resource
+ */
@Public
@Stable
Resource getUsedResources();
@@ -57,6 +78,10 @@ public interface ApplicationResourceUsageReport {
@Unstable
void setUsedResources(Resource resources);
+ /**
+ * Get the reserved Resource
+ * @return the reserved Resource
+ */
@Public
@Stable
Resource getReservedResources();
@@ -65,6 +90,10 @@ public interface ApplicationResourceUsageReport {
@Unstable
void setReservedResources(Resource reserved_resources);
+ /**
+ * Get the needed Resource
+ * @return the needed Resource
+ */
@Public
@Stable
Resource getNeededResources();
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
index 5ef71fea94d..67e76019711 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
@@ -26,7 +26,7 @@ import org.apache.hadoop.classification.InterfaceStability.Unstable;
import org.apache.hadoop.yarn.api.ClientRMProtocol;
/**
- * ApplicationSubmissionContext
represents the all of the
+ *
ApplicationSubmissionContext
represents all of the
* information needed by the ResourceManager
to launch
* the ApplicationMaster
for an application.
ContainerLaunchContext
represents the all of the information
+ *
ContainerLaunchContext
represents all of the information
* needed by the NodeManager
to launch a container.
It includes details such as:
@@ -127,7 +127,8 @@ public interface ContainerLaunchContext {
MapLocalResource
required by the container.
+ * Set LocalResource
required by the container. All pre-existing
+ * Map entries are cleared before adding the new Map
* @param localResources LocalResource
required by the container
*/
@Public
@@ -143,7 +144,8 @@ public interface ContainerLaunchContext {
MapApplicationACL
s for the application.
- * @param acls
+ * Set the ApplicationACL
s for the application. All pre-existing
+ * Map entries are cleared before adding the new Map
+ * @param acls ApplicationACL
s for the application
*/
@Public
@Stable
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeHealthStatus.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeHealthStatus.java
index c507e45b1a4..eca22fa4297 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeHealthStatus.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeHealthStatus.java
@@ -35,8 +35,6 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol;
*
*
QueueInfo
is a report of the runtime information of the queue. + *QueueInfo is a report of the runtime information of the queue.
* *It includes information such as: *
ResourceManager
that it is up and alive. The {@link AMRMProtocol#allocate} to the
* ResourceManager
from the ApplicationMaster
acts as a heartbeat.
*
- * For the actual handling of the job, the ApplicationMaster
has to request for the
+ *
For the actual handling of the job, the ApplicationMaster
has to request the
* ResourceManager
via {@link AllocateRequest} for the required no. of containers using {@link ResourceRequest}
* with the necessary resource specifications such as node location, computational (memory/disk/cpu) resource requirements.
* The ResourceManager
responds with an {@link AllocateResponse} that informs the ApplicationMaster
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
index 4b6e8a62493..83676e57edf 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
@@ -68,7 +68,7 @@ public class AuxServices extends AbstractService
/**
* @return the meta data for all registered services, that have been started.
* If a service has not been started no metadata will be available. The key
- * the the name of the service as defined in the configuration.
+ * is the name of the service as defined in the configuration.
*/
public Map