MAPREDUCE-3371. Review and improve the yarn-api javadocs. (Ravi Prakash via mahadev) - Merging r1206899 from trunk.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1206909 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
77b7c94aa0
commit
f0c0a094ff
|
@ -53,6 +53,9 @@ Release 0.23.1 - Unreleased
|
||||||
MAPREDUCE-3411. Performance Upgrade for jQuery (Jonathan Eagles via
|
MAPREDUCE-3411. Performance Upgrade for jQuery (Jonathan Eagles via
|
||||||
mahadev)
|
mahadev)
|
||||||
|
|
||||||
|
MAPREDUCE-3371. Review and improve the yarn-api javadocs. (Ravi Prakash
|
||||||
|
via mahadev)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -91,8 +91,8 @@ public interface AMRMProtocol {
|
||||||
*
|
*
|
||||||
* <p>This also doubles up as a <em>heartbeat</em> to let the
|
* <p>This also doubles up as a <em>heartbeat</em> to let the
|
||||||
* <code>ResourceManager</code> know that the <code>ApplicationMaster</code>
|
* <code>ResourceManager</code> know that the <code>ApplicationMaster</code>
|
||||||
* is alive. Thus, applications should use periodically make this call to
|
* is alive. Thus, applications should periodically make this call to be kept
|
||||||
* be kept alive.</p>
|
* alive. The frequency depends on ??</p>
|
||||||
*
|
*
|
||||||
* <p>The <code>ResourceManager</code> responds with list of allocated
|
* <p>The <code>ResourceManager</code> responds with list of allocated
|
||||||
* {@link Container}, status of completed containers and headroom information
|
* {@link Container}, status of completed containers and headroom information
|
||||||
|
|
|
@ -68,7 +68,8 @@ public interface ClientRMProtocol {
|
||||||
* {@link GetNewApplicationResponse}.</p>
|
* {@link GetNewApplicationResponse}.</p>
|
||||||
*
|
*
|
||||||
* @param request request to get a new <code>ApplicationId</code>
|
* @param request request to get a new <code>ApplicationId</code>
|
||||||
* @return new <code>ApplicationId</code> to be used to submit an application
|
* @return response containing the new <code>ApplicationId</code> to be used
|
||||||
|
* to submit an application
|
||||||
* @throws YarnRemoteException
|
* @throws YarnRemoteException
|
||||||
* @see #submitApplication(SubmitApplicationRequest)
|
* @see #submitApplication(SubmitApplicationRequest)
|
||||||
*/
|
*/
|
||||||
|
@ -216,7 +217,7 @@ public interface ClientRMProtocol {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The interface used by clients to get information about <em>queue
|
* <p>The interface used by clients to get information about <em>queue
|
||||||
* acls</em> for <em>current users</em> from the <code>ResourceManager</code>.
|
* acls</em> for <em>current user</em> from the <code>ResourceManager</code>.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>The <code>ResourceManager</code> responds with queue acls for all
|
* <p>The <code>ResourceManager</code> responds with queue acls for all
|
||||||
|
|
|
@ -79,7 +79,7 @@ public interface ContainerManager {
|
||||||
* to <em>stop</em> a {@link Container} allocated to it using this interface.
|
* to <em>stop</em> a {@link Container} allocated to it using this interface.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>The <code>ApplicationMaster</code></p> sends a
|
* <p>The <code>ApplicationMaster</code> sends a
|
||||||
* {@link StopContainerRequest} which includes the {@link ContainerId} of the
|
* {@link StopContainerRequest} which includes the {@link ContainerId} of the
|
||||||
* container to be stopped.</p>
|
* container to be stopped.</p>
|
||||||
*
|
*
|
||||||
|
@ -105,8 +105,8 @@ public interface ContainerManager {
|
||||||
* current status of a <code>Container</code> from the
|
* current status of a <code>Container</code> from the
|
||||||
* <code>NodeManager</code>.</p>
|
* <code>NodeManager</code>.</p>
|
||||||
*
|
*
|
||||||
* <p>The <code>ApplicationMaster</code></p> sends a
|
* <p>The <code>ApplicationMaster</code> sends a
|
||||||
* {@link GetContainerStatusRequest} which includes the {@link ContainerId} of
|
* {@link GetContainerStatusRequest} which includes the {@link ContainerId} of
|
||||||
* the container whose status is needed.</p>
|
* the container whose status is needed.</p>
|
||||||
*
|
*
|
||||||
*<p>The <code>NodeManager</code> responds with
|
*<p>The <code>NodeManager</code> responds with
|
||||||
|
@ -115,7 +115,8 @@ public interface ContainerManager {
|
||||||
*
|
*
|
||||||
* @param request request to get <code>ContainerStatus</code> of a container
|
* @param request request to get <code>ContainerStatus</code> of a container
|
||||||
* with the specified <code>ContainerId</code>
|
* with the specified <code>ContainerId</code>
|
||||||
* @return <code>ContainerStatus</code> of the container
|
* @return response containing the <code>ContainerStatus</code> of the
|
||||||
|
* container
|
||||||
* @throws YarnRemoteException
|
* @throws YarnRemoteException
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
|
|
@ -50,7 +50,6 @@ import org.apache.hadoop.yarn.api.records.ResourceRequest;
|
||||||
* <li>
|
* <li>
|
||||||
* A list of unused {@link Container} which are being returned.
|
* A list of unused {@link Container} which are being returned.
|
||||||
* </li>
|
* </li>
|
||||||
* <li></li>
|
|
||||||
* </ul>
|
* </ul>
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
|
@ -81,7 +80,7 @@ public interface AllocateRequest {
|
||||||
void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId);
|
void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the <em>response id</em>.
|
* Get the <em>response id</em> used to track duplicate responses.
|
||||||
* @return <em>response id</em>
|
* @return <em>response id</em>
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
@ -89,7 +88,7 @@ public interface AllocateRequest {
|
||||||
int getResponseId();
|
int getResponseId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the <em>response id</em>
|
* Set the <em>response id</em> used to track duplicate responses.
|
||||||
* @param id <em>response id</em>
|
* @param id <em>response id</em>
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
@ -113,7 +112,7 @@ public interface AllocateRequest {
|
||||||
void setProgress(float progress);
|
void setProgress(float progress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list of <code>ResourceRequest</code> to upate the
|
* Get the list of <code>ResourceRequest</code> to update the
|
||||||
* <code>ResourceManager</code> about the application's resource requirements.
|
* <code>ResourceManager</code> about the application's resource requirements.
|
||||||
* @return the list of <code>ResourceRequest</code>
|
* @return the list of <code>ResourceRequest</code>
|
||||||
*/
|
*/
|
||||||
|
@ -130,9 +129,9 @@ public interface AllocateRequest {
|
||||||
int getAskCount();
|
int getAskCount();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add list of <code>ResourceRequest</code> to upate the
|
* Add list of <code>ResourceRequest</code> to update the
|
||||||
* <code>ResourceManager</code> about the application's resource requirements.
|
* <code>ResourceManager</code> about the application's resource requirements.
|
||||||
* @param resourceRequest list of <code>ResourceRequest</code> to upate the
|
* @param resourceRequest list of <code>ResourceRequest</code> to update the
|
||||||
* <code>ResourceManager</code> about the application's
|
* <code>ResourceManager</code> about the application's
|
||||||
* resource requirements
|
* resource requirements
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.apache.hadoop.yarn.api.records.Container;
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Response ID to track duplicate responses.</li>
|
* <li>Response ID to track duplicate responses.</li>
|
||||||
* <li>
|
* <li>
|
||||||
* A reboot flag to let the <code>ApplicationMaster</code> that its
|
* A reboot flag to let the <code>ApplicationMaster</code> know that its
|
||||||
* horribly out of sync and needs to reboot.</li>
|
* horribly out of sync and needs to reboot.</li>
|
||||||
* <li>A list of newly allocated {@link Container}.</li>
|
* <li>A list of newly allocated {@link Container}.</li>
|
||||||
* <li>A list of completed {@link Container}.</li>
|
* <li>A list of completed {@link Container}.</li>
|
||||||
|
|
|
@ -26,6 +26,8 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
* <p>The request from clients to get a report of all Applications
|
* <p>The request from clients to get a report of all Applications
|
||||||
* in the cluster from the <code>ResourceManager</code>.</p>
|
* in the cluster from the <code>ResourceManager</code>.</p>
|
||||||
*
|
*
|
||||||
|
* <p>Currently, this is empty.</p>
|
||||||
|
*
|
||||||
* @see ClientRMProtocol#getAllApplications(GetAllApplicationsRequest)
|
* @see ClientRMProtocol#getAllApplications(GetAllApplicationsRequest)
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
|
|
@ -25,6 +25,8 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
/**
|
/**
|
||||||
* <p>The request sent by clients to get cluster metrics from the
|
* <p>The request sent by clients to get cluster metrics from the
|
||||||
* <code>ResourceManager</code>.</p>
|
* <code>ResourceManager</code>.</p>
|
||||||
|
*
|
||||||
|
* <p>Currently, this is empty.</p>
|
||||||
*
|
*
|
||||||
* @see ClientRMProtocol#getClusterMetrics(GetClusterMetricsRequest)
|
* @see ClientRMProtocol#getClusterMetrics(GetClusterMetricsRequest)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,6 +26,8 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
* <p>The request from clients to get a report of all nodes
|
* <p>The request from clients to get a report of all nodes
|
||||||
* in the cluster from the <code>ResourceManager</code>.</p>
|
* in the cluster from the <code>ResourceManager</code>.</p>
|
||||||
*
|
*
|
||||||
|
* <p>Currently, this is empty.</p>
|
||||||
|
*
|
||||||
* @see ClientRMProtocol#getClusterNodes(GetClusterNodesRequest)
|
* @see ClientRMProtocol#getClusterNodes(GetClusterNodesRequest)
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
|
|
@ -29,7 +29,7 @@ import org.apache.hadoop.yarn.api.records.NodeReport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The response sent by the <code>ResourceManager</code> to a client
|
* <p>The response sent by the <code>ResourceManager</code> to a client
|
||||||
* requesting an {@link NodeReport} for all nodes.</p>
|
* requesting a {@link NodeReport} for all nodes.</p>
|
||||||
*
|
*
|
||||||
* <p>The <code>NodeReport</code> contains per-node information such as
|
* <p>The <code>NodeReport</code> contains per-node information such as
|
||||||
* available resources, number of containers, tracking url, rack name, health
|
* available resources, number of containers, tracking url, rack name, health
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.hadoop.yarn.api.records.ContainerStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The response sent by the <code>NodeManager</code> to the
|
* <p>The response sent by the <code>NodeManager</code> to the
|
||||||
* <code>ApplicationMaster</code> when asked to obtainer <em>status</em>
|
* <code>ApplicationMaster</code> when asked to obtain the <em>status</em>
|
||||||
* of a container.</p>
|
* of a container.</p>
|
||||||
*
|
*
|
||||||
* @see ContainerManager#getContainerStatus(GetContainerStatusRequest)
|
* @see ContainerManager#getContainerStatus(GetContainerStatusRequest)
|
||||||
|
|
|
@ -27,6 +27,8 @@ import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
* <p>The request sent by clients to get a new {@link ApplicationId} for
|
* <p>The request sent by clients to get a new {@link ApplicationId} for
|
||||||
* submitting an application.</p>
|
* submitting an application.</p>
|
||||||
*
|
*
|
||||||
|
* <p>Currently, this is empty.</p>
|
||||||
|
*
|
||||||
* @see ClientRMProtocol#getNewApplication(GetNewApplicationRequest)
|
* @see ClientRMProtocol#getNewApplication(GetNewApplicationRequest)
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
|
|
@ -28,7 +28,7 @@ import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The response sent by the <code>ResourceManager</code> to the client for
|
* <p>The response sent by the <code>ResourceManager</code> to the client for
|
||||||
* a request to a new {@link ApplicationId} for submitting applications.</p>
|
* a request to get a new {@link ApplicationId} for submitting applications.</p>
|
||||||
*
|
*
|
||||||
* @see ClientRMProtocol#getNewApplication(GetNewApplicationRequest)
|
* @see ClientRMProtocol#getNewApplication(GetNewApplicationRequest)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,6 +26,8 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
* <p>The request sent by clients to the <code>ResourceManager</code> to
|
* <p>The request sent by clients to the <code>ResourceManager</code> to
|
||||||
* get queue acls for the <em>current user</em>.</p>
|
* get queue acls for the <em>current user</em>.</p>
|
||||||
*
|
*
|
||||||
|
* <p>Currently, this is empty.</p>
|
||||||
|
*
|
||||||
* @see ClientRMProtocol#getQueueUserAcls(GetQueueUserAclsInfoRequest)
|
* @see ClientRMProtocol#getQueueUserAcls(GetQueueUserAclsInfoRequest)
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
|
|
@ -35,11 +35,53 @@ import org.apache.hadoop.yarn.api.ContainerManager;
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
public interface StartContainerResponse {
|
public interface StartContainerResponse {
|
||||||
|
/**
|
||||||
|
* <p>Get the responses from all auxiliary services running on the
|
||||||
|
* <code>NodeManager</code>.</p>
|
||||||
|
* <p>The responses are returned as a Map between the auxiliary service names
|
||||||
|
* and their corresponding opaque blob <code>ByteBuffer</code>s</p>
|
||||||
|
* @return a Map between the auxiliary service names and their outputs
|
||||||
|
*/
|
||||||
Map<String, ByteBuffer> getAllServiceResponse();
|
Map<String, ByteBuffer> getAllServiceResponse();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the response from a single auxiliary service running on the
|
||||||
|
* <code>NodeManager</code>
|
||||||
|
*
|
||||||
|
* @param key The auxiliary service name whose response is desired.
|
||||||
|
* @return The opaque blob <code>ByteBuffer</code> returned by the auxiliary
|
||||||
|
* service.
|
||||||
|
*/
|
||||||
ByteBuffer getServiceResponse(String key);
|
ByteBuffer getServiceResponse(String key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add to the list of auxiliary services which have been started on the
|
||||||
|
* <code>NodeManager</code>. This is done only once when the
|
||||||
|
* <code>NodeManager</code> starts up
|
||||||
|
* @param serviceResponse A map from auxiliary service names to the opaque
|
||||||
|
* blob <code>ByteBuffer</code>s for that auxiliary service
|
||||||
|
*/
|
||||||
void addAllServiceResponse(Map<String, ByteBuffer> serviceResponse);
|
void addAllServiceResponse(Map<String, ByteBuffer> serviceResponse);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add to the list of auxiliary services which have been started on the
|
||||||
|
* <code>NodeManager</code>. This is done only once when the
|
||||||
|
* <code>NodeManager</code> starts up
|
||||||
|
*
|
||||||
|
* @param key The auxiliary service name
|
||||||
|
* @param value The opaque blob <code>ByteBuffer</code> managed by the
|
||||||
|
* auxiliary service
|
||||||
|
*/
|
||||||
void setServiceResponse(String key, ByteBuffer value);
|
void setServiceResponse(String key, ByteBuffer value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a single auxiliary service from the StartContainerResponse object
|
||||||
|
* @param key The auxiliary service to remove
|
||||||
|
*/
|
||||||
void removeServiceResponse(String key);
|
void removeServiceResponse(String key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove all the auxiliary services from the StartContainerResponse object
|
||||||
|
*/
|
||||||
void clearServiceResponse();
|
void clearServiceResponse();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,8 @@ import org.apache.hadoop.yarn.api.ContainerManager;
|
||||||
* <code>ApplicationMaster</code> when asked to <em>stop</em> an
|
* <code>ApplicationMaster</code> when asked to <em>stop</em> an
|
||||||
* allocated container.</p>
|
* allocated container.</p>
|
||||||
*
|
*
|
||||||
|
* <p>Currently, this is empty.</p>
|
||||||
|
*
|
||||||
* @see ContainerManager#stopContainer(StopContainerRequest)
|
* @see ContainerManager#stopContainer(StopContainerRequest)
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
|
|
@ -26,6 +26,8 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
* <p>The response sent by the <code>ResourceManager</code> to a client on
|
* <p>The response sent by the <code>ResourceManager</code> to a client on
|
||||||
* application submission.</p>
|
* application submission.</p>
|
||||||
*
|
*
|
||||||
|
* <p>Currently, this is empty.</p>
|
||||||
|
*
|
||||||
* @see ClientRMProtocol#submitApplication(SubmitApplicationRequest)
|
* @see ClientRMProtocol#submitApplication(SubmitApplicationRequest)
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
|
|
@ -35,7 +35,7 @@ import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Response ID to track duplicate responses.</li>
|
* <li>Response ID to track duplicate responses.</li>
|
||||||
* <li>
|
* <li>
|
||||||
* A reboot flag to let the <code>ApplicationMaster</code> that its
|
* A reboot flag to let the <code>ApplicationMaster</code> know that its
|
||||||
* horribly out of sync and needs to reboot.</li>
|
* horribly out of sync and needs to reboot.</li>
|
||||||
* <li>A list of newly allocated {@link Container}.</li>
|
* <li>A list of newly allocated {@link Container}.</li>
|
||||||
* <li>A list of completed {@link Container}.</li>
|
* <li>A list of completed {@link Container}.</li>
|
||||||
|
@ -100,7 +100,7 @@ public interface AMResponse {
|
||||||
/**
|
/**
|
||||||
* Get the <em>available headroom</em> for resources in the cluster for the
|
* Get the <em>available headroom</em> for resources in the cluster for the
|
||||||
* application.
|
* application.
|
||||||
* @return limit available headroom for resources in the cluster for the
|
* @return limit of available headroom for resources in the cluster for the
|
||||||
* application
|
* application
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
|
|
@ -33,7 +33,7 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
* <li>Applications user.</li>
|
* <li>Applications user.</li>
|
||||||
* <li>Application queue.</li>
|
* <li>Application queue.</li>
|
||||||
* <li>Application name.</li>
|
* <li>Application name.</li>
|
||||||
* <li>Host on which the <code>ApplicationMaster</code>is running.</li>
|
* <li>Host on which the <code>ApplicationMaster</code> is running.</li>
|
||||||
* <li>RPC port of the <code>ApplicationMaster</code>.</li>
|
* <li>RPC port of the <code>ApplicationMaster</code>.</li>
|
||||||
* <li>Tracking URL.</li>
|
* <li>Tracking URL.</li>
|
||||||
* <li>{@link YarnApplicationState} of the application.</li>
|
* <li>{@link YarnApplicationState} of the application.</li>
|
||||||
|
@ -215,6 +215,7 @@ public interface ApplicationReport {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the <em>final finish status</em> of the application.
|
* Get the <em>final finish status</em> of the application.
|
||||||
|
* @return <em>final finish status</em> of the application
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
|
|
|
@ -33,22 +33,43 @@ import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
public interface ApplicationResourceUsageReport {
|
public interface ApplicationResourceUsageReport {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of used containers
|
||||||
|
* @return the number of used containers
|
||||||
|
*/
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
int getNumUsedContainers();
|
int getNumUsedContainers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the number of used containers
|
||||||
|
* @param num_containers the number of used containers
|
||||||
|
*/
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
void setNumUsedContainers(int num_containers);
|
void setNumUsedContainers(int num_containers);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of reserved containers
|
||||||
|
* @return the number of reserved containers
|
||||||
|
*/
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
int getNumReservedContainers();
|
int getNumReservedContainers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the number of reserved containers
|
||||||
|
* @param num_reserved_containers the number of reserved containers
|
||||||
|
*/
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
void setNumReservedContainers(int num_reserved_containers);
|
void setNumReservedContainers(int num_reserved_containers);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the used <code>Resource</code>
|
||||||
|
* @return the used <code>Resource</code>
|
||||||
|
*/
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
Resource getUsedResources();
|
Resource getUsedResources();
|
||||||
|
@ -57,6 +78,10 @@ public interface ApplicationResourceUsageReport {
|
||||||
@Unstable
|
@Unstable
|
||||||
void setUsedResources(Resource resources);
|
void setUsedResources(Resource resources);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the reserved <code>Resource</code>
|
||||||
|
* @return the reserved <code>Resource</code>
|
||||||
|
*/
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
Resource getReservedResources();
|
Resource getReservedResources();
|
||||||
|
@ -65,6 +90,10 @@ public interface ApplicationResourceUsageReport {
|
||||||
@Unstable
|
@Unstable
|
||||||
void setReservedResources(Resource reserved_resources);
|
void setReservedResources(Resource reserved_resources);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the needed <code>Resource</code>
|
||||||
|
* @return the needed <code>Resource</code>
|
||||||
|
*/
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
Resource getNeededResources();
|
Resource getNeededResources();
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p><code>ApplicationSubmissionContext</code> represents the all of the
|
* <p><code>ApplicationSubmissionContext</code> represents all of the
|
||||||
* information needed by the <code>ResourceManager</code> to launch
|
* information needed by the <code>ResourceManager</code> to launch
|
||||||
* the <code>ApplicationMaster</code> for an application.</p>
|
* the <code>ApplicationMaster</code> for an application.</p>
|
||||||
*
|
*
|
||||||
|
|
|
@ -38,8 +38,7 @@ import org.apache.hadoop.yarn.api.ContainerManager;
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@link ContainerId} for the container, which is globally unique.</li>
|
* <li>{@link ContainerId} for the container, which is globally unique.</li>
|
||||||
* <li>
|
* <li>
|
||||||
* {@link NodeId} of the node on which identifies the node on which it
|
* {@link NodeId} of the node on which it is allocated.
|
||||||
* is allocated.
|
|
||||||
* </li>
|
* </li>
|
||||||
* <li>HTTP uri of the node.</li>
|
* <li>HTTP uri of the node.</li>
|
||||||
* <li>{@link Resource} allocated to the container.</li>
|
* <li>{@link Resource} allocated to the container.</li>
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.hadoop.classification.InterfaceStability.Stable;
|
||||||
import org.apache.hadoop.yarn.api.ContainerManager;
|
import org.apache.hadoop.yarn.api.ContainerManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p><code>ContainerLaunchContext</code> represents the all of the information
|
* <p><code>ContainerLaunchContext</code> represents all of the information
|
||||||
* needed by the <code>NodeManager</code> to launch a container.</p>
|
* needed by the <code>NodeManager</code> to launch a container.</p>
|
||||||
*
|
*
|
||||||
* <p>It includes details such as:
|
* <p>It includes details such as:
|
||||||
|
@ -127,7 +127,8 @@ public interface ContainerLaunchContext {
|
||||||
Map<String, LocalResource> getLocalResources();
|
Map<String, LocalResource> getLocalResources();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set <code>LocalResource</code> required by the container.
|
* Set <code>LocalResource</code> required by the container. All pre-existing
|
||||||
|
* Map entries are cleared before adding the new Map
|
||||||
* @param localResources <code>LocalResource</code> required by the container
|
* @param localResources <code>LocalResource</code> required by the container
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
@ -143,7 +144,8 @@ public interface ContainerLaunchContext {
|
||||||
Map<String, ByteBuffer> getServiceData();
|
Map<String, ByteBuffer> getServiceData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set application-specific binary <em>service data</em>.
|
* Set application-specific binary <em>service data</em>. All pre-existing Map
|
||||||
|
* entries are preserved.
|
||||||
* @param serviceData application-specific binary <em>service data</em>
|
* @param serviceData application-specific binary <em>service data</em>
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
@ -159,7 +161,8 @@ public interface ContainerLaunchContext {
|
||||||
Map<String, String> getEnvironment();
|
Map<String, String> getEnvironment();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add <em>environment variables</em> for the container.
|
* Add <em>environment variables</em> for the container. All pre-existing Map
|
||||||
|
* entries are cleared before adding the new Map
|
||||||
* @param environment <em>environment variables</em> for the container
|
* @param environment <em>environment variables</em> for the container
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
@ -175,7 +178,8 @@ public interface ContainerLaunchContext {
|
||||||
List<String> getCommands();
|
List<String> getCommands();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the list of <em>commands</em> for launching the container.
|
* Add the list of <em>commands</em> for launching the container. All
|
||||||
|
* pre-existing List entries are cleared before adding the new List
|
||||||
* @param commands the list of <em>commands</em> for launching the container
|
* @param commands the list of <em>commands</em> for launching the container
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
|
@ -191,8 +195,9 @@ public interface ContainerLaunchContext {
|
||||||
public Map<ApplicationAccessType, String> getApplicationACLs();
|
public Map<ApplicationAccessType, String> getApplicationACLs();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the <code>ApplicationACL</code>s for the application.
|
* Set the <code>ApplicationACL</code>s for the application. All pre-existing
|
||||||
* @param acls
|
* Map entries are cleared before adding the new Map
|
||||||
|
* @param acls <code>ApplicationACL</code>s for the application
|
||||||
*/
|
*/
|
||||||
@Public
|
@Public
|
||||||
@Stable
|
@Stable
|
||||||
|
|
|
@ -35,8 +35,6 @@ import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
* </li>
|
* </li>
|
||||||
* <li>The previous time at which the health status was reported.</li>
|
* <li>The previous time at which the health status was reported.</li>
|
||||||
* <li>A diagnostic report on the health status.</li>
|
* <li>A diagnostic report on the health status.</li>
|
||||||
* <li></li>
|
|
||||||
* <li></li>
|
|
||||||
* </ul>
|
* </ul>
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,10 +18,23 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.api.records;
|
package org.apache.hadoop.yarn.api.records;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The priority assigned to a ResourceRequest or Application or Container
|
||||||
|
* allocation
|
||||||
|
*
|
||||||
|
*/
|
||||||
public interface Priority extends Comparable<Priority> {
|
public interface Priority extends Comparable<Priority> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the assigned priority
|
||||||
|
* @return the assigned priority
|
||||||
|
*/
|
||||||
public abstract int getPriority();
|
public abstract int getPriority();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the assigned priority
|
||||||
|
* @param priority the assigned priority
|
||||||
|
*/
|
||||||
public abstract void setPriority(int priority);
|
public abstract void setPriority(int priority);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>QueueInfo</p> is a report of the runtime information of the queue.</p>
|
* <p>QueueInfo is a report of the runtime information of the queue.</p>
|
||||||
*
|
*
|
||||||
* <p>It includes information such as:
|
* <p>It includes information such as:
|
||||||
* <ul>
|
* <ul>
|
||||||
|
|
|
@ -93,7 +93,7 @@ import org.apache.hadoop.yarn.util.Records;
|
||||||
* to inform the <code>ResourceManager</code> that it is up and alive. The {@link AMRMProtocol#allocate} to the
|
* to inform the <code>ResourceManager</code> that it is up and alive. The {@link AMRMProtocol#allocate} to the
|
||||||
* <code>ResourceManager</code> from the <code>ApplicationMaster</code> acts as a heartbeat.
|
* <code>ResourceManager</code> from the <code>ApplicationMaster</code> acts as a heartbeat.
|
||||||
*
|
*
|
||||||
* <p> For the actual handling of the job, the <code>ApplicationMaster</code> has to request for the
|
* <p> For the actual handling of the job, the <code>ApplicationMaster</code> has to request the
|
||||||
* <code>ResourceManager</code> via {@link AllocateRequest} for the required no. of containers using {@link ResourceRequest}
|
* <code>ResourceManager</code> via {@link AllocateRequest} for the required no. of containers using {@link ResourceRequest}
|
||||||
* with the necessary resource specifications such as node location, computational (memory/disk/cpu) resource requirements.
|
* with the necessary resource specifications such as node location, computational (memory/disk/cpu) resource requirements.
|
||||||
* The <code>ResourceManager</code> responds with an {@link AllocateResponse} that informs the <code>ApplicationMaster</code>
|
* The <code>ResourceManager</code> responds with an {@link AllocateResponse} that informs the <code>ApplicationMaster</code>
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class AuxServices extends AbstractService
|
||||||
/**
|
/**
|
||||||
* @return the meta data for all registered services, that have been started.
|
* @return the meta data for all registered services, that have been started.
|
||||||
* If a service has not been started no metadata will be available. The key
|
* If a service has not been started no metadata will be available. The key
|
||||||
* the the name of the service as defined in the configuration.
|
* is the name of the service as defined in the configuration.
|
||||||
*/
|
*/
|
||||||
public Map<String, ByteBuffer> getMeta() {
|
public Map<String, ByteBuffer> getMeta() {
|
||||||
Map<String, ByteBuffer> metaClone = new HashMap<String, ByteBuffer>(
|
Map<String, ByteBuffer> metaClone = new HashMap<String, ByteBuffer>(
|
||||||
|
|
Loading…
Reference in New Issue