diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerRequestor.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerRequestor.java index cc34eb0923f..16271d492b2 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerRequestor.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/RMContainerRequestor.java @@ -241,7 +241,7 @@ public abstract class RMContainerRequestor extends RMCommunicator { ResourceRequest zeroedRequest = ResourceRequest.newInstance(req.getPriority(), req.getResourceName(), req.getCapability(), - req.getNumContainers()); + req.getNumContainers(), req.getRelaxLocality()); zeroedRequest.setNumContainers(0); // to be sent to RM on next heartbeat diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java index e2f648affa1..4083632f535 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/TestRMContainerAllocator.java @@ -1219,7 +1219,7 @@ public class TestRMContainerAllocator { for (ResourceRequest req : ask) { ResourceRequest reqCopy = ResourceRequest.newInstance(req .getPriority(), req.getResourceName(), req.getCapability(), req - .getNumContainers()); + .getNumContainers(), req.getRelaxLocality()); askCopy.add(reqCopy); } lastAsk = ask; diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index b2ec1c78e67..af118488644 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -406,6 +406,9 @@ Release 2.1.0-beta - UNRELEASED YARN-833. Moved Graph and VisualizeStateMachine into yarn.state package. (Zhijie Shen via vinodkv) + YARN-805. Fix javadoc and annotations on classes in the yarn-api + package. (Jian He via sseth) + OPTIMIZATIONS YARN-512. Log aggregation root directory check is more expensive than it diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java index f9ed776eacb..5427d3bad54 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java @@ -23,6 +23,7 @@ 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.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenRequest; import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenResponse; import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsRequest; @@ -73,7 +74,7 @@ public interface ApplicationClientProtocol { * 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}.

