diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java index f9ed776..ae54bc9 100644 --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java @@ -20,7 +20,6 @@ import java.io.IOException; -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.yarn.api.protocolrecords.CancelDelegationTokenRequest; @@ -73,7 +72,7 @@ * a new application.
* *The ResourceManager also responds with details such
- * as minimum and maximum resource capabilities in the cluster as specified in
+ * as maximum resource capabilities in the cluster as specified in
* {@link GetNewApplicationResponse}.
ApplicationId
@@ -83,6 +82,8 @@
* @throws IOException
* @see #submitApplication(SubmitApplicationRequest)
*/
+ @Public
+ @Stable
public GetNewApplicationResponse getNewApplication(
GetNewApplicationRequest request)
throws YarnException, IOException;
@@ -112,6 +113,8 @@ public GetNewApplicationResponse getNewApplication(
* @throws IOException
* @see #getNewApplication(GetNewApplicationRequest)
*/
+ @Public
+ @Stable
public SubmitApplicationResponse submitApplication(
SubmitApplicationRequest request)
throws YarnException, IOException;
@@ -129,13 +132,15 @@ public SubmitApplicationResponse submitApplication(
* 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 YarnException
* @throws IOException
* @see #getQueueUserAcls(GetQueueUserAclsInfoRequest)
*/
+ @Public
+ @Stable
public KillApplicationResponse forceKillApplication(
KillApplicationRequest request)
throws YarnException, IOException;
@@ -171,6 +176,8 @@ public KillApplicationResponse forceKillApplication(
* @throws YarnException
* @throws IOException
*/
+ @Public
+ @Stable
public GetApplicationReportResponse getApplicationReport(
GetApplicationReportRequest request)
throws YarnException, IOException;
@@ -189,6 +196,8 @@ public GetApplicationReportResponse getApplicationReport(
* @throws YarnException
* @throws IOException
*/
+ @Public
+ @Stable
public GetClusterMetricsResponse getClusterMetrics(
GetClusterMetricsRequest request)
throws YarnException, IOException;
@@ -211,6 +220,8 @@ public GetClusterMetricsResponse getClusterMetrics(
* @throws YarnException
* @throws IOException
*/
+ @Public
+ @Stable
public GetAllApplicationsResponse getAllApplications(
GetAllApplicationsRequest request)
throws YarnException, IOException;
@@ -228,6 +239,8 @@ public GetAllApplicationsResponse getAllApplications(
* @throws YarnException
* @throws IOException
*/
+ @Public
+ @Stable
public GetClusterNodesResponse getClusterNodes(
GetClusterNodesRequest request)
throws YarnException, IOException;
@@ -247,6 +260,8 @@ public GetClusterNodesResponse getClusterNodes(
* @throws YarnException
* @throws IOException
*/
+ @Public
+ @Stable
public GetQueueInfoResponse getQueueInfo(
GetQueueInfoRequest request)
throws YarnException, IOException;
@@ -264,6 +279,8 @@ public GetQueueInfoResponse getQueueInfo(
* @throws YarnException
* @throws IOException
*/
+ @Public
+ @Stable
public GetQueueUserAclsInfoResponse getQueueUserAcls(
GetQueueUserAclsInfoRequest request)
throws YarnException, IOException;
@@ -272,7 +289,7 @@ public GetQueueUserAclsInfoResponse getQueueUserAcls(
* The interface used by clients to get delegation token, enabling the * containers to be able to talk to the service using those tokens. * - *
The ResourceManager responds with the delegation token
+ *
The ResourceManager responds with the delegation
* {@link Token} that can be used by the client to speak to this
* service.
* @param request request to get a delegation token for the client.
@@ -280,32 +297,36 @@ public GetQueueUserAclsInfoResponse getQueueUserAcls(
* @throws YarnException
* @throws IOException
*/
+ @Public
+ @Stable
public GetDelegationTokenResponse getDelegationToken(
GetDelegationTokenRequest request)
throws YarnException, IOException;
/**
- * Renew an existing delegation token.
+ * Renew an existing delegation {@link Token}.
*
* @param request the delegation token to be renewed.
* @return the new expiry time for the delegation token.
* @throws YarnException
* @throws IOException
*/
- @Private
+ @Public
+ @Stable
public RenewDelegationTokenResponse renewDelegationToken(
RenewDelegationTokenRequest request) throws YarnException,
IOException;
/**
- * Cancel an existing delegation token.
+ * Cancel an existing delegation {@link Token}.
*
* @param request the delegation token to be cancelled.
* @return an empty response.
* @throws YarnException
* @throws IOException
*/
- @Private
+ @Public
+ @Stable
public CancelDelegationTokenResponse cancelDelegationToken(
CancelDelegationTokenRequest request) throws YarnException,
IOException;
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java
index 9600142..39a72ed 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java
@@ -18,6 +18,8 @@
package org.apache.hadoop.yarn.api;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.util.Shell;
@@ -27,9 +29,15 @@
*
* TODO: Investigate the semantics and security of each cross-boundary refs.
*/
+@Public
+@Evolving
public interface ApplicationConstants {
- // TODO: They say tokens via env isn't good.
+ /**
+ * The application client token secret key sent to AppMaster via environment
+ * on AppMaster launch, used to verify corresponding application client token
+ * TODO: They say tokens via env isn't good.
+ */
public static final String APPLICATION_CLIENT_SECRET_ENV_NAME =
"AppClientSecretEnv";
@@ -39,6 +47,9 @@
*/
public static final String APP_SUBMIT_TIME_ENV = "APP_SUBMIT_TIME_ENV";
+ /**
+ * The cache file into which container token is written
+ */
public static final String CONTAINER_TOKEN_FILE_ENV_NAME =
UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION;
@@ -50,6 +61,10 @@
public static final String APPLICATION_WEB_PROXY_BASE_ENV =
"APPLICATION_WEB_PROXY_BASE";
+ /**
+ * The temporary environmental variable for container log directory. This
+ * should be replaced by real container log directory on container launch.
+ */
public static final String LOG_DIR_EXPANSION_VAR = "
The ResourceManager responds with critical details such
- * as minimum and maximum resource capabilities in the cluster as specified in
+ * as maximum resource capabilities in the cluster as specified in
* {@link RegisterApplicationMasterResponse}.
ApplicationMaster know that its
- * horribly out of sync and needs to reboot.ApplicationMaster
+ * take some actions (resync, shutdown etc.).
* ResourceManager.
* @param containers list of newly allocated Container
*/
- @Public
- @Stable
+ @Private
+ @Unstable
public abstract void setAllocatedContainers(ListGet the description of containers owned by the AM, but requested back by * the cluster. Note that the RM may have an inconsistent view of the * resources owned by the AM. These messages are advisory, and the AM may - * elect to ignore them. + * elect to ignore them.
* - * The message is a snapshot of the resources the RM wants back from the AM. + *
The message is a snapshot of the resources the RM wants back from the AM.
* While demand persists, the RM will repeat its request; applications should
- * not interpret each message as a request for
*
* @return A specification of the resources to reclaim from this AM.
*/
@@ -200,24 +202,23 @@ public static AllocateResponse newInstance(int responseId,
@Private
@Unstable
public abstract void setPreemptionMessage(PreemptionMessage request);
-
- @Public
- @Stable
- public abstract void setNMTokens(List Get the list of NMTokens required for communicating with NM. New NMTokens
+ * issued only if
+ * 1) AM is receiving first container on underlying NodeManager.
+ * AM will receive one NMToken per NM irrespective of the number of containers
* issued on same NM. AM is expected to store these tokens until issued a
- * new token for the same NM.
+ * new token for the same NM.
*/
@Public
@Stable
public abstract List Get the container token to be used for authorization during starting
+ * container. Note: {@link NMToken} will be used for authenticating communication with
+ * NodeManager.
+ * OR
* 2) NMToken master key rolled over in ResourceManager and AM is getting new
- * container on the same underlying NodeManager.
- * AM will receive one NMToken per NM irrespective of the number of containers
+ * container on the same underlying NodeManager.ApplicationId of the application.
* @return ApplicationId of the application
*/
+ @Public
+ @Stable
public abstract ApplicationId getApplicationId();
/**
* Set the ApplicationId of the application
* @param applicationId ApplicationId of the application
*/
+ @Public
+ @Stable
public abstract void setApplicationId(ApplicationId applicationId);
}
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
index 78c62fe..d2292c1 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
@@ -40,6 +40,8 @@
@Stable
public abstract class GetApplicationReportResponse {
+ @Private
+ @Unstable
public static GetApplicationReportResponse newInstance(
ApplicationReport ApplicationReport) {
GetApplicationReportResponse response =
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java
index ba364df..fb11e18 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsRequest.java
@@ -34,6 +34,8 @@
@Public
@Stable
public abstract class GetClusterMetricsRequest {
+ @Public
+ @Stable
public static GetClusterMetricsRequest newInstance() {
GetClusterMetricsRequest request =
Records.newRecord(GetClusterMetricsRequest.class);
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsResponse.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsResponse.java
index 7541ea7..6329aac 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsResponse.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterMetricsResponse.java
@@ -37,6 +37,8 @@
@Stable
public abstract class GetClusterMetricsResponse {
+ @Private
+ @Unstable
public static GetClusterMetricsResponse
newInstance(YarnClusterMetrics metrics) {
GetClusterMetricsResponse response =
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java
index 0c245ed..5904554 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesRequest.java
@@ -34,6 +34,8 @@
@Public
@Stable
public abstract class GetClusterNodesRequest {
+ @Public
+ @Stable
public static GetClusterNodesRequest newInstance() {
GetClusterNodesRequest request =
Records.newRecord(GetClusterNodesRequest.class);
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java
index a471f7e..a57d7b0 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetClusterNodesResponse.java
@@ -43,6 +43,8 @@
@Stable
public abstract class GetClusterNodesResponse {
+ @Private
+ @Unstable
public static GetClusterNodesResponse
newInstance(Listtrue if applications' information is to be included,
* else false
*/
+ @Public
+ @Stable
public abstract boolean getIncludeApplications();
/**
@@ -68,6 +76,8 @@
* @param includeApplications fetch information about active
* applications?
*/
+ @Public
+ @Stable
public abstract void setIncludeApplications(boolean includeApplications);
/**
@@ -75,12 +85,16 @@
* @return true if information about child queues is required,
* else false
*/
+ @Public
+ @Stable
public abstract boolean getIncludeChildQueues();
/**
* Should we fetch information about child queues?
* @param includeChildQueues fetch information about child queues?
*/
+ @Public
+ @Stable
public abstract void setIncludeChildQueues(boolean includeChildQueues);
/**
@@ -88,6 +102,8 @@
* @return true if information about entire hierarchy is
* required, false otherwise
*/
+ @Public
+ @Stable
public abstract boolean getRecursive();
/**
@@ -95,6 +111,8 @@
* @param recursive fetch information on the entire child queue
* hierarchy?
*/
+ @Public
+ @Stable
public abstract void setRecursive(boolean recursive);
}
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java
index bef729a..ea6cb7b 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueInfoResponse.java
@@ -41,6 +41,8 @@
@Stable
public abstract class GetQueueInfoResponse {
+ @Private
+ @Unstable
public static GetQueueInfoResponse newInstance(QueueInfo queueInfo) {
GetQueueInfoResponse response = Records.newRecord(GetQueueInfoResponse.class);
response.setQueueInfo(queueInfo);
@@ -51,6 +53,8 @@ public static GetQueueInfoResponse newInstance(QueueInfo queueInfo) {
* Get the QueueInfo for the specified queue.
* @return QueueInfo for the specified queue
*/
+ @Public
+ @Stable
public abstract QueueInfo getQueueInfo();
@Private
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java
index e52033c..dbe55ea 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoRequest.java
@@ -34,6 +34,8 @@
@Public
@Stable
public abstract class GetQueueUserAclsInfoRequest {
+ @Public
+ @Stable
public static GetQueueUserAclsInfoRequest newInstance() {
GetQueueUserAclsInfoRequest request =
Records.newRecord(GetQueueUserAclsInfoRequest.class);
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoResponse.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoResponse.java
index dfb7a15..c34cb5e 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoResponse.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetQueueUserAclsInfoResponse.java
@@ -44,6 +44,8 @@
@Stable
public abstract class GetQueueUserAclsInfoResponse {
+ @Private
+ @Unstable
public static GetQueueUserAclsInfoResponse newInstance(
ListApplicationMaster
* is running
*/
- @Private
- @Unstable
+ @Public
+ @Stable
public abstract void setHost(String host);
/**
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
index 15504d2..cfffb51 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
@@ -20,10 +20,8 @@
import java.util.Map;
-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.ApplicationMasterProtocol;
import org.apache.hadoop.yarn.api.records.ApplicationAccessType;
import org.apache.hadoop.yarn.api.records.Resource;
@@ -45,7 +43,8 @@
@Public
@Stable
public abstract class RegisterApplicationMasterResponse {
-
+ @Public
+ @Stable
public static RegisterApplicationMasterResponse newInstance(
Resource minCapability, Resource maxCapability,
MapResourceManager in the cluster.
@@ -65,8 +64,8 @@ public static RegisterApplicationMasterResponse newInstance(
@Stable
public abstract Resource getMaximumResourceCapability();
- @Private
- @Unstable
+ @Public
+ @Stable
public abstract void setMaximumResourceCapability(Resource capability);
/**
@@ -81,7 +80,7 @@ public static RegisterApplicationMasterResponse newInstance(
* Set the ApplicationACLs for the application.
* @param acls
*/
- @Private
- @Unstable
+ @Public
+ @Stable
public abstract void setApplicationACLs(MapByteBuffersByteBuffers for that auxiliary service
*/
+ @Private
+ @Unstable
public abstract void setAllServiceResponse(Mapattempt id of the Application.
* @return attempt id of the Application
*/
+ @Public
+ @Stable
public abstract int getAttemptId();
@Private
+ @Unstable
protected abstract void setAttemptId(int attemptId);
static final ThreadLocalApplicationId.
* @return start time of the ResourceManager
*/
+ @Public
+ @Stable
public abstract long getClusterTimestamp();
@Private
+ @Unstable
protected abstract void setClusterTimestamp(long clusterTimestamp);
protected abstract void build();
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
index 500eea8..83ef7e3 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
@@ -40,7 +40,7 @@
*
ApplicationAttemptId of the attempt
*/
- @Private
+ @Public
@Unstable
public abstract ApplicationAttemptId getCurrentApplicationAttemptId();
@@ -235,7 +235,7 @@ public static ApplicationReport newInstance(ApplicationId applicationId,
* This is intended to only be used by the proxy itself.
* @return the original not-proxied tracking url for the application
*/
- @Private
+ @Public
@Unstable
public abstract String getOriginalTrackingUrl();
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationResourceUsageReport.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationResourceUsageReport.java
index 4cf2b14..db49a34 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationResourceUsageReport.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationResourceUsageReport.java
@@ -32,6 +32,7 @@
public abstract class ApplicationResourceUsageReport {
@Private
+ @Unstable
public static ApplicationResourceUsageReport newInstance(
int numUsedContainers, int numReservedContainers, Resource usedResources,
Resource reservedResources, Resource neededResources) {
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
index 3d669b0..63adf03 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
@@ -21,7 +21,6 @@
import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
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.ApplicationClientProtocol;
import org.apache.hadoop.yarn.util.Records;
@@ -183,21 +182,21 @@ public static ApplicationSubmissionContext newInstance(
* @return true if the AM is not managed by the RM
*/
@Public
- @Unstable
+ @Stable
public abstract boolean getUnmanagedAM();
/**
* @param value true if RM should not manage the AM
*/
@Public
- @Unstable
+ @Stable
public abstract void setUnmanagedAM(boolean value);
/**
* @return true if tokens should be canceled when the app completes.
*/
@LimitedPrivate("mapreduce")
- @Unstable
+ @Stable
public abstract boolean getCancelTokensWhenComplete();
/**
@@ -207,14 +206,14 @@ public static ApplicationSubmissionContext newInstance(
* @param cancel true if tokens should be canceled when the app finishes.
*/
@LimitedPrivate("mapreduce")
- @Unstable
+ @Stable
public abstract void setCancelTokensWhenComplete(boolean cancel);
/**
* @return the number of max attempts of the application to be submitted
*/
@Public
- @Unstable
+ @Stable
public abstract int getMaxAppAttempts();
/**
@@ -225,7 +224,7 @@ public static ApplicationSubmissionContext newInstance(
* to be submitted.
*/
@Public
- @Unstable
+ @Stable
public abstract void setMaxAppAttempts(int maxAppAttempts);
@Public
@@ -237,19 +236,18 @@ public static ApplicationSubmissionContext newInstance(
public abstract void setResource(Resource resource);
/**
- * Get the applicationType is the application type
+ * Get the application type
*
- * @return applicationType is the application type
+ * @return the application type
*/
@Public
@Stable
public abstract String getApplicationType();
/**
- * Set the applicationType is the application type
+ * Set the application type
*
- * @param applicationType
- * applicationType is the application type
+ * @param applicationType the application type
*/
@Public
@Stable
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Container.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Container.java
index fb205f8..cb8d04b 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Container.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Container.java
@@ -46,7 +46,7 @@
* Typically, an ApplicationMaster receives the
* Container from the ResourceManager during
- * resource-negotiation and then talks to the NodManager to
+ * resource-negotiation and then talks to the NodeManager to
* start/stop containers.
Priority at which the Container was
* allocated
*/
+ @Public
+ @Stable
public abstract Priority getPriority();
@Private
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerId.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerId.java
index 95a989a..ccbe6f1 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerId.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerId.java
@@ -23,6 +23,7 @@
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.util.Records;
/**
@@ -34,6 +35,7 @@
public abstract class ContainerId implements ComparableState of a Container.
LocalResourceType of the resource to be localized.
* @return LocalResourceType of the resource to be localized
*/
+ @Public
+ @Stable
public abstract LocalResourceType getType();
/**
* Set the LocalResourceType of the resource to be localized.
* @param type LocalResourceType of the resource to be localized
*/
+ @Public
+ @Stable
public abstract void setType(LocalResourceType type);
/**
@@ -121,6 +137,8 @@ public static LocalResource newInstance(URL url, LocalResourceType type,
* @return LocalResourceVisibility of the resource to be
* localized
*/
+ @Public
+ @Stable
public abstract LocalResourceVisibility getVisibility();
/**
@@ -129,6 +147,8 @@ public static LocalResource newInstance(URL url, LocalResourceType type,
* @param visibility LocalResourceVisibility of the resource to be
* localized
*/
+ @Public
+ @Stable
public abstract void setVisibility(LocalResourceVisibility visibility);
/**
@@ -137,6 +157,8 @@ public static LocalResource newInstance(URL url, LocalResourceType type,
* @return pattern that should be used to extract entries from the
* archive.
*/
+ @Public
+ @Stable
public abstract String getPattern();
/**
@@ -145,5 +167,7 @@ public static LocalResource newInstance(URL url, LocalResourceType type,
* @param pattern pattern that should be used to extract entries
* from the archive.
*/
+ @Public
+ @Stable
public abstract void setPattern(String pattern);
}
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java
index 3009971..c1c5eb4 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java
@@ -35,6 +35,8 @@
* {@link #ARCHIVE} - Archive, which is automatically unarchived by the
* NodeManager.
*
+ * The NMToken is used for authenticating communication with
+ * NodeManager
It is issued by ResourceMananger when ApplicationMaster
+ * negotiates resource with ResourceManager and
+ * validated on NodeManager side.
NodeManager for which the NMToken
+ * is used to authenticate.
+ * @return the {@link NodeId} of the NodeManager for which the
+ * NMToken is used to authenticate.
+ */
@Public
@Stable
public abstract NodeId getNodeId();
@@ -35,7 +57,11 @@
@Public
@Stable
public abstract void setNodeId(NodeId nodeId);
-
+
+ /**
+ * Get the {@link Token} used for authenticating with NodeManager
+ * @return the {@link Token} used for authenticating with NodeManager
+ */
@Public
@Stable
public abstract Token getToken();
@@ -43,12 +69,5 @@
@Public
@Stable
public abstract void setToken(Token token);
-
- @Private
- public static NMToken newInstance(NodeId nodeId, Token token) {
- NMToken nmToken = Records.newRecord(NMToken.class);
- nmToken.setNodeId(nodeId);
- nmToken.setToken(token);
- return nmToken;
- }
+
}
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeId.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeId.java
index 3c22c58..c3f8595 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeId.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeId.java
@@ -21,6 +21,7 @@
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.util.Records;
/**
@@ -35,6 +36,7 @@
public abstract class NodeId implements ComparableNodeId of the node.
* @return NodeId of the node
*/
+ @Public
+ @Stable
public abstract NodeId getNodeId();
@Private
@@ -77,6 +80,8 @@ public static NodeReport newInstance(NodeId nodeId, NodeState nodeState,
* Get the NodeState of the node.
* @return NodeState of the node
*/
+ @Public
+ @Stable
public abstract NodeState getNodeState();
@Private
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeState.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeState.java
index 7345c25..14b211a 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeState.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeState.java
@@ -18,9 +18,14 @@
package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Stable;
+
/**
* State of a Node.
A {@link PreemptionMessage} is part of the RM-AM protocol, and it is used by
* the RM to specify resources that the RM wants to reclaim from this
* ApplicationMaster (AM). The AM receives a {@link
* StrictPreemptionContract} message encoding which containers the platform may
* forcibly kill, granting it an opportunity to checkpoint state or adjust its
* execution plan. The message may also include a {@link PreemptionContract}
* granting the AM more latitude in selecting which resources to return to the
- * cluster.
+ * cluster.
* - * The AM should decode both parts of the message. The {@link + *
The AM should decode both parts of the message. The {@link * StrictPreemptionContract} specifies particular allocations that the RM * requires back. The AM can checkpoint containers' state, adjust its execution * plan to move the computation, or take no action and hope that conditions that - * caused the RM to ask for the container will change. + * caused the RM to ask for the container will change.
* - * In contrast, the {@link PreemptionContract} also includes a description of + *
In contrast, the {@link PreemptionContract} also includes a description of * resources with a set of containers. If the AM releases containers matching * that profile, then the containers enumerated in {@link - * PreemptionContract#getContainers()} may not be killed. + * PreemptionContract#getContainers()} may not be killed.
* - * Each preemption message reflects the RM's current understanding of the + *
Each preemption message reflects the RM's current understanding of the
* cluster state, so a request to return
* - * The policy enforced by the RM is part of the scheduler. Generally, only + *
The policy enforced by the RM is part of the scheduler. Generally, only * containers that have been requested consistently should be killed, but the - * details are not specified. + * details are not specified.
*/
@Public
@Evolving
public abstract class PreemptionMessage {
+ @Private
+ @Unstable
public static PreemptionMessage newInstance(StrictPreemptionContract set,
PreemptionContract contract) {
PreemptionMessage message = Records.newRecord(PreemptionMessage.class);
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionResourceRequest.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionResourceRequest.java
index d6982c7..ed5bc55 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionResourceRequest.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionResourceRequest.java
@@ -29,8 +29,12 @@
* @see PreemptionContract
* @see AllocateRequest#setAskList(java.util.List)
*/
+@Public
+@Evolving
public abstract class PreemptionResourceRequest {
+ @Private
+ @Unstable
public static PreemptionResourceRequest newInstance(ResourceRequest req) {
PreemptionResourceRequest request =
Records.newRecord(PreemptionResourceRequest.class);
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Priority.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Priority.java
index e918056..0d825bf 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Priority.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Priority.java
@@ -27,6 +27,8 @@
* allocation
*
*/
+@Public
+@Stable
public abstract class Priority implements Comparable
- * The ACLs are one of: + * The ACL is one of: *
State of a Queue.
* - *A queue is one of: + *
A queue is in one of: *
For a request at a network hierarchy level, set whether locality can be relaxed + * to that level and beyond.
*
- * If the flag is off on a rack-level ResourceRequest,
+ *
If the flag is off on a rack-level ResourceRequest,
* containers at that request's priority will not be assigned to nodes on that
* request's rack unless requests specifically for those nodes have also been
- * submitted.
+ * submitted.
* - * If the flag is off on an {@link ResourceRequest#ANY}-level + *
If the flag is off on an {@link ResourceRequest#ANY}-level
* ResourceRequest, containers at that request's priority will
* only be assigned on racks for which specific requests have also been
- * submitted.
+ * submitted.
* - * For example, to request a container strictly on a specific node, the + *
For example, to request a container strictly on a specific node, the * corresponding rack-level and any-level requests should have locality * relaxation set to false. Similarly, to request a container strictly on a * specific rack, the corresponding any-level request should have locality - * relaxation set to false. + * relaxation set to false.
*
* @param relaxLocality whether locality relaxation is enabled with this
* ResourceRequest.
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/StrictPreemptionContract.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/StrictPreemptionContract.java
index f702222..18ba25d 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/StrictPreemptionContract.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/StrictPreemptionContract.java
@@ -37,6 +37,8 @@
@Evolving
public abstract class StrictPreemptionContract {
+ @Private
+ @Unstable
public static StrictPreemptionContract newInstance(SetURL represents a serializable {@link java.net.URL}.ApplicationMaster.
+ * Enumeration of various states of an ApplicationMaster.
*/
@Public
@Stable
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnClusterMetrics.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnClusterMetrics.java
index 5d0565c..6610fdc 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnClusterMetrics.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnClusterMetrics.java
@@ -34,6 +34,7 @@
public abstract class YarnClusterMetrics {
@Private
+ @Unstable
public static YarnClusterMetrics newInstance(int numNodeManagers) {
YarnClusterMetrics metrics = Records.newRecord(YarnClusterMetrics.class);
metrics.setNumNodeManagers(numNodeManagers);
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/package-info.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/package-info.java
new file mode 100644
index 0000000..b6db540
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@InterfaceAudience.Public
+package org.apache.hadoop.yarn.api.records;
+import org.apache.hadoop.classification.InterfaceAudience;
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/package-info.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/package-info.java
new file mode 100644
index 0000000..ca0aa31
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@InterfaceAudience.Public
+package org.apache.hadoop.yarn.conf;
+import org.apache.hadoop.classification.InterfaceAudience;
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/package-info.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/package-info.java
new file mode 100644
index 0000000..cf639e4
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@InterfaceAudience.Private
+package org.apache.hadoop.yarn.factories;
+import org.apache.hadoop.classification.InterfaceAudience;
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factory/providers/package-info.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factory/providers/package-info.java
new file mode 100644
index 0000000..4f397f3
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factory/providers/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@InterfaceAudience.Private
+package org.apache.hadoop.yarn.factory.providers;
+import org.apache.hadoop.classification.InterfaceAudience;
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/AMRMClient.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/AMRMClient.java
index 0906346..949700e 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/AMRMClient.java
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/AMRMClient.java
@@ -53,7 +53,7 @@
* AMRMClient.