diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 180724b507c..f1da51a9764 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1172,6 +1172,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-2886. Fix Javadoc warnings in MapReduce. (mahadev) + MAPREDUCE-2897. Javadoc for ClientRMProtocol protocol and related records. + (acmurthy) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES 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 d194926f94e..d436f8e67fa 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 @@ -89,6 +89,11 @@ public interface AMRMProtocol { * of {@link ResourceRequest} and returns unused {@link Container} allocated * to it via {@link AllocateRequest}.
* + *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
* for the application.
The protocol between clients and the ResourceManager
+ * to submit/abort jobs and to get information on applications, cluster metrics,
+ * nodes, queues and ACLs.
The interface used by clients to obtain a new {@link ApplicationId} for + * submitting new applications.
+ * + *The ResourceManager
responds with a new, monotonically
+ * increasing, {@link ApplicationId} which is used by the client to submit
+ * a new application.
ApplicationId
+ * @return new ApplicationId
to be used to submit an application
+ * @throws YarnRemoteException
+ * @see #submitApplication(SubmitApplicationRequest)
+ */
+ public GetNewApplicationIdResponse getNewApplicationId(
+ GetNewApplicationIdRequest request)
+ throws YarnRemoteException;
+
+ /**
+ * The interface used by clients to submit a new application to the
+ * ResourceManager.
The client is required to provide details such as queue,
+ * {@link Resource} required to run the ApplicationMaster
,
+ * the equivalent of {@link ContainerLaunchContext} for launching
+ * the ApplicationMaster
etc. via the
+ * {@link SubmitApplicationRequest}.
Currently the ResourceManager
sends an immediate (empty)
+ * {@link SubmitApplicationResponse} on accepting the submission and throws
+ * an exception if it rejects the submission.
In secure mode,the ResourceManager
verifies access to
+ * queues etc. before accepting the application submission.
The interface used by clients to request the
+ * ResourceManager
to abort submitted application.
The client, via {@link FinishApplicationRequest} provides the + * {@link ApplicationId} of the application to be aborted.
+ * + * In secure mode,the ResourceManager
verifies access to the
+ * application, queue etc. before terminating the application.
Currently, the ResourceManager
returns an empty response
+ * on success and throws an exception on rejecting the request.
ResourceManager
returns an empty response
+ * on success and throws an exception on rejecting the request
+ * @throws YarnRemoteException
+ * @see #getQueueUserAcls(GetQueueUserAclsInfoRequest)
+ */
+ public FinishApplicationResponse finishApplication(
+ FinishApplicationRequest request)
+ throws YarnRemoteException;
- public GetApplicationReportResponse getApplicationReport(GetApplicationReportRequest request) throws YarnRemoteException;
- public GetClusterMetricsResponse getClusterMetrics(GetClusterMetricsRequest request) throws YarnRemoteException;
- public GetAllApplicationsResponse getAllApplications(GetAllApplicationsRequest request) throws YarnRemoteException;
- public GetClusterNodesResponse getClusterNodes(GetClusterNodesRequest request) throws YarnRemoteException;
- public GetQueueInfoResponse getQueueInfo(GetQueueInfoRequest request) throws YarnRemoteException;
- public GetQueueUserAclsInfoResponse getQueueUserAcls(GetQueueUserAclsInfoRequest request) throws YarnRemoteException;
+ /**
+ * The interface used by clients to get a report of an Application from
+ * the ResourceManager
.
The client, via {@link GetApplicationReportRequest} provides the + * {@link ApplicationId} of the application.
+ * + * In secure mode,the ResourceManager
verifies access to the
+ * application, queue etc. before accepting the request.
The ResourceManager
responds with a
+ * {@link GetApplicationReportResponse} which includes the
+ * {@link ApplicationReport} for the application.
The interface used by clients to get metrics about the cluster from
+ * the ResourceManager
.
The ResourceManager
responds with a
+ * {@link GetClusterMetricsResponse} which includes the
+ * {@link YarnClusterMetrics} with details such as number of current
+ * nodes in the cluster.
The interface used by clients to get a report of all Applications
+ * in the cluster from the ResourceManager
.
The ResourceManager
responds with a
+ * {@link GetAllApplicationsResponse} which includes the
+ * {@link ApplicationReport} for all the applications.
The interface used by clients to get a report of all nodes
+ * in the cluster from the ResourceManager
.
The ResourceManager
responds with a
+ * {@link GetClusterNodesResponse} which includes the
+ * {@link NodeReport} for all the nodes in the cluster.
The interface used by clients to get information about queues
+ * from the ResourceManager
.
The client, via {@link GetQueueInfoRequest}, can ask for details such + * as used/total resources, child queues, running applications etc.
+ * + * In secure mode,the ResourceManager
verifies access before
+ * providing the information.
The interface used by clients to get information about queue
+ * acls for current users from the ResourceManager
.
+ *
The ResourceManager
responds with queue acls for all
+ * existing queues.
ContainerStatus
of a container
* with the specified ContainerId
- * @return the ContainerStatus
of the container
+ * @return 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 10448b19a2c..ff03dfea9e0 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
@@ -32,8 +32,7 @@ import org.apache.hadoop.yarn.api.records.ResourceRequest;
/**
* The core request sent by the ApplicationMaster
to the
- * ResourceManager
to obtain resources in the cluster via
- * {@link AMRMProtocol#allocate(AllocateRequest)}.
ResourceManager
to obtain resources in the cluster.
*
* The request includes: *
ApplicationAttemptId
being managed by the
* ApplicationMaster
.
* @return ApplicationAttemptId
being managed by the
* ApplicationMaster
@@ -70,32 +70,46 @@ public interface AllocateRequest {
@Stable
ApplicationAttemptId getApplicationAttemptId();
- @Private
- @Unstable
+ /**
+ * Set the ApplicationAttemptId
being managed by the
+ * ApplicationMaster
.
+ * @param applicationAttemptId ApplicationAttemptId
being managed
+ * by the ApplicationMaster
+ */
+ @Public
+ @Stable
void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId);
/**
- * Get the response id.
- * @return the response id
+ * Get the response id.
+ * @return response id
*/
@Public
@Stable
int getResponseId();
-
- @Private
- @Unstable
+
+ /**
+ * Set the response id
+ * @param id response id
+ */
+ @Public
+ @Stable
void setResponseId(int id);
/**
- * Get the current progress of application.
- * @return the current progress of application
+ * Get the current progress of application.
+ * @return current progress of application
*/
@Public
@Stable
float getProgress();
- @Private
- @Unstable
+ /**
+ * Set the current progress of application
+ * @param progress current progress of application
+ */
+ @Public
+ @Stable
void setProgress(float progress);
/**
@@ -115,6 +129,29 @@ public interface AllocateRequest {
@Unstable
int getAskCount();
+ /**
+ * Add list of ResourceRequest
to upate the
+ * ResourceManager
about the application's resource requirements.
+ * @param resourceRequest list of ResourceRequest
to upate the
+ * ResourceManager
about the application's
+ * resource requirements
+ */
+ @Public
+ @Stable
+ void addAllAsks(ListContainerId
of unused containers being
* released by the ApplicationMaster
.
@@ -133,26 +170,15 @@ public interface AllocateRequest {
@Unstable
int getReleaseCount();
-
- @Private
- @Unstable
- void addAllAsks(ListContainerId
of unused containers being
+ * released by the ApplicationMaster
+ * @param releaseContainers list of ContainerId
of unused
+ * containers being released by the <
+ * code>ApplicationMaster
+ */
+ @Public
+ @Stable
void addAllReleases(ListThe response sent by the ResourceManager
the
- * ApplicationMaster
during resource negotiation via
- * {@link AMRMProtocol#allocate(AllocateRequest)}.
ApplicationMaster
during resource negotiation.
*
* The response, via {@link AMResponse}, includes: *
The finalization request sent by the ApplicationMaster
to
- * inform the ResourceManager
about its completion via the
- * {@link AMRMProtocol#finishApplicationMaster(FinishApplicationMasterRequest)}
- * api.
ResourceManager
about its completion.
*
* The final request includes details such: *
ApplicationAttemptId
being managed by the
* ApplicationMaster
.
* @return ApplicationAttemptId
being managed by the
* ApplicationMaster
@@ -59,44 +56,63 @@ public interface FinishApplicationMasterRequest {
@Stable
ApplicationAttemptId getApplicationAttemptId();
- @Private
- @Unstable
+ /**
+ * Set the ApplicationAttemptId
being managed by the
+ * ApplicationMaster
.
+ * @param applicationAttemptId ApplicationAttemptId
being managed
+ * by the ApplicationMaster
+ */
+ @Public
+ @Stable
void setAppAttemptId(ApplicationAttemptId applicationAttemptId);
/**
- * Get final state of the ApplicationMaster
.
- * @return final state of the ApplicationMaster
+ * Get final state of the ApplicationMaster
.
+ * @return final state of the ApplicationMaster
*/
@Public
@Stable
String getFinalState();
- @Private
- @Unstable
- void setFinalState(String string);
+ /**
+ * Set final state of the ApplicationMaster
+ * @param finalState final state of the ApplicationMaster
+ */
+ @Public
+ @Stable
+ void setFinalState(String finalState);
/**
- * Get diagnostic information if the application failed.
- * @return diagnostic information if the application failed
+ * Get diagnostic information on application failure.
+ * @return diagnostic information on application failure
*/
@Public
@Stable
String getDiagnostics();
- @Private
- @Unstable
- void setDiagnostics(String string);
+ /**
+ * Set diagnostic information on application failure.
+ * @param diagnostics diagnostic information on application failure
+ */
+ @Public
+ @Stable
+ void setDiagnostics(String diagnostics);
/**
- * Get the tracking URL for the ApplicationMaster
.
- * @return the tracking URL for the ApplicationMaster
+ * Get the tracking URL for the ApplicationMaster
.
+ * @return tracking URLfor the ApplicationMaster
*/
@Public
@Stable
String getTrackingUrl();
- @Private
- @Unstable
- void setTrackingUrl(String historyUrl);
+ /**
+ * Set the tracking URLfor the ApplicationMaster
+ * @param url tracking URLfor the
+ * ApplicationMaster
+ */
+ @Public
+ @Stable
+ void setTrackingUrl(String url);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterResponse.java
index 45682bf5dc7..b7710c41cab 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterResponse.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterResponse.java
@@ -24,11 +24,11 @@ import org.apache.hadoop.yarn.api.AMRMProtocol;
/**
* The response sent by the ResourceManager
to a
- * ApplicationMaster
on it's completion via the
- * {@link AMRMProtocol#finishApplicationMaster(FinishApplicationMasterRequest)}
- * api.
ApplicationMaster
on it's completion.
*
* Currently, this is empty.
+ * + * @see AMRMProtocol#finishApplicationMaster(FinishApplicationMasterRequest) */ @Public @Stable diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationRequest.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationRequest.java index 0074b6f9832..023ee3c4ac7 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationRequest.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationRequest.java @@ -18,10 +18,34 @@ package org.apache.hadoop.yarn.api.protocolrecords; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Stable; +import org.apache.hadoop.classification.InterfaceStability.Unstable; +import org.apache.hadoop.yarn.api.ClientRMProtocol; import org.apache.hadoop.yarn.api.records.ApplicationId; +/** + *The request sent by the client to the ResourceManager
+ * to abort a submitted application.
The request includes the {@link ApplicationId} of the application to be + * aborted.
+ * + * @see ClientRMProtocol#finishApplication(FinishApplicationRequest) + */ +@Public +@Stable public interface FinishApplicationRequest { + /** + * Get theApplicationId
of the application to be aborted.
+ * @return ApplicationId
of the application to be aborted
+ */
+ @Public
+ @Stable
public abstract ApplicationId getApplicationId();
+ @Private
+ @Unstable
public abstract void setApplicationId(ApplicationId applicationId);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationResponse.java
index 18e76a4522f..cd0c728e536 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationResponse.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationResponse.java
@@ -18,6 +18,20 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * The response sent by the ResourceManager
to the client
+ * aborting a submitted application.
Currently it's empty.
+ * + * @see ClientRMProtocol#finishApplication(FinishApplicationRequest) + */ +@Public +@Stable public interface FinishApplicationResponse { } diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsRequest.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsRequest.java index f3b5bf7cb9b..a958331244c 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsRequest.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsRequest.java @@ -18,5 +18,17 @@ package org.apache.hadoop.yarn.api.protocolrecords; +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Stable; +import org.apache.hadoop.yarn.api.ClientRMProtocol; + +/** + *The request from clients to get a report of all Applications
+ * in the cluster from the ResourceManager
.
The response sent by the ResourceManager
to a client
+ * requesting an {@link ApplicationReport} for all applications.
The ApplicationReport
for each application includes details
+ * such as user, queue, name, host on which the ApplicationMaster
+ * is running, RPC port, tracking URL, diagnostics, start time etc.
ApplicationReport
for all applications.
+ * @return ApplicationReport
for all applications
+ */
+ @Public
+ @Stable
ListThe request sent by a client to the ResourceManager
to
+ * get an {@link ApplicationReport} for an application.
The request should include the {@link ApplicationId} of the + * application.
+ * + * @see ClientRMProtocol#getApplicationReport(GetApplicationReportRequest) + * @see ApplicationReport + */ +@Public +@Stable public interface GetApplicationReportRequest { - public abstract ApplicationId getApplicationId(); - public abstract void setApplicationId(ApplicationId applicationId); + /** + * Get theApplicationId
of the application.
+ * @return ApplicationId
of the application
+ */
+ public ApplicationId getApplicationId();
+
+ /**
+ * Set the ApplicationId
of the application
+ * @param applicationId ApplicationId
of the application
+ */
+ public void setApplicationId(ApplicationId applicationId);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
index ddc18d811a4..cc93f20c271 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
@@ -18,9 +18,35 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
import org.apache.hadoop.yarn.api.records.ApplicationReport;
+/**
+ * The response sent by the ResourceManager
to a client
+ * requesting an application report.
The response includes an {@link ApplicationReport} which has details such
+ * as user, queue, name, host on which the ApplicationMaster
is
+ * running, RPC port, tracking URL, diagnostics, start time etc.
ApplicationReport
for the application.
+ * @return ApplicationReport
for the application
+ */
+ @Public
+ @Stable
+ public ApplicationReport getApplicationReport();
+
+ @Private
+ @Unstable
+ public void setApplicationReport(ApplicationReport ApplicationReport);
}
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 000653948de..81b93428036 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
@@ -18,6 +18,18 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * The request sent by clients to get cluster metrics from the
+ * ResourceManager
.
The response sent by the ResourceManager
to a client
+ * requesting cluster metrics.
+ *
+ * @see YarnClusterMetrics
+ * @see ClientRMProtocol#getClusterMetrics(GetClusterMetricsRequest)
+ */
+@Public
+@Stable
public interface GetClusterMetricsResponse {
- public abstract YarnClusterMetrics getClusterMetrics();
- public abstract void setClusterMetrics(YarnClusterMetrics metrics);
+ /**
+ * Get the YarnClusterMetrics
for the cluster.
+ * @return YarnClusterMetrics
for the cluster
+ */
+ @Public
+ @Stable
+ public YarnClusterMetrics getClusterMetrics();
+
+ @Private
+ @Unstable
+ public void setClusterMetrics(YarnClusterMetrics metrics);
}
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 c6326ed2636..35ab1693717 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
@@ -18,6 +18,18 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ *
The request from clients to get a report of all nodes
+ * in the cluster from the ResourceManager
.
The response sent by the ResourceManager
to a client
+ * requesting an {@link NodeReport} for all nodes.
The The request sent by the NodeReport
contains per-node information such as
+ * available resources, number of containers, tracking url, rack name, health
+ * status etc.
+ *
+ * @see NodeReport
+ * @see ClientRMProtocol#getClusterNodes(GetClusterNodesRequest)
+ */
+@Public
+@Stable
public interface GetClusterNodesResponse {
+ /**
+ * Get NodeReport
for all nodes in the cluster.
+ * @return NodeReport
for all nodes in the cluster
+ */
+ @Public
+ @Stable
ListApplicationMaster
to the
- * NodeManager
to get {@link ContainerStatus} of a container via
- * {@link ContainerManager#getContainerStatus(GetContainerStatusRequest)}.NodeManager
to get {@link ContainerStatus} of a container.
ContainerId
of container for which to obtain the
+ * ContainerStatus
+ * @param containerId ContainerId
of container for which to
+ * obtain the ContainerStatus
+ */
+ @Public
+ @Stable
public abstract void setContainerId(ContainerId containerId);
}
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 7893c733a60..03b361d8377 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
@@ -28,8 +28,9 @@ import org.apache.hadoop.yarn.api.records.ContainerStatus;
/**
* The response sent by the NodeManager
to the
* ApplicationMaster
when asked to obtainer status
- * of a container via
- * {@link ContainerManager#getContainerStatus(GetContainerStatusRequest)}.
The request sent by clients to get a new {@link ApplicationId} for + * submitting an application.
+ * + * @see ClientRMProtocol#getNewApplicationId(GetNewApplicationIdRequest) + */ +@Public +@Stable public interface GetNewApplicationIdRequest { } diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdResponse.java index 62a48a9b5fb..93a1ab680b3 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdResponse.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdResponse.java @@ -18,9 +18,33 @@ package org.apache.hadoop.yarn.api.protocolrecords; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Stable; +import org.apache.hadoop.classification.InterfaceStability.Unstable; +import org.apache.hadoop.yarn.api.ClientRMProtocol; import org.apache.hadoop.yarn.api.records.ApplicationId; +/** + *The response sent by the ResourceManager
to the client for
+ * a request to a new {@link ApplicationId} for submitting applications.
ApplicationId
allocated by the
+ * ResourceManager
.
+ * @return new ApplicationId
allocated by the
+ * ResourceManager
+ */
+ @Public
+ @Stable
public abstract ApplicationId getApplicationId();
+
+ @Private
+ @Unstable
public abstract void setApplicationId(ApplicationId applicationId);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoRequest.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoRequest.java
index 872f8aba5fc..435b03cf170 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoRequest.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoRequest.java
@@ -18,17 +18,70 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * The request sent by clients to get queue information
+ * from the ResourceManager
.
true
if applications' information is to be included,
+ * else false
+ */
boolean getIncludeApplications();
+
+ /**
+ * Should we get fetch information about active applications?
+ * @param includeApplications fetch information about active
+ * applications?
+ */
void setIncludeApplications(boolean includeApplications);
+ /**
+ * Is information about child queues required?
+ * @return true
if information about child queues is required,
+ * else false
+ */
boolean getIncludeChildQueues();
+
+ /**
+ * Should we fetch information about child queues?
+ * @param includeChildQueues fetch information about child queues?
+ */
void setIncludeChildQueues(boolean includeChildQueues);
+ /**
+ * Is information on the entire child queue hierarchy required?
+ * @return true
if information about entire hierarchy is
+ * required, false
otherwise
+ */
boolean getRecursive();
+
+ /**
+ * Should we fetch information on the entire child queue hierarchy?
+ * @param recursive fetch information on the entire child queue
+ * hierarchy?
+ */
void setRecursive(boolean recursive);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java
index 8cef4e93c6c..830945744f3 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java
@@ -18,9 +18,34 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
import org.apache.hadoop.yarn.api.records.QueueInfo;
+/**
+ * The response sent by the ResourceManager
to a client
+ * requesting information about queues in the system.
The response includes a {@link QueueInfo} which has details such as + * queue name, used/total capacities, running applications, child queues etc + * .
+ * + * @see QueueInfo + * @see ClientRMProtocol#getQueueInfo(GetQueueInfoRequest) + */ +@Public +@Stable public interface GetQueueInfoResponse { + /** + * Get theQueueInfo
for the specified queue.
+ * @return QueueInfo
for the specified queue
+ */
QueueInfo getQueueInfo();
+
+ @Private
+ @Unstable
void setQueueInfo(QueueInfo queueInfo);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java
index 44fd32e8bb6..ec16c1cb11e 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java
@@ -18,6 +18,18 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * The request sent by clients to the ResourceManager
to
+ * get queue acls for the current user.
The response sent by the ResourceManager
to clients
+ * seeking queue acls for the user.
The response contains a list of {@link QueueUserACLInfo} which + * provides information about {@link QueueACL} per queue.
+ * + * @see QueueACL + * @see QueueUserACLInfo + * @see ClientRMProtocol#getQueueUserAcls(GetQueueUserAclsInfoRequest) + */ +@Public +@Stable public interface GetQueueUserAclsInfoResponse { + /** + * Get theQueueUserACLInfo
per queue for the user.
+ * @return QueueUserACLInfo
per queue for the user
+ */
+ @Public
+ @Stable
public ListThe request sent by the ApplicationMaster
to
- * ResourceManager
on registration via the
- * {@link AMRMProtocol#registerApplicationMaster(RegisterApplicationMasterRequest)}
- * api.
ResourceManager
on registration.
*
* The registration includes details such as: *
ApplicationAttemptId
being managed by the
* ApplicationMaster
.
* @return ApplicationAttemptId
being managed by the
* ApplicationMaster
@@ -57,44 +57,69 @@ public interface RegisterApplicationMasterRequest {
@Stable
ApplicationAttemptId getApplicationAttemptId();
- @Private
- @Unstable
+ /**
+ * Set the ApplicationAttemptId
being managed by the
+ * ApplicationMaster
.
+ * @param applicationAttemptId ApplicationAttemptId
being managed
+ * by the ApplicationMaster
+ */
+ @Public
+ @Stable
void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId);
/**
- * Get the host on which the ApplicationMaster
is running.
- * @return host on which the ApplicationMaster
is running
+ * Get the host on which the ApplicationMaster
is
+ * running.
+ * @return host on which the ApplicationMaster
is running
*/
@Public
@Stable
String getHost();
+ /**
+ * Set the host on which the ApplicationMaster
is
+ * running.
+ * @param host host on which the ApplicationMaster
+ * is running
+ */
@Private
@Unstable
void setHost(String host);
/**
- * Get the RPC port on which the ApplicationMaster
is responding.
- * @return the RPC port on which the ApplicationMaster
is
+ * Get the RPC port on which the ApplicationMaster
+ * is responding.
+ * @return the RPC port on which the ApplicationMaster
is
* responding
*/
@Public
@Stable
int getRpcPort();
- @Private
- @Unstable
+ /**
+ * Set the RPC port on which the ApplicationMaster
is
+ * responding.
+ * @param port RPC port on which the ApplicationMaster
is
+ * responding
+ */
+ @Public
+ @Stable
void setRpcPort(int port);
/**
- * Get the tracking URL for the ApplicationMaster
.
- * @return the tracking URL for the ApplicationMaster
+ * Get the tracking URL for the ApplicationMaster
.
+ * @return tracking URL for the ApplicationMaster
*/
@Public
@Stable
String getTrackingUrl();
- @Private
- @Unstable
- void setTrackingUrl(String string);
+ /**
+ * Set the tracking URL for the ApplicationMaster
.
+ * @param trackingUrl tracking URL for the
+ * ApplicationMaster
+ */
+ @Public
+ @Stable
+ void setTrackingUrl(String trackingUrl);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
index b2232b8d7c1..9a1895fb14e 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
@@ -27,9 +27,7 @@ import org.apache.hadoop.yarn.api.records.Resource;
/**
* The response sent by the ResourceManager
to a new
- * ApplicationMaster
on registration via the
- * {@link AMRMProtocol#registerApplicationMaster(RegisterApplicationMasterRequest)}
- * api.
ApplicationMaster
on registration.
*
* The response contains critical details such as: *
The request sent by the ApplicationMaster
to the
- * NodeManager
to start a container via
- * {@link ContainerManager#startContainer(StartContainerRequest)}.
NodeManager
to start a container.
*
* The ApplicationMaster
has to provide details such as
* allocated resource capability, security tokens (if enabled), command
@@ -36,6 +33,7 @@ import org.apache.hadoop.yarn.api.records.ContainerLaunchContext;
* necessary binaries/jar/shared-objects etc. via the
* {@link ContainerLaunchContext}.
ContainerLaunchContext
for the container to be started
+ * by the NodeManager
+ * @param context ContainerLaunchContext
for the container to be
+ * started by the NodeManager
+ */
+ @Public
+ @Stable
public abstract void setContainerLaunchContext(ContainerLaunchContext context);
}
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 ffbdbc9ee1a..b648eb67e39 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
@@ -25,8 +25,9 @@ import org.apache.hadoop.yarn.api.ContainerManager;
/**
* The response sent by the NodeManager
to the
* ApplicationMaster
when asked to start an
- * allocated container via
- * {@link ContainerManager#startContainer(StartContainerRequest)}.
The request sent by the ApplicationMaster
to the
- * NodeManager
to stop a container via
- * {@link ContainerManager#stopContainer(StopContainerRequest)}.
NodeManager
to stop a container.
+ *
+ * @see ContainerManager#stopContainer(StopContainerRequest)
*/
@Public
@Stable
@@ -41,7 +40,11 @@ public interface StopContainerRequest {
@Stable
ContainerId getContainerId();
- @Private
- @Unstable
+ /**
+ * Set the ContainerId
of the container to be stopped.
+ * @param containerId ContainerId
of the container to be stopped
+ */
+ @Public
+ @Stable
void setContainerId(ContainerId containerId);
}
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 6b59ae66703..6bfd7cffe86 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
@@ -25,8 +25,9 @@ import org.apache.hadoop.yarn.api.ContainerManager;
/**
* The response sent by the NodeManager
to the
* ApplicationMaster
when asked to stop an
- * allocated container via
- * {@link ContainerManager#stopContainer(StopContainerRequest)}.
The request sent by a client to submit an application to the
+ * ResourceManager
.
The request, via {@link ApplicationSubmissionContext}, contains
+ * details such as queue, {@link Resource} required to run the
+ * ApplicationMaster
, the equivalent of
+ * {@link ContainerLaunchContext} for launching the
+ * ApplicationMaster
etc.
+ *
+ * @see ClientRMProtocol#submitApplication(SubmitApplicationRequest)
+ */
+@Public
+@Stable
public interface SubmitApplicationRequest {
+ /**
+ * Get the ApplicationSubmissionContext
for the application.
+ * @return ApplicationSubmissionContext
for the application
+ */
+ @Public
+ @Stable
public abstract ApplicationSubmissionContext getApplicationSubmissionContext();
- public abstract void setApplicationSubmissionContext(ApplicationSubmissionContext context);
+
+ /**
+ * Set the ApplicationSubmissionContext
for the application.
+ * @param context ApplicationSubmissionContext
for the
+ * application
+ */
+ @Public
+ @Stable
+ public abstract void setApplicationSubmissionContext(
+ ApplicationSubmissionContext context);
}
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 9b1df9f1f8d..618641be6ae 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
@@ -18,6 +18,18 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ *
The response sent by the ResourceManager
to a client on
+ * application submission.
The response sent by the ResourceManager
the
- * ApplicationMaster
during resource negotiation via
- * {@link AMRMProtocol#allocate(AllocateRequest)}.
ApplicationMaster
during resource negotiation.
*
* The response includes: *
Container
by the
* ResourceManager
.
- * @return list of newly allocated Container
+ * @return list of newly allocated Container
*/
@Public
@Stable
@@ -112,7 +113,10 @@ public interface AMResponse {
public void clearNewContainers();
/**
- * Get available headroom for resources in the cluster for the application.
+ * Get the available headroom for resources in the cluster for the
+ * application.
+ * @return limit available headroom for resources in the cluster for the
+ * application
*/
@Public
@Stable
@@ -123,8 +127,8 @@ public interface AMResponse {
public void setAvailableResources(Resource limit);
/**
- * Get the list of completed containers.
- * @return the list of completed containers
+ * Get the list of completed containers.
+ * @return the list of completed containers
*/
@Public
@Stable
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
index 5512db4beb6..ca7a6f415a1 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
@@ -18,38 +18,172 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * ApplicationReport
is a report of an application.
It includes details such as: + *
ApplicationMaster
is running.ApplicationMaster
.ApplicationId
of the application.
+ * @return ApplicationId
of the application
+ */
+ @Public
+ @Stable
ApplicationId getApplicationId();
+
+ @Private
+ @Unstable
void setApplicationId(ApplicationId applicationId);
+ /**
+ * Get the user who submitted the application.
+ * @return user who submitted the application
+ */
+ @Public
+ @Stable
String getUser();
+
+ @Private
+ @Unstable
void setUser(String user);
+ /**
+ * Get the queue to which the application was submitted.
+ * @return queue to which the application was submitted
+ */
+ @Public
+ @Stable
String getQueue();
+
+ @Private
+ @Unstable
void setQueue(String queue);
+ /**
+ * Get the user-defined name of the application.
+ * @return name of the application
+ */
+ @Public
+ @Stable
String getName();
+
+ @Private
+ @Unstable
void setName(String name);
+ /**
+ * Get the host on which the ApplicationMaster
+ * is running.
+ * @return host on which the ApplicationMaster
+ * is running
+ */
+ @Public
+ @Stable
String getHost();
+
+ @Private
+ @Unstable
void setHost(String host);
+ /**
+ * Get the RPC port of the ApplicationMaster
.
+ * @return RPC port of the ApplicationMaster
+ */
+ @Public
+ @Stable
int getRpcPort();
+
+ @Private
+ @Unstable
void setRpcPort(int rpcPort);
+ /**
+ * Get the client token for communicating with the
+ * ApplicationMaster
.
+ * @return client token for communicating with the
+ * ApplicationMaster
+ */
+ @Public
+ @Stable
String getClientToken();
+
+ @Private
+ @Unstable
void setClientToken(String clientToken);
+ /**
+ * Get the ApplicationState
of the application.
+ * @return ApplicationState
of the application
+ */
+ @Public
+ @Stable
ApplicationState getState();
+
+ @Private
+ @Unstable
void setState(ApplicationState state);
+ /**
+ * Get the diagnositic information of the application in case of
+ * errors.
+ * @return diagnositic information of the application in case
+ * of errors
+ */
+ @Public
+ @Stable
String getDiagnostics();
+
+ @Private
+ @Unstable
void setDiagnostics(String diagnostics);
+ /**
+ * Get the tracking url for the application.
+ * @return tracking url for the application
+ */
+ @Public
+ @Stable
String getTrackingUrl();
+
+ @Private
+ @Unstable
void setTrackingUrl(String url);
+ /**
+ * Get the start time of the application.
+ * @return start time of the application
+ */
+ @Public
+ @Stable
long getStartTime();
+
+ @Private
+ @Unstable
void setStartTime(long startTime);
}
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 e8de1f3f624..46511ca0d27 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
@@ -22,68 +22,319 @@ import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
-public interface ApplicationSubmissionContext {
- public abstract ApplicationId getApplicationId();
- public abstract String getApplicationName();
- public abstract Resource getMasterCapability();
-
- public abstract MapApplicationSubmissionContext
represents the all of the
+ * information needed by the ResourceManager
to launch
+ * the ApplicationMaster
for an application.
It includes details such as: + *
ApplicationMaster
.
+ * ApplicationMaster
container such
+ * as binaries, jar, shared-objects, side-files etc.
+ * ApplicationMaster
+ * process.
+ * ApplicationMaster
.ApplicationId
of the submitted application.
+ * @return ApplicationId
of the submitted application
+ */
+ @Public
+ @Stable
+ public ApplicationId getApplicationId();
+ /**
+ * Set the ApplicationId
of the submitted application.
+ * @param appplicationId ApplicationId
of the submitted
+ * application
+ */
+ @Public
+ @Stable
+ public void setApplicationId(ApplicationId appplicationId);
+
+ /**
+ * Get the application name.
+ * @return application name
+ */
+ @Public
+ @Stable
+ public String getApplicationName();
- public abstract void setApplicationId(ApplicationId appplicationId);
- public abstract void setApplicationName(String applicationName);
- public abstract void setMasterCapability(Resource masterCapability);
+ /**
+ * Set the application name.
+ * @param applicationName application name
+ */
+ @Public
+ @Stable
+ public void setApplicationName(String applicationName);
- public abstract void addAllResources(MapPriority
of the application.
+ * @return Priority
of the application
+ */
+ @Public
+ @Stable
+ public Priority getPriority();
+
+ /**
+ * Set the Priority
of the application.
+ * @param priority Priority
of the application
+ */
+ @Public
+ @Stable
+ public void setPriority(Priority priority);
- public abstract void setFsTokensTodo(ByteBuffer fsTokensTodo);
+ /**
+ * Get the user submitting the application.
+ * @return user submitting the application
+ */
+ @Public
+ @Stable
+ public String getUser();
- public abstract void addAllEnvironment(MapResource
required to run the
+ * ApplicationMaster
.
+ * @return Resource
required to run the
+ * ApplicationMaster
+ */
+ @Public
+ @Stable
+ public Resource getMasterCapability();
- public abstract void setQueue(String queue);
- public abstract void setPriority(Priority priority);
- public abstract void setUser(String user);
+ /**
+ * Set Resource
required to run the
+ * ApplicationMaster
.
+ * @param masterCapability Resource
required to run the
+ * ApplicationMaster
+ */
+ @Public
+ @Stable
+ public void setMasterCapability(Resource masterCapability);
+
+ @Private
+ @Unstable
+ public MapLocalResource
required to run the
+ * ApplicationMaster
.
+ * @return LocalResource
required to run the
+ * ApplicationMaster
+ */
+ @Public
+ @Stable
+ public MapLocalResource
required to run the
+ * ApplicationMaster
.
+ * @param resources all LocalResource
required to run the
+ * ApplicationMaster
+ */
+ @Public
+ @Stable
+ public void addAllResourcesTodo(MapApplicationMaster
.
+ * @return file-system tokens for the ApplicationMaster
+ */
+ @Public
+ @Stable
+ public ByteBuffer getFsTokensTodo();
+
+ /**
+ * Set file-system tokens for the ApplicationMaster
.
+ * @param fsTokens file-system tokens for the ApplicationMaster
+ */
+ @Public
+ @Stable
+ public void setFsTokensTodo(ByteBuffer fsTokens);
+
+ /**
+ * Get the environment variables for the
+ * ApplicationMaster
.
+ * @return environment variables for the ApplicationMaster
+ */
+ @Public
+ @Stable
+ public MapApplicationMaster
.
+ * @param environment environment variables for the
+ * ApplicationMaster
+ */
+ @Public
+ @Stable
+ public void addAllEnvironment(MapApplicationMaster
.
+ * @return commands to launch the ApplicationMaster
+ */
+ @Public
+ @Stable
+ public ListApplicationMaster
.
+ * @param commands commands to launch the ApplicationMaster
+ */
+ @Public
+ @Stable
+ public void addAllCommands(ListContainerLaunchContext
represents the all of the information
@@ -43,17 +44,11 @@ import org.apache.hadoop.classification.InterfaceStability.Unstable;
*
*
ContainerId
of container to be launched.
+ * @param containerId et ContainerId
of container to be launched
+ */
+ @Public
+ @Stable
void setContainerId(ContainerId containerId);
/**
@@ -78,8 +77,12 @@ public interface ContainerLaunchContext {
@Stable
String getUser();
- @Private
- @Unstable
+ /**
+ * Set the user to whom the container has been allocated
+ * @param user user to whom the container has been allocated
+ */
+ @Public
+ @Stable
void setUser(String user);
/**
@@ -91,9 +94,14 @@ public interface ContainerLaunchContext {
@Public
@Stable
Resource getResource();
-
- @Private
- @Unstable
+
+ /**
+ * Set the Resource
allocated to the container by the
+ * ResourceManager
.
+ * @param resource allocated resource
+ */
+ @Public
+ @Stable
void setResource(Resource resource);
/**
@@ -104,8 +112,12 @@ public interface ContainerLaunchContext {
@Stable
ByteBuffer getContainerTokens();
- @Private
- @Unstable
+ /**
+ * Set security tokens (if security is enabled).
+ * @param containerToken security tokens
+ */
+ @Public
+ @Stable
void setContainerTokens(ByteBuffer containerToken);
/**
@@ -119,9 +131,13 @@ public interface ContainerLaunchContext {
@Private
@Unstable
LocalResource getLocalResource(String key);
-
- @Private
- @Unstable
+
+ /**
+ * Add all LocalResource
required by the container.
+ * @param localResources LocalResource
required by the container
+ */
+ @Public
+ @Stable
void addAllLocalResources(MapLocalResource
represents a local resource required to
+ * run a container.
The NodeManager
is responsible for localizing the resource
+ * prior to launching the container.
Applications can specify {@link LocalResourceType} and + * {@link LocalResourceVisibility}.
+ * + * @see LocalResourceType + * @see LocalResourceVisibility + * @see ContainerLaunchContext + * @see ApplicationSubmissionContext + * @see ContainerManager#startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest) + */ +@Public +@Stable public interface LocalResource { - public abstract URL getResource(); - public abstract long getSize(); - public abstract long getTimestamp(); - public abstract LocalResourceType getType(); - public abstract LocalResourceVisibility getVisibility(); + /** + * Get the location of the resource to be localized. + * @return location of the resource to be localized + */ + public URL getResource(); - public abstract void setResource(URL resource); - public abstract void setSize(long size); - public abstract void setTimestamp(long timestamp); - public abstract void setType(LocalResourceType type); - public abstract void setVisibility(LocalResourceVisibility visibility); + /** + * Set location of the resource to be localized. + * @param resource location of the resource to be localized + */ + public void setResource(URL resource); + + /** + * Get the size of the resource to be localized. + * @return size of the resource to be localized + */ + public long getSize(); + + /** + * Set the size of the resource to be localized. + * @param size size of the resource to be localized + */ + public void setSize(long size); + + /** + * Get the original timestamp of the resource to be localized, used + * for verification. + * @return timestamp of the resource to be localized + */ + public long getTimestamp(); + + /** + * Set the timestamp of the resource to be localized, used + * for verification. + * @param timestamp timestamp of the resource to be localized + */ + public void setTimestamp(long timestamp); + + /** + * Get theLocalResourceType
of the resource to be localized.
+ * @return LocalResourceType
of the resource to be localized
+ */
+ public LocalResourceType getType();
+
+ /**
+ * Set the LocalResourceType
of the resource to be localized.
+ * @param type LocalResourceType
of the resource to be localized
+ */
+ public void setType(LocalResourceType type);
+
+ /**
+ * Get the LocalResourceVisibility
of the resource to be
+ * localized.
+ * @return LocalResourceVisibility
of the resource to be
+ * localized
+ */
+ public LocalResourceVisibility getVisibility();
+
+ /**
+ * Set the LocalResourceVisibility
of the resource to be
+ * localized.
+ * @param visibility LocalResourceVisibility
of the resource to be
+ * localized
+ */
+ public void setVisibility(LocalResourceVisibility visibility);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java
index 72a1dd04d2e..0cfed1c4d2d 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java
@@ -18,6 +18,42 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ContainerManager;
+
+/**
+ * LocalResourceType
specifies the type
+ * of a resource localized by the NodeManager
.
The type can be one of: + *
NodeManager
.
+ * NodeManager
.
+ */
+ ARCHIVE,
+
+ /**
+ * Regular file i.e. uninterpreted bytes.
+ */
+ FILE
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceVisibility.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceVisibility.java
index 45932131e6e..232ab0a3531 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceVisibility.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceVisibility.java
@@ -18,6 +18,48 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ContainerManager;
+
+/**
+ * LocalResourceVisibility
specifies the visibility
+ * of a resource localized by the NodeManager
.
The visibility can be one of: + *
NodeHealthStatus
is a summary of the health status of the
+ * node.
It includes information such as: + *
true
if the node is healthy, else false
+ */
+ @Public
+ @Stable
boolean getIsNodeHealthy();
- String getHealthReport();
-
- long getLastHealthReportTime();
-
+ @Private
+ @Unstable
void setIsNodeHealthy(boolean isNodeHealthy);
+ /**
+ * Get the diagnostic health report of the node.
+ * @return diagnostic health report of the node
+ */
+ @Public
+ @Stable
+ String getHealthReport();
+
+ @Private
+ @Unstable
void setHealthReport(String healthReport);
+ /**
+ * Get the last timestamp at which the health report was received.
+ * @return last timestamp at which the health report was received
+ */
+ @Public
+ @Stable
+ long getLastHealthReportTime();
+
+ @Private
+ @Unstable
void setLastHealthReportTime(long lastHealthReport);
}
\ No newline at end of file
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java
index 7e333e909b2..8241db6b1b2 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java
@@ -18,19 +18,113 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * NodeReport
is a summary of runtime information of a
+ * node in the cluster.
It includes details such as: + *
NodeId
of the node.
+ * @return NodeId
of the node
+ */
NodeId getNodeId();
+
+ @Private
+ @Unstable
void setNodeId(NodeId nodeId);
+
+ /**
+ * Get the http address of the node.
+ * @return http address of the node
+ */
+ @Public
+ @Stable
String getHttpAddress();
+
+ @Private
+ @Unstable
void setHttpAddress(String httpAddress);
+
+ /**
+ * Get the rack name for the node.
+ * @return rack name for the node
+ */
+ @Public
+ @Stable
String getRackName();
+
+ @Private
+ @Unstable
void setRackName(String rackName);
+
+ /**
+ * Get used Resource
on the node.
+ * @return used Resource
on the node
+ */
+ @Public
+ @Stable
Resource getUsed();
+
+ @Private
+ @Unstable
void setUsed(Resource used);
+
+ /**
+ * Get the total Resource
on the node.
+ * @return total Resource
on the node
+ */
+ @Public
+ @Stable
Resource getCapability();
+
+ @Private
+ @Unstable
void setCapability(Resource capability);
+
+ /**
+ * Get the number of running containers on the node.
+ * @return number of running containers on the node
+ */
+ @Public
+ @Stable
int getNumContainers();
+
+ @Private
+ @Unstable
void setNumContainers(int numContainers);
+
+ /**
+ * Get the NodeHealthStatus
of the node.
+ * @return NodeHealthStatus
of the node
+ */
+ @Public
+ @Stable
NodeHealthStatus getNodeHealthStatus();
+
+ @Private
+ @Unstable
void setNodeHealthStatus(NodeHealthStatus nodeHealthStatus);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java
index 826222880ae..eab91fa3a8d 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java
@@ -18,8 +18,39 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
+/**
+ * QueueACL
enumerates the various ACLs for queues.
The ACLs are one of: + *
QueueInfo
is a report of the runtime information of the queue. + * + *It includes information such as: + *
QueueState
of the queue.
+ * @return QueueState
of the queue
+ */
+ @Public
+ @Stable
QueueState getQueueState();
+
+ @Private
+ @Unstable
void setQueueState(QueueState queueState);
}
diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java
index 32696b6663b..3d019669357 100644
--- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java
+++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java
@@ -18,10 +18,33 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ClientRMProtocol;
+
/**
- * State of a Queue
+ * State of a Queue.
+ * + *A queue is one of: + *
QueueUserACLInfo
provides information {@link QueueACL} for
+ * the given user.
QueueACL
for the given user.
+ * @return list of QueueACL
for the given user
+ */
+ @Public
+ @Stable
List