* * @param request request to get a new ApplicationId @@ -83,6 +84,8 @@ public interface ApplicationClientProtocol { * @throws IOException * @see #submitApplication(SubmitApplicationRequest) */ + @Public + @Stable public GetNewApplicationResponse getNewApplication( GetNewApplicationRequest request) throws YarnException, IOException; @@ -112,6 +115,8 @@ public interface ApplicationClientProtocol { * @throws IOException * @see #getNewApplication(GetNewApplicationRequest) */ + @Public + @Stable public SubmitApplicationResponse submitApplication( SubmitApplicationRequest request) throws YarnException, IOException; @@ -129,13 +134,15 @@ public interface ApplicationClientProtocol { *

Currently, the ResourceManager returns an empty response * on success and throws an exception on rejecting the request.

* - * @param request request to abort a submited application + * @param request request to abort a submitted application * @return 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 +178,8 @@ public interface ApplicationClientProtocol { * @throws YarnException * @throws IOException */ + @Public + @Stable public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException; @@ -189,6 +198,8 @@ public interface ApplicationClientProtocol { * @throws YarnException * @throws IOException */ + @Public + @Stable public GetClusterMetricsResponse getClusterMetrics( GetClusterMetricsRequest request) throws YarnException, IOException; @@ -211,6 +222,8 @@ public interface ApplicationClientProtocol { * @throws YarnException * @throws IOException */ + @Public + @Stable public GetAllApplicationsResponse getAllApplications( GetAllApplicationsRequest request) throws YarnException, IOException; @@ -228,6 +241,8 @@ public interface ApplicationClientProtocol { * @throws YarnException * @throws IOException */ + @Public + @Stable public GetClusterNodesResponse getClusterNodes( GetClusterNodesRequest request) throws YarnException, IOException; @@ -247,6 +262,8 @@ public interface ApplicationClientProtocol { * @throws YarnException * @throws IOException */ + @Public + @Stable public GetQueueInfoResponse getQueueInfo( GetQueueInfoRequest request) throws YarnException, IOException; @@ -264,6 +281,8 @@ public interface ApplicationClientProtocol { * @throws YarnException * @throws IOException */ + @Public + @Stable public GetQueueUserAclsInfoResponse getQueueUserAcls( GetQueueUserAclsInfoRequest request) throws YarnException, IOException; @@ -272,7 +291,7 @@ public interface ApplicationClientProtocol { *

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,12 +299,14 @@ public interface ApplicationClientProtocol { * @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. @@ -293,12 +314,13 @@ public interface ApplicationClientProtocol { * @throws IOException */ @Private + @Unstable 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. @@ -306,6 +328,7 @@ public interface ApplicationClientProtocol { * @throws IOException */ @Private + @Unstable public CancelDelegationTokenResponse cancelDelegationToken( CancelDelegationTokenRequest request) throws YarnException, IOException; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocolPB.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocolPB.java index 7f8cd38e9c7..9e50c54f29a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocolPB.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocolPB.java @@ -17,9 +17,13 @@ */ package org.apache.hadoop.yarn.api; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.ipc.ProtocolInfo; import org.apache.hadoop.yarn.proto.ApplicationClientProtocol.ApplicationClientProtocolService; +@Private +@Unstable @ProtocolInfo(protocolName = "org.apache.hadoop.yarn.api.ApplicationClientProtocolPB", protocolVersion = 1) public interface ApplicationClientProtocolPB extends ApplicationClientProtocolService.BlockingInterface { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java index a5d99a78cf5..ccf1f37c620 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationConstants.java +++ b/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,6 +29,8 @@ import org.apache.hadoop.util.Shell; * * TODO: Investigate the semantics and security of each cross-boundary refs. */ +@Public +@Evolving public interface ApplicationConstants { /** @@ -35,6 +39,9 @@ public interface ApplicationConstants { */ 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; @@ -46,6 +53,10 @@ public interface ApplicationConstants { 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 = ""; public static final String STDERR = "stderr"; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationMasterProtocol.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationMasterProtocol.java index 4baa8748bbe..bdf92fb7312 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationMasterProtocol.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationMasterProtocol.java @@ -54,7 +54,7 @@ public interface ApplicationMasterProtocol { * {@link RegisterApplicationMasterRequest}.

* *

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}.

* * @param request registration request @@ -64,6 +64,8 @@ public interface ApplicationMasterProtocol { * @see RegisterApplicationMasterRequest * @see RegisterApplicationMasterResponse */ + @Public + @Stable public RegisterApplicationMasterResponse registerApplicationMaster( RegisterApplicationMasterRequest request) throws YarnException, IOException; @@ -86,6 +88,8 @@ public interface ApplicationMasterProtocol { * @see FinishApplicationMasterRequest * @see FinishApplicationMasterResponse */ + @Public + @Stable public FinishApplicationMasterResponse finishApplicationMaster( FinishApplicationMasterRequest request) throws YarnException, IOException; @@ -122,6 +126,8 @@ public interface ApplicationMasterProtocol { * @see AllocateRequest * @see AllocateResponse */ + @Public + @Stable public AllocateResponse allocate(AllocateRequest request) throws YarnException, IOException; } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationMasterProtocolPB.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationMasterProtocolPB.java index 027a6f03238..841ef61a728 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationMasterProtocolPB.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationMasterProtocolPB.java @@ -17,9 +17,13 @@ */ package org.apache.hadoop.yarn.api; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.ipc.ProtocolInfo; import org.apache.hadoop.yarn.proto.ApplicationMasterProtocol.ApplicationMasterProtocolService; +@Private +@Unstable @ProtocolInfo(protocolName = "org.apache.hadoop.yarn.api.ApplicationMasterProtocolPB", protocolVersion = 1) public interface ApplicationMasterProtocolPB extends ApplicationMasterProtocolService.BlockingInterface { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ContainerManagementProtocolPB.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ContainerManagementProtocolPB.java index 86a9edcf3b5..82e9ad0de9b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ContainerManagementProtocolPB.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ContainerManagementProtocolPB.java @@ -17,9 +17,13 @@ */ package org.apache.hadoop.yarn.api; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.ipc.ProtocolInfo; import org.apache.hadoop.yarn.proto.ContainerManagementProtocol.ContainerManagementProtocolService; +@Private +@Unstable @ProtocolInfo( protocolName = "org.apache.hadoop.yarn.api.ContainerManagementProtocolPB", protocolVersion = 1) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ResourceManagerAdministrationProtocol.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ResourceManagerAdministrationProtocol.java index 76916b07ce0..ebc1c43d948 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ResourceManagerAdministrationProtocol.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ResourceManagerAdministrationProtocol.java @@ -20,6 +20,8 @@ package org.apache.hadoop.yarn.api; import java.io.IOException; +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Stable; import org.apache.hadoop.tools.GetUserMappingsProtocol; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.api.protocolrecords.RefreshAdminAclsRequest; @@ -35,26 +37,41 @@ import org.apache.hadoop.yarn.api.protocolrecords.RefreshSuperUserGroupsConfigur import org.apache.hadoop.yarn.api.protocolrecords.RefreshUserToGroupsMappingsRequest; import org.apache.hadoop.yarn.api.protocolrecords.RefreshUserToGroupsMappingsResponse; +@Public +@Stable public interface ResourceManagerAdministrationProtocol extends GetUserMappingsProtocol { + + @Public + @Stable public RefreshQueuesResponse refreshQueues(RefreshQueuesRequest request) throws YarnException, IOException; - + + @Public + @Stable public RefreshNodesResponse refreshNodes(RefreshNodesRequest request) throws YarnException, IOException; - + + @Public + @Stable public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration( RefreshSuperUserGroupsConfigurationRequest request) throws YarnException, IOException; + @Public + @Stable public RefreshUserToGroupsMappingsResponse refreshUserToGroupsMappings( RefreshUserToGroupsMappingsRequest request) throws YarnException, IOException; - + + @Public + @Stable public RefreshAdminAclsResponse refreshAdminAcls( RefreshAdminAclsRequest request) throws YarnException, IOException; - + + @Public + @Stable public RefreshServiceAclsResponse refreshServiceAcls( RefreshServiceAclsRequest request) throws YarnException, IOException; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ResourceManagerAdministrationProtocolPB.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ResourceManagerAdministrationProtocolPB.java index 50427262eeb..6979babf8a4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ResourceManagerAdministrationProtocolPB.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ResourceManagerAdministrationProtocolPB.java @@ -17,9 +17,13 @@ */ package org.apache.hadoop.yarn.api; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.ipc.ProtocolInfo; import org.apache.hadoop.yarn.proto.ResourceManagerAdministrationProtocol.ResourceManagerAdministrationProtocolService; +@Private +@Unstable @ProtocolInfo( protocolName = "org.apache.hadoop.yarn.api.ResourceManagerAdministrationProtocolPB", protocolVersion = 1) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/package-info.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/package-info.java new file mode 100644 index 00000000000..d1f4ea75b7d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/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; +import org.apache.hadoop.classification.InterfaceAudience; + diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java index 15ab399ded3..964d3683bd3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateRequest.java @@ -59,6 +59,8 @@ import org.apache.hadoop.yarn.util.Records; @Stable public abstract class AllocateRequest { + @Public + @Stable public static AllocateRequest newInstance( ApplicationAttemptId applicationAttemptId, int responseID, float appProgress, List resourceAsk, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java index 689368f25e2..3de74f7c9f5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/AllocateResponse.java @@ -43,10 +43,10 @@ import org.apache.hadoop.yarn.util.Records; * *

* @@ -51,7 +51,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class ApplicationReport { @Private - @Stable + @Unstable public static ApplicationReport newInstance(ApplicationId applicationId, ApplicationAttemptId applicationAttemptId, String user, String queue, String name, String host, int rpcPort, Token clientToAMToken, @@ -98,8 +98,8 @@ public abstract class ApplicationReport { * attempt of the application * @return ApplicationAttemptId of the attempt */ - @Private - @Unstable + @Public + @Stable public abstract ApplicationAttemptId getCurrentApplicationAttemptId(); @Private diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationResourceUsageReport.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationResourceUsageReport.java index 4cf2b145278..8de9ff3baf1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationResourceUsageReport.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationResourceUsageReport.java @@ -32,6 +32,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class ApplicationResourceUsageReport { @Private + @Unstable public static ApplicationResourceUsageReport newInstance( int numUsedContainers, int numReservedContainers, Resource usedResources, Resource reservedResources, Resource neededResources) { @@ -65,8 +66,8 @@ public abstract class ApplicationResourceUsageReport { * Get the number of reserved containers * @return the number of reserved containers */ - @Public - @Stable + @Private + @Unstable public abstract int getNumReservedContainers(); /** diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java index 3d669b08c56..eaea13e7739 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java @@ -19,6 +19,7 @@ package org.apache.hadoop.yarn.api.records; import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate; +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; @@ -145,8 +146,8 @@ public abstract class ApplicationSubmissionContext { * Set the Priority of the application. * @param priority Priority of the application */ - @Public - @Stable + @Private + @Unstable public abstract void setPriority(Priority priority); /** @@ -183,14 +184,14 @@ public abstract class ApplicationSubmissionContext { * @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); /** @@ -214,7 +215,7 @@ public abstract class ApplicationSubmissionContext { * @return the number of max attempts of the application to be submitted */ @Public - @Unstable + @Stable public abstract int getMaxAppAttempts(); /** @@ -225,31 +226,44 @@ public abstract class ApplicationSubmissionContext { * to be submitted. */ @Public - @Unstable + @Stable public abstract void setMaxAppAttempts(int maxAppAttempts); + /** + * Get the resource required by the ApplicationMaster for this + * application. + * + * @return the resource required by the ApplicationMaster for + * this application. + */ @Public @Stable public abstract Resource getResource(); + /** + * Set the resource required by the ApplicationMaster for this + * application. + * + * @param resource the resource required by the ApplicationMaster + * for this application. + */ @Public @Stable 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 a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Container.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Container.java index fb205f83344..cb8d04bbda3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Container.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Container.java @@ -46,7 +46,7 @@ import org.apache.hadoop.yarn.util.Records; *
  • {@link Priority} at which the container was allocated.
  • *
  • {@link ContainerState} of the container.
  • *
  • - * Container Token {@link Token} of the container, used to securely verify + * Container {@link Token} of the container, used to securely verify * authenticity of the allocation. *
  • *
  • {@link ContainerStatus} of the container.
  • @@ -55,7 +55,7 @@ import org.apache.hadoop.yarn.util.Records; * *

    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.

    * * @see ApplicationMasterProtocol#allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest) @@ -67,6 +67,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class Container implements Comparable { @Private + @Unstable public static Container newInstance(ContainerId containerId, NodeId nodeId, String nodeHttpAddress, Resource resource, Priority priority, Token containerToken) { @@ -134,6 +135,8 @@ public abstract class Container implements Comparable { * @return Priority at which the Container was * allocated */ + @Public + @Stable public abstract Priority getPriority(); @Private diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerExitStatus.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerExitStatus.java index c08fd270939..76cb6c19581 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerExitStatus.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerExitStatus.java @@ -19,13 +19,13 @@ package org.apache.hadoop.yarn.api.records; import org.apache.hadoop.classification.InterfaceAudience.Public; -import org.apache.hadoop.classification.InterfaceStability.Evolving; +import org.apache.hadoop.classification.InterfaceStability.Unstable; /** * Container exit statuses indicating special exit circumstances. */ @Public -@Evolving +@Unstable public class ContainerExitStatus { public static final int SUCCESS = 0; public static final int INVALID = -1000; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerId.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerId.java index 95a989abd26..ccbe6f16103 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerId.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerId.java @@ -23,6 +23,7 @@ import java.text.NumberFormat; 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 @@ import org.apache.hadoop.yarn.util.Records; public abstract class ContainerId implements Comparable{ @Private + @Unstable public static ContainerId newInstance(ApplicationAttemptId appAttemptId, int containerId) { ContainerId id = Records.newRecord(ContainerId.class); @@ -54,6 +56,7 @@ public abstract class ContainerId implements Comparable{ public abstract ApplicationAttemptId getApplicationAttemptId(); @Private + @Unstable protected abstract void setApplicationAttemptId(ApplicationAttemptId atId); /** @@ -65,6 +68,7 @@ public abstract class ContainerId implements Comparable{ public abstract int getId(); @Private + @Unstable protected abstract void setId(int id); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerState.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerState.java index b7ff5371fc0..323d31d4c63 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerState.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerState.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 Container.

    */ +@Public +@Stable public enum ContainerState { /** New container */ NEW, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java index 6322ee18086..574373c2e78 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java @@ -42,6 +42,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class ContainerStatus { @Private + @Unstable public static ContainerStatus newInstance(ContainerId containerId, ContainerState containerState, String diagnostics, int exitStatus) { ContainerStatus containerStatus = Records.newRecord(ContainerStatus.class); @@ -96,7 +97,7 @@ public abstract class ContainerStatus { * @return exit status for the container */ @Public - @Stable + @Unstable public abstract int getExitStatus(); @Private diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResource.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResource.java index f2a3effa0e6..a220e6e38e8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResource.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResource.java @@ -69,24 +69,32 @@ public abstract class LocalResource { * Get the location of the resource to be localized. * @return location of the resource to be localized */ + @Public + @Stable public abstract URL getResource(); /** * Set location of the resource to be localized. * @param resource location of the resource to be localized */ + @Public + @Stable public abstract void setResource(URL resource); /** * Get the size of the resource to be localized. * @return size of the resource to be localized */ + @Public + @Stable public abstract long getSize(); /** * Set the size of the resource to be localized. * @param size size of the resource to be localized */ + @Public + @Stable public abstract void setSize(long size); /** @@ -94,6 +102,8 @@ public abstract class LocalResource { * for verification. * @return timestamp of the resource to be localized */ + @Public + @Stable public abstract long getTimestamp(); /** @@ -101,18 +111,24 @@ public abstract class LocalResource { * for verification. * @param timestamp timestamp of the resource to be localized */ + @Public + @Stable public abstract void setTimestamp(long timestamp); /** * Get the 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 abstract class LocalResource { * @return LocalResourceVisibility of the resource to be * localized */ + @Public + @Stable public abstract LocalResourceVisibility getVisibility(); /** @@ -129,6 +147,8 @@ public abstract class LocalResource { * @param visibility LocalResourceVisibility of the resource to be * localized */ + @Public + @Stable public abstract void setVisibility(LocalResourceVisibility visibility); /** @@ -137,6 +157,8 @@ public abstract class LocalResource { * @return pattern that should be used to extract entries from the * archive. */ + @Public + @Stable public abstract String getPattern(); /** @@ -145,5 +167,7 @@ public abstract class LocalResource { * @param pattern pattern that should be used to extract entries * from the archive. */ + @Public + @Stable public abstract void setPattern(String pattern); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java index 30099716eab..c1c5eb41942 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalResourceType.java @@ -35,6 +35,8 @@ import org.apache.hadoop.yarn.api.ContainerManagementProtocol; * {@link #ARCHIVE} - Archive, which is automatically unarchived by the * NodeManager. * + *
  • + * {@link #PATTERN} - A hybrid between {@link #ARCHIVE} and {@link #FILE}. * *

    * diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NMToken.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NMToken.java index a90144793d0..d8bf0e66f7a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NMToken.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NMToken.java @@ -21,13 +21,37 @@ 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.protocolrecords.AllocateResponse; import org.apache.hadoop.yarn.util.Records; /** - * NMToken is returned by RM on AllocateResponse. + *

    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.

    + * @see AllocateResponse#getNMTokens() */ +@Public +@Stable public abstract class NMToken { + @Private + @Unstable + public static NMToken newInstance(NodeId nodeId, Token token) { + NMToken nmToken = Records.newRecord(NMToken.class); + nmToken.setNodeId(nodeId); + nmToken.setToken(token); + return nmToken; + } + + /** + * Get the {@link NodeId} of the 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 +59,11 @@ public abstract class NMToken { @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 +71,5 @@ public abstract class NMToken { @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 a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeId.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeId.java index 3c22c589b6b..c3f859598f3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeId.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeId.java @@ -21,6 +21,7 @@ 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.util.Records; /** @@ -35,6 +36,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class NodeId implements Comparable { @Private + @Unstable public static NodeId newInstance(String host, int port) { NodeId nodeId = Records.newRecord(NodeId.class); nodeId.setHost(host); @@ -52,6 +54,7 @@ public abstract class NodeId implements Comparable { public abstract String getHost(); @Private + @Unstable protected abstract void setHost(String host); /** @@ -63,6 +66,7 @@ public abstract class NodeId implements Comparable { public abstract int getPort(); @Private + @Unstable protected abstract void setPort(int port); @Override diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java index 496d3307d16..2b2ef499cb1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java @@ -47,6 +47,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class NodeReport { @Private + @Unstable public static NodeReport newInstance(NodeId nodeId, NodeState nodeState, String httpAddress, String rackName, Resource used, Resource capability, int numContainers, String healthReport, long lastHealthReportTime) { @@ -67,6 +68,8 @@ public abstract class NodeReport { * Get the NodeId of the node. * @return NodeId of the node */ + @Public + @Stable public abstract NodeId getNodeId(); @Private @@ -77,6 +80,8 @@ public abstract class NodeReport { * Get the NodeState of the node. * @return NodeState of the node */ + @Public + @Stable public abstract NodeState getNodeState(); @Private @@ -132,11 +137,11 @@ public abstract class NodeReport { public abstract void setCapability(Resource capability); /** - * Get the number of running containers on the node. - * @return number of running containers on the node + * Get the number of allocated containers on the node. + * @return number of allocated containers on the node */ - @Public - @Stable + @Private + @Unstable public abstract int getNumContainers(); @Private diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeState.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeState.java index 7345c258c7c..ff1ca489121 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeState.java +++ b/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.Unstable; + /** *

    State of a Node.

    */ +@Public +@Unstable public enum NodeState { /** New node */ NEW, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionContainer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionContainer.java index 3535eeb52a8..4dd3178afa0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionContainer.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionContainer.java @@ -28,8 +28,12 @@ import org.apache.hadoop.yarn.util.Records; * @see PreemptionContract * @see StrictPreemptionContract */ +@Public +@Evolving public abstract class PreemptionContainer { + @Private + @Unstable public static PreemptionContainer newInstance(ContainerId id) { PreemptionContainer container = Records.newRecord(PreemptionContainer.class); container.setId(id); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionContract.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionContract.java index c794aff71cb..dc954efb635 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionContract.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionContract.java @@ -34,8 +34,12 @@ import org.apache.hadoop.yarn.util.Records; * the platform. * @see PreemptionMessage */ +@Public +@Evolving public abstract class PreemptionContract { + @Private + @Unstable public static PreemptionContract newInstance( List req, Set containers) { PreemptionContract contract = Records.newRecord(PreemptionContract.class); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionMessage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionMessage.java index 72bcadafbd5..976d18125cf 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionMessage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionMessage.java @@ -24,41 +24,43 @@ import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.util.Records; /** - * A {@link PreemptionMessage} is part of the RM-AM protocol, and it is used by + *

    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 N containers may not * reflect containers the AM is releasing, recently exited containers the RM has * yet to learn about, or new containers allocated before the message was * generated. Conversely, an RM may request a different profile of containers in - * subsequent requests. + * subsequent requests.

    * - * 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 a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionResourceRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionResourceRequest.java index d6982c757f5..ed5bc550049 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionResourceRequest.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/PreemptionResourceRequest.java @@ -29,8 +29,12 @@ import org.apache.hadoop.yarn.util.Records; * @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 a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Priority.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Priority.java index e9180566f8b..0d825bf46ef 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Priority.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Priority.java @@ -27,6 +27,8 @@ import org.apache.hadoop.yarn.util.Records; * allocation * */ +@Public +@Stable public abstract class Priority implements Comparable { @Public @@ -41,12 +43,16 @@ public abstract class Priority implements Comparable { * Get the assigned priority * @return the assigned priority */ + @Public + @Stable public abstract int getPriority(); /** * Set the assigned priority * @param priority the assigned priority */ + @Public + @Stable public abstract void setPriority(int priority); @Override diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java index ccd91918cfd..c6777db03ee 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueACL.java @@ -28,7 +28,7 @@ import org.apache.hadoop.yarn.api.ApplicationClientProtocol; *

    * *

    - * The ACLs are one of: + * The ACL is one of: *

      *
    • {@link #SUBMIT_APPLICATIONS} - ACL to submit applications to the * queue.
    • diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java index 3a58babb9a7..7146db224f4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java @@ -50,6 +50,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class QueueInfo { @Private + @Unstable public static QueueInfo newInstance(String queueName, float capacity, float maximumCapacity, float currentCapacity, List childQueues, List applications, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java index eb2cbaa5bd7..01698de654f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueState.java @@ -25,7 +25,7 @@ import org.apache.hadoop.yarn.api.ApplicationClientProtocol; /** *

      State of a Queue.

      * - *

      A queue is one of: + *

      A queue is in one of: *

        *
      • {@link #RUNNING} - normal state.
      • *
      • {@link #STOPPED} - not accepting new application submissions. diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueUserACLInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueUserACLInfo.java index 21d75fce974..022d457c9cf 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueUserACLInfo.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueUserACLInfo.java @@ -39,6 +39,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class QueueUserACLInfo { @Private + @Unstable public static QueueUserACLInfo newInstance(String queueName, List acls) { QueueUserACLInfo info = Records.newRecord(QueueUserACLInfo.class); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceBlacklistRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceBlacklistRequest.java index 130d3610353..bb34bc4d2e1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceBlacklistRequest.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceBlacklistRequest.java @@ -35,7 +35,9 @@ import org.apache.hadoop.yarn.util.Records; @Public @Stable public abstract class ResourceBlacklistRequest { - + + @Public + @Stable public static ResourceBlacklistRequest newInstance( List additions, List removals) { ResourceBlacklistRequest blacklistRequest = @@ -46,38 +48,46 @@ public abstract class ResourceBlacklistRequest { } /** - * Get the list of resources which should be added to the + * Get the list of resource-names which should be added to the * application blacklist. * - * @return list of resources which should be added to the + * @return list of resource-names which should be added to the * application blacklist */ + @Public + @Stable public abstract List getBlacklistAdditions(); /** - * Set list of resources which should be added to the application blacklist. + * Set list of resource-names which should be added to the application blacklist. * - * @param resourceNames list of resources which should be added to the + * @param resourceNames list of resource-names which should be added to the * application blacklist */ + @Public + @Stable public abstract void setBlacklistAdditions(List resourceNames); /** - * Get the list of resources which should be removed from the + * Get the list of resource-names which should be removed from the * application blacklist. * - * @return list of resources which should be removed from the + * @return list of resource-names which should be removed from the * application blacklist */ + @Public + @Stable public abstract List getBlacklistRemovals(); /** - * Set list of resources which should be removed from the + * Set list of resource-names which should be removed from the * application blacklist. * - * @param resourceNames list of resources which should be removed from the + * @param resourceNames list of resource-names which should be removed from the * application blacklist */ + @Public + @Stable public abstract void setBlacklistRemovals(List resourceNames); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java index f9e71ebdcbd..d7aa413b8e2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java @@ -61,18 +61,31 @@ public abstract class ResourceRequest implements Comparable { @Public @Stable - public static ResourceRequest newInstance(Priority priority, - String hostName, Resource capability, int numContainers) { + public static ResourceRequest newInstance(Priority priority, String hostName, + Resource capability, int numContainers) { + return newInstance(priority, hostName, capability, numContainers, true); + } + + @Public + @Stable + public static ResourceRequest newInstance(Priority priority, String hostName, + Resource capability, int numContainers, boolean relaxLocality) { ResourceRequest request = Records.newRecord(ResourceRequest.class); request.setPriority(priority); request.setResourceName(hostName); request.setCapability(capability); request.setNumContainers(numContainers); + request.setRelaxLocality(relaxLocality); return request; } + @Public + @Stable public static class ResourceRequestComparator implements java.util.Comparator, Serializable { + + private static final long serialVersionUID = 1L; + @Override public int compare(ResourceRequest r1, ResourceRequest r2) { @@ -105,6 +118,8 @@ public abstract class ResourceRequest implements Comparable { * @return whether the given host/rack string represents an arbitrary * host name */ + @Public + @Stable public static boolean isAnyLocation(String hostName) { return ANY.equals(hostName); } @@ -140,10 +155,10 @@ public abstract class ResourceRequest implements Comparable { public abstract String getResourceName(); /** - * Set the resource (e.g. host/rack) on which the allocation + * Set the resource name (e.g. host/rack) on which the allocation * is desired. * - * A special value of * signifies that any resource + * A special value of * signifies that any resource name * (e.g. host/rack) is acceptable. * * @param resourceName (e.g. host/rack) on which the @@ -198,24 +213,24 @@ public abstract class ResourceRequest implements Comparable { public abstract boolean getRelaxLocality(); /** - * For a request at a network hierarchy level, set whether locality can be relaxed - * to that level and beyond. + *

        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 a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/StrictPreemptionContract.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/StrictPreemptionContract.java index f702222d28e..18ba25dd62e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/StrictPreemptionContract.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/StrictPreemptionContract.java @@ -37,6 +37,8 @@ import org.apache.hadoop.yarn.util.Records; @Evolving public abstract class StrictPreemptionContract { + @Private + @Unstable public static StrictPreemptionContract newInstance(Set containers) { StrictPreemptionContract contract = Records.newRecord(StrictPreemptionContract.class); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Token.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Token.java index 8dfa376576f..ae2983ba6da 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Token.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Token.java @@ -23,6 +23,7 @@ import java.nio.ByteBuffer; 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 @@ import org.apache.hadoop.yarn.util.Records; public abstract class Token { @Private + @Unstable public static Token newInstance(byte[] identifier, String kind, byte[] password, String service) { Token token = Records.newRecord(Token.class); @@ -53,7 +55,7 @@ public abstract class Token { public abstract ByteBuffer getIdentifier(); @Private - @Stable + @Unstable public abstract void setIdentifier(ByteBuffer identifier); /** @@ -65,7 +67,7 @@ public abstract class Token { public abstract ByteBuffer getPassword(); @Private - @Stable + @Unstable public abstract void setPassword(ByteBuffer password); /** @@ -77,7 +79,7 @@ public abstract class Token { public abstract String getKind(); @Private - @Stable + @Unstable public abstract void setKind(String kind); /** @@ -89,7 +91,7 @@ public abstract class Token { public abstract String getService(); @Private - @Stable + @Unstable public abstract void setService(String service); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/URL.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/URL.java index 0a6b715e497..769494e2e9e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/URL.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/URL.java @@ -19,7 +19,6 @@ package org.apache.hadoop.yarn.api.records; import org.apache.hadoop.classification.InterfaceAudience.Public; -import org.apache.hadoop.classification.InterfaceStability.Evolving; import org.apache.hadoop.classification.InterfaceStability.Stable; import org.apache.hadoop.yarn.util.Records; @@ -27,7 +26,7 @@ import org.apache.hadoop.yarn.util.Records; *

        URL represents a serializable {@link java.net.URL}.

        */ @Public -@Evolving +@Stable public abstract class URL { @Public @@ -46,7 +45,7 @@ public abstract class URL { * @return scheme of the URL */ @Public - @Evolving + @Stable public abstract String getScheme(); /** @@ -54,7 +53,7 @@ public abstract class URL { * @param scheme scheme of the URL */ @Public - @Evolving + @Stable public abstract void setScheme(String scheme); /** @@ -62,7 +61,7 @@ public abstract class URL { * @return host of the URL */ @Public - @Evolving + @Stable public abstract String getHost(); /** @@ -70,7 +69,7 @@ public abstract class URL { * @param host host of the URL */ @Public - @Evolving + @Stable public abstract void setHost(String host); /** @@ -78,7 +77,7 @@ public abstract class URL { * @return port of the URL */ @Public - @Evolving + @Stable public abstract int getPort(); /** @@ -86,7 +85,7 @@ public abstract class URL { * @param port port of the URL */ @Public - @Evolving + @Stable public abstract void setPort(int port); /** @@ -94,7 +93,7 @@ public abstract class URL { * @return file of the URL */ @Public - @Evolving + @Stable public abstract String getFile(); /** @@ -102,6 +101,6 @@ public abstract class URL { * @param file file of the URL */ @Public - @Evolving + @Stable public abstract void setFile(String file); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnApplicationState.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnApplicationState.java index edbd34d6454..9421ce99710 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnApplicationState.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnApplicationState.java @@ -22,7 +22,7 @@ import org.apache.hadoop.classification.InterfaceAudience.Public; import org.apache.hadoop.classification.InterfaceStability.Stable; /** - * Ennumeration of various states of an ApplicationMaster. + * Enumeration of various states of an ApplicationMaster. */ @Public @Stable diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnClusterMetrics.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnClusterMetrics.java index 5d0565ce728..6610fdc37a8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnClusterMetrics.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/YarnClusterMetrics.java @@ -34,6 +34,7 @@ import org.apache.hadoop.yarn.util.Records; public abstract class YarnClusterMetrics { @Private + @Unstable public static YarnClusterMetrics newInstance(int numNodeManagers) { YarnClusterMetrics metrics = Records.newRecord(YarnClusterMetrics.class); metrics.setNumNodeManagers(numNodeManagers); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java index 6cf3d03e213..521d9ccfeab 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationAttemptIdPBImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationAttemptIdProto; @@ -25,6 +27,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto; import com.google.common.base.Preconditions; +@Private +@Unstable public class ApplicationAttemptIdPBImpl extends ApplicationAttemptId { ApplicationAttemptIdProto proto = null; ApplicationAttemptIdProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationIdPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationIdPBImpl.java index c758f54eea8..df038e5f0e7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationIdPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationIdPBImpl.java @@ -19,12 +19,15 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto; import com.google.common.base.Preconditions; - +@Private +@Unstable public class ApplicationIdPBImpl extends ApplicationId { ApplicationIdProto proto = null; ApplicationIdProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java index d0da50d296b..5db4d0e6aef 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.security.proto.SecurityProtos.TokenProto; import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.api.records.ApplicationId; @@ -35,6 +37,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.FinalApplicationStatusProto; import org.apache.hadoop.yarn.proto.YarnProtos.YarnApplicationStateProto; import org.apache.hadoop.yarn.util.ProtoUtils; +@Private +@Unstable public class ApplicationReportPBImpl extends ApplicationReport { ApplicationReportProto proto = ApplicationReportProto.getDefaultInstance(); ApplicationReportProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationResourceUsageReportPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationResourceUsageReportPBImpl.java index 9fa8e9dd4cc..eb834241ef0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationResourceUsageReportPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationResourceUsageReportPBImpl.java @@ -18,12 +18,16 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport; import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationResourceUsageReportProto; import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationResourceUsageReportProtoOrBuilder; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto; +@Private +@Unstable public class ApplicationResourceUsageReportPBImpl extends ApplicationResourceUsageReport { ApplicationResourceUsageReportProto proto = diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationSubmissionContextPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationSubmissionContextPBImpl.java index 0968aaff974..96f280ac282 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationSubmissionContextPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationSubmissionContextPBImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext; import org.apache.hadoop.yarn.api.records.ContainerLaunchContext; @@ -29,7 +31,9 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationSubmissionContextProto import org.apache.hadoop.yarn.proto.YarnProtos.ContainerLaunchContextProto; import org.apache.hadoop.yarn.proto.YarnProtos.PriorityProto; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto; - + +@Private +@Unstable public class ApplicationSubmissionContextPBImpl extends ApplicationSubmissionContext { ApplicationSubmissionContextProto proto = diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerIdPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerIdPBImpl.java index 70492608824..9be829fb490 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerIdPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerIdPBImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationAttemptIdProto; @@ -25,7 +27,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; import com.google.common.base.Preconditions; - +@Private +@Unstable public class ContainerIdPBImpl extends ContainerId { ContainerIdProto proto = null; ContainerIdProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerLaunchContextPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerLaunchContextPBImpl.java index 667e09bdd2e..9734c3a2d08 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerLaunchContextPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerLaunchContextPBImpl.java @@ -25,6 +25,8 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ApplicationAccessType; import org.apache.hadoop.yarn.api.records.ContainerLaunchContext; import org.apache.hadoop.yarn.api.records.LocalResource; @@ -39,6 +41,8 @@ import org.apache.hadoop.yarn.util.ProtoUtils; import com.google.protobuf.ByteString; +@Private +@Unstable public class ContainerLaunchContextPBImpl extends ContainerLaunchContext { ContainerLaunchContextProto proto = diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java index 22bac0298bb..1700068fa8a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.security.proto.SecurityProtos.TokenProto; import org.apache.hadoop.yarn.api.records.Container; import org.apache.hadoop.yarn.api.records.ContainerId; @@ -31,7 +33,9 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ContainerProtoOrBuilder; import org.apache.hadoop.yarn.proto.YarnProtos.NodeIdProto; import org.apache.hadoop.yarn.proto.YarnProtos.PriorityProto; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto; - + +@Private +@Unstable public class ContainerPBImpl extends Container { ContainerProto proto = ContainerProto.getDefaultInstance(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java index 5c0a1c0e285..b8558c6e26e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java @@ -19,6 +19,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.api.records.ContainerState; import org.apache.hadoop.yarn.api.records.ContainerStatus; @@ -28,8 +30,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto; import org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProtoOrBuilder; import org.apache.hadoop.yarn.util.ProtoUtils; - - +@Private +@Unstable public class ContainerStatusPBImpl extends ContainerStatus { ContainerStatusProto proto = ContainerStatusProto.getDefaultInstance(); ContainerStatusProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/LocalResourcePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/LocalResourcePBImpl.java index 4dd77bc3232..2d0929a8cc9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/LocalResourcePBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/LocalResourcePBImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.LocalResource; import org.apache.hadoop.yarn.api.records.LocalResourceType; import org.apache.hadoop.yarn.api.records.LocalResourceVisibility; @@ -29,8 +31,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.LocalResourceVisibilityProto; import org.apache.hadoop.yarn.proto.YarnProtos.URLProto; import org.apache.hadoop.yarn.util.ProtoUtils; - - +@Private +@Unstable public class LocalResourcePBImpl extends LocalResource { LocalResourceProto proto = LocalResourceProto.getDefaultInstance(); LocalResourceProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NMTokenPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NMTokenPBImpl.java index 28876aa4766..bcbf0a3f8af 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NMTokenPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NMTokenPBImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.security.proto.SecurityProtos.TokenProto; import org.apache.hadoop.yarn.api.records.NMToken; import org.apache.hadoop.yarn.api.records.NodeId; @@ -26,7 +28,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.NodeIdProto; import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProtoOrBuilder; - +@Private +@Unstable public class NMTokenPBImpl extends NMToken{ NMTokenProto proto = NMTokenProto.getDefaultInstance(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NodeIdPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NodeIdPBImpl.java index d406b103f94..4c725faed8a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NodeIdPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NodeIdPBImpl.java @@ -19,13 +19,15 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.NodeId; import org.apache.hadoop.yarn.proto.YarnProtos.NodeIdProto; import com.google.common.base.Preconditions; - - +@Private +@Unstable public class NodeIdPBImpl extends NodeId { NodeIdProto proto = null; NodeIdProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NodeReportPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NodeReportPBImpl.java index 8e8f877b567..06d44245252 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NodeReportPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/NodeReportPBImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.NodeId; import org.apache.hadoop.yarn.api.records.NodeReport; import org.apache.hadoop.yarn.api.records.NodeState; @@ -28,6 +30,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProtoOrBuilder; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto; import org.apache.hadoop.yarn.util.ProtoUtils; +@Private +@Unstable public class NodeReportPBImpl extends NodeReport { private NodeReportProto proto = NodeReportProto.getDefaultInstance(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionContainerPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionContainerPBImpl.java index a67e37a36ee..55ead2061c3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionContainerPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionContainerPBImpl.java @@ -17,12 +17,16 @@ */ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.api.records.PreemptionContainer; import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto; import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProtoOrBuilder; +@Private +@Unstable public class PreemptionContainerPBImpl extends PreemptionContainer { PreemptionContainerProto proto = diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionContractPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionContractPBImpl.java index e6b97c3838d..07a0af95c47 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionContractPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionContractPBImpl.java @@ -23,6 +23,8 @@ import java.util.Iterator; import java.util.List; import java.util.Set; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.PreemptionContainer; import org.apache.hadoop.yarn.api.records.PreemptionContract; import org.apache.hadoop.yarn.api.records.PreemptionResourceRequest; @@ -31,6 +33,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProto; import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProtoOrBuilder; import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionResourceRequestProto; +@Private +@Unstable public class PreemptionContractPBImpl extends PreemptionContract { PreemptionContractProto proto = PreemptionContractProto.getDefaultInstance(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionMessagePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionMessagePBImpl.java index 1163b0015ed..65dc820b90b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionMessagePBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionMessagePBImpl.java @@ -17,6 +17,8 @@ */ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.PreemptionContract; import org.apache.hadoop.yarn.api.records.PreemptionMessage; import org.apache.hadoop.yarn.api.records.StrictPreemptionContract; @@ -25,6 +27,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionMessageProto; import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionMessageProtoOrBuilder; import org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto; +@Private +@Unstable public class PreemptionMessagePBImpl extends PreemptionMessage { PreemptionMessageProto proto = PreemptionMessageProto.getDefaultInstance(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionResourceRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionResourceRequestPBImpl.java index 3297fe55620..97930c3dae4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionResourceRequestPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PreemptionResourceRequestPBImpl.java @@ -17,12 +17,16 @@ */ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.PreemptionResourceRequest; import org.apache.hadoop.yarn.api.records.ResourceRequest; import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionResourceRequestProto; import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionResourceRequestProtoOrBuilder; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceRequestProto; +@Private +@Unstable public class PreemptionResourceRequestPBImpl extends PreemptionResourceRequest { PreemptionResourceRequestProto proto = diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PriorityPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PriorityPBImpl.java index 3c67d66d3af..c8abdbe587e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PriorityPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/PriorityPBImpl.java @@ -18,10 +18,14 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.Priority; import org.apache.hadoop.yarn.proto.YarnProtos.PriorityProto; import org.apache.hadoop.yarn.proto.YarnProtos.PriorityProtoOrBuilder; - + +@Private +@Unstable public class PriorityPBImpl extends Priority { PriorityProto proto = PriorityProto.getDefaultInstance(); PriorityProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java index 3c24c3479df..b20cf44fedc 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java @@ -22,6 +22,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ApplicationReport; import org.apache.hadoop.yarn.api.records.QueueInfo; import org.apache.hadoop.yarn.api.records.QueueState; @@ -31,6 +33,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.QueueInfoProtoOrBuilder; import org.apache.hadoop.yarn.proto.YarnProtos.QueueStateProto; import org.apache.hadoop.yarn.util.ProtoUtils; +@Private +@Unstable public class QueueInfoPBImpl extends QueueInfo { QueueInfoProto proto = QueueInfoProto.getDefaultInstance(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueUserACLInfoPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueUserACLInfoPBImpl.java index a34eaa14644..ba0da93057e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueUserACLInfoPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueUserACLInfoPBImpl.java @@ -22,6 +22,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.QueueACL; import org.apache.hadoop.yarn.api.records.QueueUserACLInfo; import org.apache.hadoop.yarn.proto.YarnProtos.QueueACLProto; @@ -29,6 +31,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.QueueUserACLInfoProto; import org.apache.hadoop.yarn.proto.YarnProtos.QueueUserACLInfoProtoOrBuilder; import org.apache.hadoop.yarn.util.ProtoUtils; +@Private +@Unstable public class QueueUserACLInfoPBImpl extends QueueUserACLInfo { QueueUserACLInfoProto proto = QueueUserACLInfoProto.getDefaultInstance(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceBlacklistRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceBlacklistRequestPBImpl.java index 583068b41a8..96cb139925c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceBlacklistRequestPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceBlacklistRequestPBImpl.java @@ -21,10 +21,14 @@ package org.apache.hadoop.yarn.api.records.impl.pb; import java.util.ArrayList; import java.util.List; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.ResourceBlacklistRequest; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceBlacklistRequestProto; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceBlacklistRequestProtoOrBuilder; +@Private +@Unstable public class ResourceBlacklistRequestPBImpl extends ResourceBlacklistRequest { ResourceBlacklistRequestProto proto = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourcePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourcePBImpl.java index 276f395c99e..a28c6ed3305 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourcePBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourcePBImpl.java @@ -19,10 +19,14 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProtoOrBuilder; +@Private +@Unstable public class ResourcePBImpl extends Resource { ResourceProto proto = ResourceProto.getDefaultInstance(); ResourceProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceRequestPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceRequestPBImpl.java index 2b85acb6775..22863ac551b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceRequestPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceRequestPBImpl.java @@ -19,6 +19,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.Priority; import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.api.records.ResourceRequest; @@ -27,6 +29,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceRequestProto; import org.apache.hadoop.yarn.proto.YarnProtos.ResourceRequestProtoOrBuilder; +@Private +@Unstable public class ResourceRequestPBImpl extends ResourceRequest { ResourceRequestProto proto = ResourceRequestProto.getDefaultInstance(); ResourceRequestProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/StrictPreemptionContractPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/StrictPreemptionContractPBImpl.java index 4e06b87801a..0d80921396b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/StrictPreemptionContractPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/StrictPreemptionContractPBImpl.java @@ -22,12 +22,16 @@ import java.util.Iterator; import java.util.List; import java.util.Set; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.PreemptionContainer; import org.apache.hadoop.yarn.api.records.StrictPreemptionContract; import org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto; import org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProto; import org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProtoOrBuilder; +@Private +@Unstable public class StrictPreemptionContractPBImpl extends StrictPreemptionContract { StrictPreemptionContractProto proto = diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/TokenPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/TokenPBImpl.java index b58df8267ba..2ad25be5693 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/TokenPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/TokenPBImpl.java @@ -20,6 +20,8 @@ package org.apache.hadoop.yarn.api.records.impl.pb; import java.nio.ByteBuffer; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.security.proto.SecurityProtos.TokenProto; import org.apache.hadoop.security.proto.SecurityProtos.TokenProtoOrBuilder; import org.apache.hadoop.yarn.api.records.Token; @@ -27,6 +29,8 @@ import org.apache.hadoop.yarn.util.ProtoUtils; import com.google.protobuf.ByteString; +@Private +@Unstable public class TokenPBImpl extends Token { private TokenProto proto = TokenProto.getDefaultInstance(); private TokenProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/URLPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/URLPBImpl.java index 4d5077667b7..14cc762e020 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/URLPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/URLPBImpl.java @@ -19,12 +19,14 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.URL; import org.apache.hadoop.yarn.proto.YarnProtos.URLProto; import org.apache.hadoop.yarn.proto.YarnProtos.URLProtoOrBuilder; - - +@Private +@Unstable public class URLPBImpl extends URL { URLProto proto = URLProto.getDefaultInstance(); URLProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/YarnClusterMetricsPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/YarnClusterMetricsPBImpl.java index bd31db03230..cef6c62a46c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/YarnClusterMetricsPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/YarnClusterMetricsPBImpl.java @@ -19,12 +19,14 @@ package org.apache.hadoop.yarn.api.records.impl.pb; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.api.records.YarnClusterMetrics; import org.apache.hadoop.yarn.proto.YarnProtos.YarnClusterMetricsProto; import org.apache.hadoop.yarn.proto.YarnProtos.YarnClusterMetricsProtoOrBuilder; - - +@Private +@Unstable public class YarnClusterMetricsPBImpl extends YarnClusterMetrics { YarnClusterMetricsProto proto = YarnClusterMetricsProto.getDefaultInstance(); YarnClusterMetricsProto.Builder builder = null; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/package-info.java b/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 00000000000..b6db5403f0d --- /dev/null +++ b/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 a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 8a15328840d..729a1746748 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -23,6 +23,8 @@ import java.net.InetSocketAddress; import java.net.UnknownHostException; import java.util.Arrays; +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Evolving; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.net.NetUtils; import org.apache.hadoop.util.StringUtils; @@ -30,6 +32,8 @@ import org.apache.hadoop.yarn.api.ApplicationConstants; import com.google.common.base.Joiner; +@Public +@Evolving public class YarnConfiguration extends Configuration { private static final Joiner JOINER = Joiner.on(""); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/package-info.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/package-info.java new file mode 100644 index 00000000000..ca0aa31426b --- /dev/null +++ b/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 a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/YarnException.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/YarnException.java index 54b67975168..c1e2b8de545 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/YarnException.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/YarnException.java @@ -18,6 +18,15 @@ package org.apache.hadoop.yarn.exceptions; +import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.hadoop.classification.InterfaceStability.Stable; + +/** + * YarnException indicates exceptions from yarn servers. On the other hand, + * IOExceptions indicates exceptions from RPC layer. + */ +@Public +@Stable public class YarnException extends Exception { private static final long serialVersionUID = 1L; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/YarnRuntimeException.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/YarnRuntimeException.java index 968d7bf85c3..6f8c6ed4905 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/YarnRuntimeException.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/YarnRuntimeException.java @@ -18,12 +18,17 @@ package org.apache.hadoop.yarn.exceptions; +import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate; +import org.apache.hadoop.classification.InterfaceStability.Unstable; + /** Base Yarn Exception. * * NOTE: All derivatives of this exception, which may be thrown by a remote * service, must include a String only constructor for the exception to be * unwrapped on the client. */ +@LimitedPrivate({ "MapReduce", "YARN" }) +@Unstable public class YarnRuntimeException extends RuntimeException { private static final long serialVersionUID = -7153142425412203936L; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/package-info.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/package-info.java index db3d75a80b2..89b73f0578d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/package-info.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/exceptions/package-info.java @@ -15,6 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@InterfaceAudience.Private +@InterfaceAudience.Public package org.apache.hadoop.yarn.exceptions; -import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceAudience; \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/RecordFactory.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/RecordFactory.java index 219502d36ff..bd95c6ba372 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/RecordFactory.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/RecordFactory.java @@ -18,8 +18,11 @@ package org.apache.hadoop.yarn.factories; +import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate; +import org.apache.hadoop.classification.InterfaceStability.Unstable; - +@LimitedPrivate({ "MapReduce", "YARN" }) +@Unstable public interface RecordFactory { public T newRecordInstance(Class clazz); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/package-info.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/package-info.java new file mode 100644 index 00000000000..66bf20f3c8a --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/package-info.java @@ -0,0 +1,20 @@ +/* + * 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; \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java index e04104c4cee..cbd6593b46c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java @@ -21,11 +21,15 @@ package org.apache.hadoop.yarn.factory.providers; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.conf.YarnConfiguration; import org.apache.hadoop.yarn.exceptions.YarnRuntimeException; import org.apache.hadoop.yarn.factories.RecordFactory; +@LimitedPrivate({ "MapReduce", "YARN" }) +@Unstable public class RecordFactoryProvider { private static Configuration defaultConf; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factory/providers/package-info.java b/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 00000000000..4f397f3987a --- /dev/null +++ b/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 a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/ProtoUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/ProtoUtils.java index bc8b04c66c2..b283bacb10a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/ProtoUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/ProtoUtils.java @@ -21,6 +21,8 @@ package org.apache.hadoop.yarn.util; import java.net.InetSocketAddress; import java.nio.ByteBuffer; +import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.io.Text; import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.security.token.Token; @@ -54,6 +56,8 @@ import org.apache.hadoop.yarn.proto.YarnProtos.YarnApplicationStateProto; import com.google.protobuf.ByteString; +@Private +@Unstable public class ProtoUtils { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/Records.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/Records.java index 60711fd6677..056729f4469 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/Records.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/Records.java @@ -17,12 +17,16 @@ */ package org.apache.hadoop.yarn.util; +import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate; +import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.yarn.factories.RecordFactory; import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider; /** * Convenient API record utils */ +@LimitedPrivate({ "MapReduce", "YARN" }) +@Unstable public class Records { // The default record factory private static final RecordFactory factory = diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/AMRMClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/AMRMClient.java index 7700d6cbdff..373cbb35d2b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/AMRMClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/AMRMClient.java @@ -53,7 +53,7 @@ public abstract class AMRMClient extends * AMRMClient.createAMRMClientContainerRequest(appAttemptId) * } * @param appAttemptId the appAttemptId associated with the AMRMClient - * @return the newly create AMRMClient instance. + * @return the newly created AMRMClient instance. */ @Public public static AMRMClient createAMRMClient(