You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by to...@apache.org on 2011/09/08 03:39:23 UTC
svn commit: r1166495 [3/6] - in
/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project: ./ conf/
hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/
hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/mai...
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java Thu Sep 8 01:39:07 2011
@@ -20,36 +20,176 @@ package org.apache.hadoop.yarn.api.proto
import java.util.List;
+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.AMRMProtocol;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.api.records.Container;
import org.apache.hadoop.yarn.api.records.ContainerId;
import org.apache.hadoop.yarn.api.records.ResourceRequest;
+/**
+ * <p>The core request sent by the <code>ApplicationMaster</code> to the
+ * <code>ResourceManager</code> to obtain resources in the cluster.</p>
+ *
+ * <p>The request includes:
+ * <ul>
+ * <li>
+ * {@link ApplicationAttemptId} being managed by the
+ * <code>ApplicationMaster</code>
+ * </li>
+ * <li>A response id to track duplicate responses.</li>
+ * <li>Progress information.</li>
+ * <li>
+ * A list of {@link ResourceRequest} to inform the
+ * <code>ResourceManager</code> about the application's
+ * resource requirements.
+ * </li>
+ * <li>
+ * A list of unused {@link Container} which are being returned.
+ * </li>
+ * <li></li>
+ * </ul>
+ * </p>
+ *
+ * @see AMRMProtocol#allocate(AllocateRequest)
+ */
+@Public
+@Stable
public interface AllocateRequest {
+ /**
+ * Get the <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>.
+ * @return <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
ApplicationAttemptId getApplicationAttemptId();
+
+ /**
+ * Set the <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>.
+ * @param applicationAttemptId <code>ApplicationAttemptId</code> being managed
+ * by the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId);
+ /**
+ * Get the <em>response id</em>.
+ * @return <em>response id</em>
+ */
+ @Public
+ @Stable
int getResponseId();
+
+ /**
+ * Set the <em>response id</em>
+ * @param id <em>response id</em>
+ */
+ @Public
+ @Stable
void setResponseId(int id);
+ /**
+ * Get the <em>current progress</em> of application.
+ * @return <em>current progress</em> of application
+ */
+ @Public
+ @Stable
float getProgress();
+
+ /**
+ * Set the <em>current progress</em> of application
+ * @param progress <em>current progress</em> of application
+ */
+ @Public
+ @Stable
void setProgress(float progress);
+ /**
+ * Get the list of <code>ResourceRequest</code> to upate the
+ * <code>ResourceManager</code> about the application's resource requirements.
+ * @return the list of <code>ResourceRequest</code>
+ */
+ @Public
+ @Stable
List<ResourceRequest> getAskList();
+
+ @Private
+ @Unstable
ResourceRequest getAsk(int index);
+
+ @Private
+ @Unstable
int getAskCount();
- List<ContainerId> getReleaseList();
- ContainerId getRelease(int index);
- int getReleaseCount();
-
+ /**
+ * Add list of <code>ResourceRequest</code> to upate the
+ * <code>ResourceManager</code> about the application's resource requirements.
+ * @param resourceRequest list of <code>ResourceRequest</code> to upate the
+ * <code>ResourceManager</code> about the application's
+ * resource requirements
+ */
+ @Public
+ @Stable
void addAllAsks(List<ResourceRequest> resourceRequest);
+
+ @Private
+ @Unstable
void addAsk(ResourceRequest request);
+
+ @Private
+ @Unstable
void removeAsk(int index);
+
+ @Private
+ @Unstable
void clearAsks();
+
+ /**
+ * Get the list of <code>ContainerId</code> of unused containers being
+ * released by the <code>ApplicationMaster</code>.
+ * @return list of <code>ContainerId</code> of unused containers being
+ * released by the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ List<ContainerId> getReleaseList();
+
+ @Private
+ @Unstable
+ ContainerId getRelease(int index);
+ @Private
+ @Unstable
+ int getReleaseCount();
+
+ /**
+ * Add the list of <code>ContainerId</code> of unused containers being
+ * released by the <code>ApplicationMaster</code>
+ * @param releaseContainers list of <code>ContainerId</code> of unused
+ * containers being released by the <
+ * code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
void addAllReleases(List<ContainerId> releaseContainers);
+
+ @Private
+ @Unstable
void addRelease(ContainerId container);
+
+ @Private
+ @Unstable
void removeRelease(int index);
+
+ @Private
+ @Unstable
void clearReleases();
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java Thu Sep 8 01:39:07 2011
@@ -18,10 +18,47 @@
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.AMRMProtocol;
import org.apache.hadoop.yarn.api.records.AMResponse;
+import org.apache.hadoop.yarn.api.records.Container;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> the
+ * <code>ApplicationMaster</code> during resource negotiation.</p>
+ *
+ * <p>The response, via {@link AMResponse}, includes:
+ * <ul>
+ * <li>Response ID to track duplicate responses.</li>
+ * <li>
+ * A reboot flag to let the <code>ApplicationMaster</code> that its
+ * horribly out of sync and needs to reboot.</li>
+ * <li>A list of newly allocated {@link Container}.</li>
+ * <li>A list of completed {@link Container}.</li>
+ * <li>
+ * The available headroom for resources in the cluster for the
+ * application.
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @see AMRMProtocol#allocate(AllocateRequest)
+ */
+@Public
+@Stable
public interface AllocateResponse {
+ /**
+ * Get the {@link AMResponse} sent by the <code>ResourceManager</code>.
+ * @return <code>AMResponse</code> sent by the <code>ResourceManager</code>
+ */
+ @Public
+ @Stable
public abstract AMResponse getAMResponse();
-
+
+ @Private
+ @Unstable
public abstract void setAMResponse(AMResponse amResponse);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterRequest.java Thu Sep 8 01:39:07 2011
@@ -18,21 +18,101 @@
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.AMRMProtocol;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
-
+/**
+ * <p>The finalization request sent by the <code>ApplicationMaster</code> to
+ * inform the <code>ResourceManager</code> about its completion.</p>
+ *
+ * <p>The final request includes details such:
+ * <ul>
+ * <li>
+ * {@link ApplicationAttemptId} being managed by the
+ * <code>ApplicationMaster</code>
+ * </li>
+ * <li>Final state of the <code>ApplicationMaster</code></li>
+ * <li>
+ * Diagnostic information in case of failure of the
+ * <code>ApplicationMaster</code>
+ * </li>
+ * <li>Tracking URL</li>
+ * </ul>
+ * </p>
+ *
+ * @see AMRMProtocol#finishApplicationMaster(FinishApplicationMasterRequest)
+ */
public interface FinishApplicationMasterRequest {
+ /**
+ * Get the <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>.
+ * @return <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
ApplicationAttemptId getApplicationAttemptId();
+
+ /**
+ * Set the <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>.
+ * @param applicationAttemptId <code>ApplicationAttemptId</code> being managed
+ * by the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
void setAppAttemptId(ApplicationAttemptId applicationAttemptId);
+ /**
+ * Get <em>final state</em> of the <code>ApplicationMaster</code>.
+ * @return <em>final state</em> of the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
String getFinalState();
- void setFinalState(String string);
-
+
+ /**
+ * Set <em>final state</em> of the <code>ApplicationMaster</code>
+ * @param finalState <em>final state</em> of the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ void setFinalState(String finalState);
+
+ /**
+ * Get <em>diagnostic information</em> on application failure.
+ * @return <em>diagnostic information</em> on application failure
+ */
+ @Public
+ @Stable
String getDiagnostics();
- void setDiagnostics(String string);
-
+
+ /**
+ * Set <em>diagnostic information</em> on application failure.
+ * @param diagnostics <em>diagnostic information</em> on application failure
+ */
+ @Public
+ @Stable
+ void setDiagnostics(String diagnostics);
+
+ /**
+ * Get the <em>tracking URL</em> for the <code>ApplicationMaster</code>.
+ * @return <em>tracking URL</em>for the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
String getTrackingUrl();
- void setTrackingUrl(String historyUrl);
+
+ /**
+ * Set the <em>tracking URL</em>for the <code>ApplicationMaster</code>
+ * @param url <em>tracking URL</em>for the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ void setTrackingUrl(String url);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationMasterResponse.java Thu Sep 8 01:39:07 2011
@@ -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.AMRMProtocol;
+
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to a
+ * <code>ApplicationMaster</code> on it's completion.</p>
+ *
+ * <p>Currently, this is empty.</p>
+ *
+ * @see AMRMProtocol#finishApplicationMaster(FinishApplicationMasterRequest)
+ */
+@Public
+@Stable
public interface FinishApplicationMasterResponse {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationRequest.java Thu Sep 8 01:39:07 2011
@@ -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;
+/**
+ * <p>The request sent by the client to the <code>ResourceManager</code>
+ * to abort a submitted application.</p>
+ *
+ * <p>The request includes the {@link ApplicationId} of the application to be
+ * aborted.</p>
+ *
+ * @see ClientRMProtocol#finishApplication(FinishApplicationRequest)
+ */
+@Public
+@Stable
public interface FinishApplicationRequest {
+ /**
+ * Get the <code>ApplicationId</code> of the application to be aborted.
+ * @return <code>ApplicationId</code> of the application to be aborted
+ */
+ @Public
+ @Stable
public abstract ApplicationId getApplicationId();
+ @Private
+ @Unstable
public abstract void setApplicationId(ApplicationId applicationId);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/FinishApplicationResponse.java Thu Sep 8 01:39:07 2011
@@ -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;
+
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to the client
+ * aborting a submitted application.</p>
+ *
+ * <p>Currently it's empty.</p>
+ *
+ * @see ClientRMProtocol#finishApplication(FinishApplicationRequest)
+ */
+@Public
+@Stable
public interface FinishApplicationResponse {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsRequest.java Thu Sep 8 01:39:07 2011
@@ -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;
+
+/**
+ * <p>The request from clients to get a report of all Applications
+ * in the cluster from the <code>ResourceManager</code>.</p>
+ *
+ * @see ClientRMProtocol#getAllApplications(GetAllApplicationsRequest)
+ */
+@Public
+@Stable
public interface GetAllApplicationsRequest {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java Thu Sep 8 01:39:07 2011
@@ -20,9 +20,36 @@ package org.apache.hadoop.yarn.api.proto
import java.util.List;
+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;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to a client
+ * requesting an {@link ApplicationReport} for all applications.</p>
+ *
+ * <p>The <code>ApplicationReport</code> for each application includes details
+ * such as user, queue, name, host on which the <code>ApplicationMaster</code>
+ * is running, RPC port, tracking URL, diagnostics, start time etc.</p>
+ *
+ * @see ApplicationReport
+ * @see ClientRMProtocol#getAllApplications(GetAllApplicationsRequest)
+ */
+@Public
+@Stable
public interface GetAllApplicationsResponse {
+ /**
+ * Get <code>ApplicationReport</code> for all applications.
+ * @return <code>ApplicationReport</code> for all applications
+ */
+ @Public
+ @Stable
List<ApplicationReport> getApplicationList();
+
+ @Private
+ @Unstable
void setApplicationList(List<ApplicationReport> applications);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java Thu Sep 8 01:39:07 2011
@@ -18,9 +18,34 @@
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;
import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
+/**
+ * <p>The request sent by a client to the <code>ResourceManager</code> to
+ * get an {@link ApplicationReport} for an application.</p>
+ *
+ * <p>The request should include the {@link ApplicationId} of the
+ * application.</p>
+ *
+ * @see ClientRMProtocol#getApplicationReport(GetApplicationReportRequest)
+ * @see ApplicationReport
+ */
+@Public
+@Stable
public interface GetApplicationReportRequest {
- public abstract ApplicationId getApplicationId();
- public abstract void setApplicationId(ApplicationId applicationId);
+ /**
+ * Get the <code>ApplicationId</code> of the application.
+ * @return <code>ApplicationId</code> of the application
+ */
+ public ApplicationId getApplicationId();
+
+ /**
+ * Set the <code>ApplicationId</code> of the application
+ * @param applicationId <code>ApplicationId</code> of the application
+ */
+ public void setApplicationId(ApplicationId applicationId);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java Thu Sep 8 01:39:07 2011
@@ -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;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to a client
+ * requesting an application report.</p>
+ *
+ * <p>The response includes an {@link ApplicationReport} which has details such
+ * as user, queue, name, host on which the <code>ApplicationMaster</code> is
+ * running, RPC port, tracking URL, diagnostics, start time etc.</p>
+ *
+ * @see ClientRMProtocol#getApplicationReport(GetApplicationReportRequest)
+ */
+@Public
+@Stable
public interface GetApplicationReportResponse {
- public abstract ApplicationReport getApplicationReport();
- public abstract void setApplicationReport(ApplicationReport ApplicationReport);
+ /**
+ * Get the <code>ApplicationReport</code> for the application.
+ * @return <code>ApplicationReport</code> for the application
+ */
+ @Public
+ @Stable
+ public ApplicationReport getApplicationReport();
+
+ @Private
+ @Unstable
+ public void setApplicationReport(ApplicationReport ApplicationReport);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java Thu Sep 8 01:39:07 2011
@@ -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;
+
+/**
+ * <p>The request sent by clients to get cluster metrics from the
+ * <code>ResourceManager</code>.</p>
+ *
+ * @see ClientRMProtocol#getClusterMetrics(GetClusterMetricsRequest)
+ */
+@Public
+@Stable
public interface GetClusterMetricsRequest {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsResponse.java Thu Sep 8 01:39:07 2011
@@ -18,9 +18,32 @@
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.YarnClusterMetrics;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to a client
+ * requesting cluster metrics.<p>
+ *
+ * @see YarnClusterMetrics
+ * @see ClientRMProtocol#getClusterMetrics(GetClusterMetricsRequest)
+ */
+@Public
+@Stable
public interface GetClusterMetricsResponse {
- public abstract YarnClusterMetrics getClusterMetrics();
- public abstract void setClusterMetrics(YarnClusterMetrics metrics);
+ /**
+ * Get the <code>YarnClusterMetrics</code> for the cluster.
+ * @return <code>YarnClusterMetrics</code> for the cluster
+ */
+ @Public
+ @Stable
+ public YarnClusterMetrics getClusterMetrics();
+
+ @Private
+ @Unstable
+ public void setClusterMetrics(YarnClusterMetrics metrics);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java Thu Sep 8 01:39:07 2011
@@ -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;
+
+/**
+ * <p>The request from clients to get a report of all nodes
+ * in the cluster from the <code>ResourceManager</code>.</p>
+ *
+ * @see ClientRMProtocol#getClusterNodes(GetClusterNodesRequest)
+ */
+@Public
+@Stable
public interface GetClusterNodesRequest {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java Thu Sep 8 01:39:07 2011
@@ -20,9 +20,36 @@ package org.apache.hadoop.yarn.api.proto
import java.util.List;
+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.NodeReport;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to a client
+ * requesting an {@link NodeReport} for all nodes.</p>
+ *
+ * <p>The <code>NodeReport</code> 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 <code>NodeReport</code> for all nodes in the cluster.
+ * @return <code>NodeReport</code> for all nodes in the cluster
+ */
+ @Public
+ @Stable
List<NodeReport> getNodeReports();
+
+ @Private
+ @Unstable
void setNodeReports(List<NodeReport> nodeReports);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusRequest.java Thu Sep 8 01:39:07 2011
@@ -18,9 +18,38 @@
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.ContainerManager;
import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.ContainerStatus;
+/**
+ * <p>The request sent by the <code>ApplicationMaster</code> to the
+ * <code>NodeManager</code> to get {@link ContainerStatus} of a container.</p>
+ *
+ * @see ContainerManager#getContainerStatus(GetContainerStatusRequest)
+ */
+@Public
+@Stable
public interface GetContainerStatusRequest {
+ /**
+ * Get the <code>ContainerId</code> of container for which to obtain the
+ * <code>ContainerStatus</code>.
+ * @return <code>ContainerId</code> of container for which to obtain the
+ * <code>ContainerStatus</code>
+ */
+ @Public
+ @Stable
public abstract ContainerId getContainerId();
+
+ /**
+ * Set the <code>ContainerId</code> of container for which to obtain the
+ * <code>ContainerStatus</code>
+ * @param containerId <code>ContainerId</code> of container for which to
+ * obtain the <code>ContainerStatus</code>
+ */
+ @Public
+ @Stable
public abstract void setContainerId(ContainerId containerId);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetContainerStatusResponse.java Thu Sep 8 01:39:07 2011
@@ -18,9 +18,32 @@
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.ContainerManager;
import org.apache.hadoop.yarn.api.records.ContainerStatus;
+/**
+ * <p>The response sent by the <code>NodeManager</code> to the
+ * <code>ApplicationMaster</code> when asked to obtainer <em>status</em>
+ * of a container.</p>
+ *
+ * @see ContainerManager#getContainerStatus(GetContainerStatusRequest)
+ */
+@Public
+@Stable
public interface GetContainerStatusResponse {
+ /**
+ * Get the <code>ContainerStatus</code> of the container.
+ * @return <code>ContainerStatus</code> of the container
+ */
+ @Public
+ @Stable
public abstract ContainerStatus getStatus();
+
+ @Private
+ @Unstable
public abstract void setStatus(ContainerStatus containerStatus);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdRequest.java Thu Sep 8 01:39:07 2011
@@ -18,6 +18,19 @@
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;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+
+/**
+ * <p>The request sent by clients to get a new {@link ApplicationId} for
+ * submitting an application.</p>
+ *
+ * @see ClientRMProtocol#getNewApplicationId(GetNewApplicationIdRequest)
+ */
+@Public
+@Stable
public interface GetNewApplicationIdRequest {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetNewApplicationIdResponse.java Thu Sep 8 01:39:07 2011
@@ -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;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to the client for
+ * a request to a new {@link ApplicationId} for submitting applications.</p>
+ *
+ * @see ClientRMProtocol#getNewApplicationId(GetNewApplicationIdRequest)
+ */
+@Public
+@Stable
public interface GetNewApplicationIdResponse {
+ /**
+ * Get the <em>new</em> <code>ApplicationId</code> allocated by the
+ * <code>ResourceManager</code>.
+ * @return <em>new</em> <code>ApplicationId</code> allocated by the
+ * <code>ResourceManager</code>
+ */
+ @Public
+ @Stable
public abstract ApplicationId getApplicationId();
+
+ @Private
+ @Unstable
public abstract void setApplicationId(ApplicationId applicationId);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoRequest.java Thu Sep 8 01:39:07 2011
@@ -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;
+
+/**
+ * <p>The request sent by clients to get <em>queue information</em>
+ * from the <code>ResourceManager</code>.</p>
+ *
+ * @see ClientRMProtocol#getQueueInfo(GetQueueInfoRequest)
+ */
+@Public
+@Stable
public interface GetQueueInfoRequest {
+ /**
+ * Get the <em>queue name</em> for which to get queue information.
+ * @return <em>queue name</em> for which to get queue information
+ */
String getQueueName();
+
+ /**
+ * Set the <em>queue name</em> for which to get queue information
+ * @param queueName <em>queue name</em> for which to get queue information
+ */
void setQueueName(String queueName);
+ /**
+ * Is information about <em>active applications<e/m> required?
+ * @return <code>true</code> if applications' information is to be included,
+ * else <code>false</code>
+ */
boolean getIncludeApplications();
+
+ /**
+ * Should we get fetch information about <em>active applications</em>?
+ * @param includeApplications fetch information about <em>active
+ * applications</em>?
+ */
void setIncludeApplications(boolean includeApplications);
+ /**
+ * Is information about <em>child queues</em> required?
+ * @return <code>true</code> if information about child queues is required,
+ * else <code>false</code>
+ */
boolean getIncludeChildQueues();
+
+ /**
+ * Should we fetch information about <em>child queues</em>?
+ * @param includeChildQueues fetch information about <em>child queues</em>?
+ */
void setIncludeChildQueues(boolean includeChildQueues);
+ /**
+ * Is information on the entire <em>child queue hierarchy</em> required?
+ * @return <code>true</code> if information about entire hierarchy is
+ * required, <code>false</code> otherwise
+ */
boolean getRecursive();
+
+ /**
+ * Should we fetch information on the entire <em>child queue hierarchy</em>?
+ * @param recursive fetch information on the entire <em>child queue
+ * hierarchy</em>?
+ */
void setRecursive(boolean recursive);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java Thu Sep 8 01:39:07 2011
@@ -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;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to a client
+ * requesting information about queues in the system.</p>
+ *
+ * <p>The response includes a {@link QueueInfo} which has details such as
+ * queue name, used/total capacities, running applications, child queues etc
+ * .</p>
+ *
+ * @see QueueInfo
+ * @see ClientRMProtocol#getQueueInfo(GetQueueInfoRequest)
+ */
+@Public
+@Stable
public interface GetQueueInfoResponse {
+ /**
+ * Get the <code>QueueInfo</code> for the specified queue.
+ * @return <code>QueueInfo</code> for the specified queue
+ */
QueueInfo getQueueInfo();
+
+ @Private
+ @Unstable
void setQueueInfo(QueueInfo queueInfo);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java Thu Sep 8 01:39:07 2011
@@ -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;
+
+/**
+ * <p>The request sent by clients to the <code>ResourceManager</code> to
+ * get queue acls for the <em>current user</em>.</p>
+ *
+ * @see ClientRMProtocol#getQueueUserAcls(GetQueueUserAclsInfoRequest)
+ */
+@Public
+@Stable
public interface GetQueueUserAclsInfoRequest {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoResponse.java Thu Sep 8 01:39:07 2011
@@ -20,12 +20,39 @@ package org.apache.hadoop.yarn.api.proto
import java.util.List;
+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.QueueACL;
import org.apache.hadoop.yarn.api.records.QueueUserACLInfo;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to clients
+ * seeking queue acls for the user.</p>
+ *
+ * <p>The response contains a list of {@link QueueUserACLInfo} which
+ * provides information about {@link QueueACL} per queue.</p>
+ *
+ * @see QueueACL
+ * @see QueueUserACLInfo
+ * @see ClientRMProtocol#getQueueUserAcls(GetQueueUserAclsInfoRequest)
+ */
+@Public
+@Stable
public interface GetQueueUserAclsInfoResponse {
+ /**
+ * Get the <code>QueueUserACLInfo</code> per queue for the user.
+ * @return <code>QueueUserACLInfo</code> per queue for the user
+ */
+ @Public
+ @Stable
public List<QueueUserACLInfo> getUserAclsInfoList();
+ @Private
+ @Unstable
public void setUserAclsInfoList(List<QueueUserACLInfo> queueUserAclsList);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterRequest.java Thu Sep 8 01:39:07 2011
@@ -18,19 +18,108 @@
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.AMRMProtocol;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+/**
+ * <p>The request sent by the <code>ApplicationMaster</code> to
+ * <code>ResourceManager</code> on registration.</p>
+ *
+ * <p>The registration includes details such as:
+ * <ul>
+ * <li>
+ * {@link ApplicationAttemptId} being managed by the
+ * <code>ApplicationMaster</code>
+ * </li>
+ * <li>Hostname on which the AM is running.</li>
+ * <li>RPC Port</li>
+ * <li>Tracking URL</li>
+ * </ul>
+ * </p>
+ *
+ * @see AMRMProtocol#registerApplicationMaster(RegisterApplicationMasterRequest)
+ */
+@Public
+@Stable
public interface RegisterApplicationMasterRequest {
+ /**
+ * Get the <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>.
+ * @return <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
ApplicationAttemptId getApplicationAttemptId();
+
+ /**
+ * Set the <code>ApplicationAttemptId</code> being managed by the
+ * <code>ApplicationMaster</code>.
+ * @param applicationAttemptId <code>ApplicationAttemptId</code> being managed
+ * by the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId);
+ /**
+ * Get the <em>host</em> on which the <code>ApplicationMaster</code> is
+ * running.
+ * @return <em>host</em> on which the <code>ApplicationMaster</code> is running
+ */
+ @Public
+ @Stable
String getHost();
+
+ /**
+ * Set the <em>host</em> on which the <code>ApplicationMaster</code> is
+ * running.
+ * @param host <em>host</em> on which the <code>ApplicationMaster</code>
+ * is running
+ */
+ @Private
+ @Unstable
void setHost(String host);
+ /**
+ * Get the <em>RPC port</em> on which the <code>ApplicationMaster</code>
+ * is responding.
+ * @return the <em>RPC port<em> on which the <code>ApplicationMaster</code> is
+ * responding
+ */
+ @Public
+ @Stable
int getRpcPort();
+
+ /**
+ * Set the <em>RPC port<em> on which the <code>ApplicationMaster</code> is
+ * responding.
+ * @param port <em>RPC port<em> on which the <code>ApplicationMaster</code> is
+ * responding
+ */
+ @Public
+ @Stable
void setRpcPort(int port);
+ /**
+ * Get the <em>tracking URL</em> for the <code>ApplicationMaster</code>.
+ * @return <em>tracking URL</em> for the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
String getTrackingUrl();
- void setTrackingUrl(String string);
+
+ /**
+ * Set the <em>tracking URL</em> for the <code>ApplicationMaster</code>.
+ * @param trackingUrl <em>tracking URL</em> for the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
+ void setTrackingUrl(String trackingUrl);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java Thu Sep 8 01:39:07 2011
@@ -18,11 +18,53 @@
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.AMRMProtocol;
import org.apache.hadoop.yarn.api.records.Resource;
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to a new
+ * <code>ApplicationMaster</code> on registration.</p>
+ *
+ * <p>The response contains critical details such as:
+ * <ul>
+ * <li>Minimum capability for allocated resources in the cluster.</li>
+ * <li>Maximum capability for allocated resources in the cluster.</li>
+ * </ul>
+ * </p>
+ *
+ * @see AMRMProtocol#registerApplicationMaster(RegisterApplicationMasterRequest)
+ */
+@Public
+@Stable
public interface RegisterApplicationMasterResponse {
+
+ /**
+ * Get the minimum capability for any {@link Resource} allocated by the
+ * <code>ResourceManager</code> in the cluster.
+ * @return minimum capability of allocated resources in the cluster
+ */
+ @Public
+ @Stable
public Resource getMinimumResourceCapability();
+
+ @Private
+ @Unstable
public void setMinimumResourceCapability(Resource capability);
+
+ /**
+ * Get the maximum capability for any {@link Resource} allocated by the
+ * <code>ResourceManager</code> in the cluster.
+ * @return maximum capability of allocated resources in the cluster
+ */
+ @Public
+ @Stable
public Resource getMaximumResourceCapability();
+
+ @Private
+ @Unstable
public void setMaximumResourceCapability(Resource capability);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerRequest.java Thu Sep 8 01:39:07 2011
@@ -18,10 +18,44 @@
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.ContainerManager;
import org.apache.hadoop.yarn.api.records.ContainerLaunchContext;
+/**
+ * <p>The request sent by the <code>ApplicationMaster</code> to the
+ * <code>NodeManager</code> to <em>start</em> a container.</p>
+ *
+ * <p>The <code>ApplicationMaster</code> has to provide details such as
+ * allocated resource capability, security tokens (if enabled), command
+ * to be executed to start the container, environment for the process,
+ * necessary binaries/jar/shared-objects etc. via the
+ * {@link ContainerLaunchContext}.</p>
+ *
+ * @see ContainerManager#startContainer(StartContainerRequest)
+ */
+@Public
+@Stable
public interface StartContainerRequest {
+ /**
+ * Get the <code>ContainerLaunchContext</code> for the container to be started
+ * by the <code>NodeManager</code>.
+ *
+ * @return <code>ContainerLaunchContext</code> for the container to be started
+ * by the <code>NodeManager</code>
+ */
+ @Public
+ @Stable
public abstract ContainerLaunchContext getContainerLaunchContext();
+ /**
+ * Set the <code>ContainerLaunchContext</code> for the container to be started
+ * by the <code>NodeManager</code>
+ * @param context <code>ContainerLaunchContext</code> for the container to be
+ * started by the <code>NodeManager</code>
+ */
+ @Public
+ @Stable
public abstract void setContainerLaunchContext(ContainerLaunchContext context);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StartContainerResponse.java Thu Sep 8 01:39:07 2011
@@ -18,6 +18,28 @@
package org.apache.hadoop.yarn.api.protocolrecords;
+import java.nio.ByteBuffer;
+import java.util.Map;
+
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+import org.apache.hadoop.yarn.api.ContainerManager;
+
+/**
+ * <p>The response sent by the <code>NodeManager</code> to the
+ * <code>ApplicationMaster</code> when asked to <em>start</em> an
+ * allocated container.</p>
+ *
+ * @see ContainerManager#startContainer(StartContainerRequest)
+ */
+@Public
+@Stable
public interface StartContainerResponse {
+ Map<String, ByteBuffer> getAllServiceResponse();
+ ByteBuffer getServiceResponse(String key);
+ void addAllServiceResponse(Map<String, ByteBuffer> serviceResponse);
+ void setServiceResponse(String key, ByteBuffer value);
+ void removeServiceResponse(String key);
+ void clearServiceResponse();
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerRequest.java Thu Sep 8 01:39:07 2011
@@ -18,9 +18,33 @@
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.ContainerManager;
import org.apache.hadoop.yarn.api.records.ContainerId;
+/**
+ * <p>The request sent by the <code>ApplicationMaster</code> to the
+ * <code>NodeManager</code> to <em>stop</em> a container.</p>
+ *
+ * @see ContainerManager#stopContainer(StopContainerRequest)
+ */
+@Public
+@Stable
public interface StopContainerRequest {
+ /**
+ * Get the <code>ContainerId</code> of the container to be stopped.
+ * @return <code>ContainerId</code> of container to be stopped
+ */
+ @Public
+ @Stable
ContainerId getContainerId();
+
+ /**
+ * Set the <code>ContainerId</code> of the container to be stopped.
+ * @param containerId <code>ContainerId</code> of the container to be stopped
+ */
+ @Public
+ @Stable
void setContainerId(ContainerId containerId);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/StopContainerResponse.java Thu Sep 8 01:39:07 2011
@@ -18,6 +18,19 @@
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.ContainerManager;
+
+/**
+ * <p>The response sent by the <code>NodeManager</code> to the
+ * <code>ApplicationMaster</code> when asked to <em>stop</em> an
+ * allocated container.</p>
+ *
+ * @see ContainerManager#stopContainer(StopContainerRequest)
+ */
+@Public
+@Stable
public interface StopContainerResponse {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationRequest.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationRequest.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationRequest.java Thu Sep 8 01:39:07 2011
@@ -18,9 +18,43 @@
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;
import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
+import org.apache.hadoop.yarn.api.records.ContainerLaunchContext;
+import org.apache.hadoop.yarn.api.records.Resource;
+/**
+ * <p>The request sent by a client to <em>submit an application</em> to the
+ * <code>ResourceManager</code>.</p>
+ *
+ * <p>The request, via {@link ApplicationSubmissionContext}, contains
+ * details such as queue, {@link Resource} required to run the
+ * <code>ApplicationMaster</code>, the equivalent of
+ * {@link ContainerLaunchContext} for launching the
+ * <code>ApplicationMaster</code> etc.
+ *
+ * @see ClientRMProtocol#submitApplication(SubmitApplicationRequest)
+ */
+@Public
+@Stable
public interface SubmitApplicationRequest {
+ /**
+ * Get the <code>ApplicationSubmissionContext</code> for the application.
+ * @return <code>ApplicationSubmissionContext</code> for the application
+ */
+ @Public
+ @Stable
public abstract ApplicationSubmissionContext getApplicationSubmissionContext();
- public abstract void setApplicationSubmissionContext(ApplicationSubmissionContext context);
+
+ /**
+ * Set the <code>ApplicationSubmissionContext</code> for the application.
+ * @param context <code>ApplicationSubmissionContext</code> for the
+ * application
+ */
+ @Public
+ @Stable
+ public abstract void setApplicationSubmissionContext(
+ ApplicationSubmissionContext context);
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/SubmitApplicationResponse.java Thu Sep 8 01:39:07 2011
@@ -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;
+
+/**
+ * <p>The response sent by the <code>ResourceManager</code> to a client on
+ * application submission.</p>
+ *
+ * @see ClientRMProtocol#submitApplication(SubmitApplicationRequest)
+ */
+@Public
+@Stable
public interface SubmitApplicationResponse {
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/StartContainerResponsePBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/StartContainerResponsePBImpl.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/StartContainerResponsePBImpl.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/StartContainerResponsePBImpl.java Thu Sep 8 01:39:07 2011
@@ -19,17 +19,26 @@
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.List;
+
+
import org.apache.hadoop.yarn.api.protocolrecords.StartContainerResponse;
import org.apache.hadoop.yarn.api.records.ProtoBase;
import org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainerResponseProto;
-
-
+import org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainerResponseProtoOrBuilder;
+import org.apache.hadoop.yarn.proto.YarnProtos.StringBytesMapProto;
public class StartContainerResponsePBImpl extends ProtoBase<StartContainerResponseProto> implements StartContainerResponse {
StartContainerResponseProto proto = StartContainerResponseProto.getDefaultInstance();
StartContainerResponseProto.Builder builder = null;
boolean viaProto = false;
-
+
+ private Map<String, ByteBuffer> serviceResponse = null;
+
public StartContainerResponsePBImpl() {
builder = StartContainerResponseProto.newBuilder();
}
@@ -40,20 +49,113 @@ public class StartContainerResponsePBImp
}
public StartContainerResponseProto getProto() {
+ mergeLocalToProto();
proto = viaProto ? proto : builder.build();
viaProto = true;
return proto;
}
+ private void mergeLocalToBuilder() {
+ if (this.serviceResponse != null) {
+ addServiceResponseToProto();
+ }
+ }
+
+ private void mergeLocalToProto() {
+ if (viaProto) {
+ maybeInitBuilder();
+ }
+ mergeLocalToBuilder();
+ proto = builder.build();
+ viaProto = true;
+ }
+
private void maybeInitBuilder() {
if (viaProto || builder == null) {
builder = StartContainerResponseProto.newBuilder(proto);
}
viaProto = false;
}
-
-
-
+
+ @Override
+ public Map<String, ByteBuffer> getAllServiceResponse() {
+ initServiceResponse();
+ return this.serviceResponse;
+ }
+ @Override
+ public ByteBuffer getServiceResponse(String key) {
+ initServiceResponse();
+ return this.serviceResponse.get(key);
+ }
+
+ private void initServiceResponse() {
+ if (this.serviceResponse != null) {
+ return;
+ }
+ StartContainerResponseProtoOrBuilder p = viaProto ? proto : builder;
+ List<StringBytesMapProto> list = p.getServiceResponseList();
+ this.serviceResponse = new HashMap<String, ByteBuffer>();
+ for (StringBytesMapProto c : list) {
+ this.serviceResponse.put(c.getKey(), convertFromProtoFormat(c.getValue()));
+ }
+ }
+
+ @Override
+ public void addAllServiceResponse(final Map<String, ByteBuffer> serviceResponse) {
+ if (serviceResponse == null)
+ return;
+ initServiceResponse();
+ this.serviceResponse.putAll(serviceResponse);
+ }
+
+ private void addServiceResponseToProto() {
+ maybeInitBuilder();
+ builder.clearServiceResponse();
+ if (serviceResponse == null)
+ return;
+ Iterable<StringBytesMapProto> iterable = new Iterable<StringBytesMapProto>() {
+
+ @Override
+ public Iterator<StringBytesMapProto> iterator() {
+ return new Iterator<StringBytesMapProto>() {
+
+ Iterator<String> keyIter = serviceResponse.keySet().iterator();
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public StringBytesMapProto next() {
+ String key = keyIter.next();
+ return StringBytesMapProto.newBuilder().setKey(key).setValue(convertToProtoFormat(serviceResponse.get(key))).build();
+ }
+
+ @Override
+ public boolean hasNext() {
+ return keyIter.hasNext();
+ }
+ };
+ }
+ };
+ builder.addAllServiceResponse(iterable);
+ }
+ @Override
+ public void setServiceResponse(String key, ByteBuffer val) {
+ initServiceResponse();
+ this.serviceResponse.put(key, val);
+ }
+ @Override
+ public void removeServiceResponse(String key) {
+ initServiceResponse();
+ this.serviceResponse.remove(key);
+ }
+ @Override
+ public void clearServiceResponse() {
+ initServiceResponse();
+ this.serviceResponse.clear();
+ }
}
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/AMResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/AMResponse.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/AMResponse.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/AMResponse.java Thu Sep 8 01:39:07 2011
@@ -20,31 +20,142 @@ package org.apache.hadoop.yarn.api.recor
import java.util.List;
+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.AMRMProtocol;
+import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
+
+/**
+ * <p>The response sent by the <code>ResourceManager</code> the
+ * <code>ApplicationMaster</code> during resource negotiation.</p>
+ *
+ * <p>The response includes:
+ * <ul>
+ * <li>Response ID to track duplicate responses.</li>
+ * <li>
+ * A reboot flag to let the <code>ApplicationMaster</code> that its
+ * horribly out of sync and needs to reboot.</li>
+ * <li>A list of newly allocated {@link Container}.</li>
+ * <li>A list of completed {@link Container}.</li>
+ * <li>
+ * The available headroom for resources in the cluster for the
+ * application.
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @see AMRMProtocol#allocate(AllocateRequest)
+ */
+@Public
+@Unstable
public interface AMResponse {
+ /**
+ * Should the <code>ApplicationMaster</code> reboot for being horribly
+ * out-of-sync with the <code>ResourceManager</code> as deigned by
+ * {@link #getResponseId()}?
+ *
+ * @return <code>true</code> if the <code>ApplicationMaster</code> should
+ * reboot, <code>false</code> otherwise
+ */
+ @Public
+ @Stable
public boolean getReboot();
+
+ @Private
+ @Unstable
+ public void setReboot(boolean reboot);
+
+ /**
+ * Get the <em>last response id</em>.
+ * @return <em>last response id</em>
+ */
+ @Public
+ @Stable
public int getResponseId();
+ @Private
+ @Unstable
+ public void setResponseId(int responseId);
+
+ /**
+ * Get the list of <em>newly allocated</em> <code>Container</code> by the
+ * <code>ResourceManager</code>.
+ * @return list of <em>newly allocated</em> <code>Container</code>
+ */
+ @Public
+ @Stable
public List<Container> getNewContainerList();
+
+ @Private
+ @Unstable
public Container getNewContainer(int index);
+
+ @Private
+ @Unstable
public int getNewContainerCount();
- public void setReboot(boolean reboot);
- public void setResponseId(int responseId);
-
+ @Private
+ @Unstable
public void addAllNewContainers(List<Container> containers);
+
+ @Private
+ @Unstable
public void addNewContainer(Container container);
+
+ @Private
+ @Unstable
public void removeNewContainer(int index);
+
+ @Private
+ @Unstable
public void clearNewContainers();
- public void setAvailableResources(Resource limit);
+ /**
+ * Get the <em>available headroom</em> for resources in the cluster for the
+ * application.
+ * @return limit available headroom for resources in the cluster for the
+ * application
+ */
+ @Public
+ @Stable
public Resource getAvailableResources();
+ @Private
+ @Unstable
+ public void setAvailableResources(Resource limit);
+
+ /**
+ * Get the list of <em>completed containers</em>.
+ * @return the list of <em>completed containers</em>
+ */
+ @Public
+ @Stable
public List<Container> getFinishedContainerList();
+
+ @Private
+ @Unstable
public Container getFinishedContainer(int index);
+
+ @Private
+ @Unstable
public int getFinishedContainerCount();
+
+ @Private
+ @Unstable
public void addAllFinishedContainers(List<Container> containers);
+
+ @Private
+ @Unstable
public void addFinishedContainer(Container container);
+
+ @Private
+ @Unstable
public void removeFinishedContainer(int index);
+
+ @Private
+ @Unstable
public void clearFinishedContainers();
}
\ No newline at end of file
Modified: hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java?rev=1166495&r1=1166494&r2=1166495&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java Thu Sep 8 01:39:07 2011
@@ -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;
+
+/**
+ * <p><code>ApplicationReport</code> is a report of an application.</p>
+ *
+ * <p>It includes details such as:
+ * <ul>
+ * <li>{@link ApplicationId} of the application.</li>
+ * <li>Applications user.</li>
+ * <li>Application queue.</li>
+ * <li>Application name.</li>
+ * <li>Host on which the <code>ApplicationMaster</code>is running.</li>
+ * <li>RPC port of the <code>ApplicationMaster</code>.</li>
+ * <li>Tracking URL.</li>
+ * <li>{@link ApplicationState} of the application.</li>
+ * <li>Diagnostic information in case of errors.</li>
+ * <li>Start time of the application.</li>
+ * <li>Client token of the application (if security is enabled).</li>
+ * </ul>
+ * </p>
+ *
+ * @see ClientRMProtocol#getApplicationReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest)
+ */
+@Public
+@Stable
public interface ApplicationReport {
+ /**
+ * Get the <code>ApplicationId</code> of the application.
+ * @return <code>ApplicationId</code> of the application
+ */
+ @Public
+ @Stable
ApplicationId getApplicationId();
+
+ @Private
+ @Unstable
void setApplicationId(ApplicationId applicationId);
+ /**
+ * Get the <em>user</em> who submitted the application.
+ * @return <em>user</em> who submitted the application
+ */
+ @Public
+ @Stable
String getUser();
+
+ @Private
+ @Unstable
void setUser(String user);
+ /**
+ * Get the <em>queue</em> to which the application was submitted.
+ * @return <em>queue</em> to which the application was submitted
+ */
+ @Public
+ @Stable
String getQueue();
+
+ @Private
+ @Unstable
void setQueue(String queue);
+ /**
+ * Get the user-defined <em>name</em> of the application.
+ * @return <em>name</em> of the application
+ */
+ @Public
+ @Stable
String getName();
+
+ @Private
+ @Unstable
void setName(String name);
+ /**
+ * Get the <em>host</em> on which the <code>ApplicationMaster</code>
+ * is running.
+ * @return <em>host</em> on which the <code>ApplicationMaster</code>
+ * is running
+ */
+ @Public
+ @Stable
String getHost();
+
+ @Private
+ @Unstable
void setHost(String host);
+ /**
+ * Get the <em>RPC port</em> of the <code>ApplicationMaster</code>.
+ * @return <em>RPC port</em> of the <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
int getRpcPort();
+
+ @Private
+ @Unstable
void setRpcPort(int rpcPort);
+ /**
+ * Get the <em>client token</em> for communicating with the
+ * <code>ApplicationMaster</code>.
+ * @return <em>client token</em> for communicating with the
+ * <code>ApplicationMaster</code>
+ */
+ @Public
+ @Stable
String getClientToken();
+
+ @Private
+ @Unstable
void setClientToken(String clientToken);
+ /**
+ * Get the <code>ApplicationState</code> of the application.
+ * @return <code>ApplicationState</code> of the application
+ */
+ @Public
+ @Stable
ApplicationState getState();
+
+ @Private
+ @Unstable
void setState(ApplicationState state);
+ /**
+ * Get the <em>diagnositic information</em> of the application in case of
+ * errors.
+ * @return <em>diagnositic information</em> of the application in case
+ * of errors
+ */
+ @Public
+ @Stable
String getDiagnostics();
+
+ @Private
+ @Unstable
void setDiagnostics(String diagnostics);
+ /**
+ * Get the <em>tracking url</em> for the application.
+ * @return <em>tracking url</em> for the application
+ */
+ @Public
+ @Stable
String getTrackingUrl();
+
+ @Private
+ @Unstable
void setTrackingUrl(String url);
+ /**
+ * Get the <em>start time</em> of the application.
+ * @return <em>start time</em> of the application
+ */
+ @Public
+ @Stable
long getStartTime();
+
+ @Private
+ @Unstable
void setStartTime(long startTime);
}