@InterfaceAudience.Private @InterfaceStability.Unstable public class YarnClientImpl extends YarnClient
| Modifier and Type | Field and Description | 
|---|---|
| protected AHSClient | historyClient | 
| protected org.apache.hadoop.yarn.api.ApplicationClientProtocol | rmClient | 
| protected long | submitPollIntervalMillis | 
| protected org.apache.hadoop.yarn.client.api.TimelineClient | timelineClient | 
| protected boolean | timelineServiceBestEffort | 
| Constructor and Description | 
|---|
| YarnClientImpl() | 
| Modifier and Type | Method and Description | 
|---|---|
| YarnClientApplication | createApplication()
 Obtain a  YarnClientApplicationfor a new application,
 which in turn contains theApplicationSubmissionContextandGetNewApplicationResponseobjects. | 
| org.apache.hadoop.yarn.api.protocolrecords.GetNewReservationResponse | createReservation()
 Obtain a  GetNewReservationResponsefor a new reservation,
 which contains theReservationIdobject. | 
| org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse | deleteReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest request)
 The interface used by clients to remove an existing Reservation. | 
| void | failApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
 Fail an application attempt identified by given ID. | 
| List<org.apache.hadoop.yarn.api.records.QueueInfo> | getAllQueues()
 Get information ( QueueInfo) about all queues, recursively if there
 is a hierarchy | 
| org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> | getAMRMToken(org.apache.hadoop.yarn.api.records.ApplicationId appId)Get the AMRM token of the application. | 
| org.apache.hadoop.yarn.api.records.ApplicationAttemptReport | getApplicationAttemptReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
 Get a report of the given ApplicationAttempt. | 
| List<org.apache.hadoop.yarn.api.records.ApplicationAttemptReport> | getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId)
 Get a report of all (ApplicationAttempts) of Application in the cluster. | 
| org.apache.hadoop.yarn.api.records.ApplicationReport | getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId)
 Get a report of the given Application. | 
| List<org.apache.hadoop.yarn.api.records.ApplicationReport> | getApplications()
 Get a report (ApplicationReport) of all Applications in the cluster. | 
| List<org.apache.hadoop.yarn.api.records.ApplicationReport> | getApplications(EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates)
 Get a report (ApplicationReport) of Applications matching the given
 application states in the cluster. | 
| List<org.apache.hadoop.yarn.api.records.ApplicationReport> | getApplications(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest request)
 Get a list of ApplicationReports that match the given
  GetApplicationsRequest. | 
| List<org.apache.hadoop.yarn.api.records.ApplicationReport> | getApplications(Set<String> applicationTypes)
 Get a report (ApplicationReport) of Applications
 matching the given application types in the cluster. | 
| List<org.apache.hadoop.yarn.api.records.ApplicationReport> | getApplications(Set<String> applicationTypes,
               EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates)
 Get a report (ApplicationReport) of Applications matching the given
 application types and application states in the cluster. | 
| List<org.apache.hadoop.yarn.api.records.ApplicationReport> | getApplications(Set<String> applicationTypes,
               EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates,
               Set<String> applicationTags)
 Get a report (ApplicationReport) of Applications matching the given
 application types, application states and application tags in the cluster. | 
| List<org.apache.hadoop.yarn.api.records.ApplicationReport> | getApplications(Set<String> queues,
               Set<String> users,
               Set<String> applicationTypes,
               EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates)
 Get a report (ApplicationReport) of Applications matching the given users,
 queues, application types and application states in the cluster. | 
| List<org.apache.hadoop.yarn.api.records.QueueInfo> | getChildQueueInfos(String parent)
 Get information ( QueueInfo) about all the immediate children queues
 of the given queue | 
| List<org.apache.hadoop.yarn.api.records.NodeLabel> | getClusterNodeLabels()
 The interface used by client to get node labels in the cluster | 
| org.apache.hadoop.yarn.api.records.ContainerReport | getContainerReport(org.apache.hadoop.yarn.api.records.ContainerId containerId)
 Get a report of the given Container. | 
| List<org.apache.hadoop.yarn.api.records.ContainerReport> | getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
 Get a report of all (Containers) of ApplicationAttempt in the cluster. | 
| Map<String,Set<org.apache.hadoop.yarn.api.records.NodeId>> | getLabelsToNodes()
 The interface used by client to get labels to nodes mapping
 in existing cluster | 
| Map<String,Set<org.apache.hadoop.yarn.api.records.NodeId>> | getLabelsToNodes(Set<String> labels)
 The interface used by client to get labels to nodes mapping
 for specified labels in existing cluster | 
| List<org.apache.hadoop.yarn.api.records.NodeReport> | getNodeReports(org.apache.hadoop.yarn.api.records.NodeState... states)
 Get a report of nodes ( NodeReport) in the cluster. | 
| Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> | getNodeToLabels()
 The interface used by client to get node to labels mappings in existing cluster | 
| List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> | getQueueAclsInfo()
 Get information about acls for current user on all the
 existing queues. | 
| org.apache.hadoop.yarn.api.records.QueueInfo | getQueueInfo(String queueName)
 Get information ( QueueInfo) about a given queue. | 
| org.apache.hadoop.yarn.api.records.Resource | getResourceProfile(String profile)
 Get the details of a specific resource profile from the RM. | 
| Map<String,org.apache.hadoop.yarn.api.records.Resource> | getResourceProfiles()
 Get the resource profiles available in the RM. | 
| List<org.apache.hadoop.yarn.api.records.ResourceTypeInfo> | getResourceTypeInfo()
 Get available resource types supported by RM. | 
| org.apache.hadoop.yarn.api.records.Token | getRMDelegationToken(org.apache.hadoop.io.Text renewer)
 Get a delegation token so as to be able to talk to YARN using those tokens. | 
| List<org.apache.hadoop.yarn.api.records.QueueInfo> | getRootQueueInfos()
 Get information ( QueueInfo) about top level queues. | 
| org.apache.hadoop.yarn.api.records.YarnClusterMetrics | getYarnClusterMetrics()
 Get metrics ( YarnClusterMetrics) about the cluster. | 
| protected boolean | isSecurityEnabled() | 
| void | killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
 Kill an application identified by given ID. | 
| void | killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
               String diagnostics)
 Kill an application identified by given ID. | 
| org.apache.hadoop.yarn.api.protocolrecords.ReservationListResponse | listReservations(org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest request)
 The interface used by clients to get the list of reservations in a plan. | 
| void | moveApplicationAcrossQueues(org.apache.hadoop.yarn.api.records.ApplicationId appId,
                           String queue)
 Attempts to move the given application to the given queue. | 
| protected void | serviceInit(org.apache.hadoop.conf.Configuration conf) | 
| protected void | serviceStart() | 
| protected void | serviceStop() | 
| void | setRMClient(org.apache.hadoop.yarn.api.ApplicationClientProtocol rmClient) | 
| void | signalToContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                 org.apache.hadoop.yarn.api.records.SignalContainerCommand command)
 Signal a container identified by given ID. | 
| org.apache.hadoop.yarn.api.records.ApplicationId | submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appContext)
 Submit a new application to  YARN.It is a blocking call - it
 will not returnApplicationIduntil the submitted application is
 submitted successfully and accepted by the ResourceManager. | 
| org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse | submitReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest request)
 The interface used by clients to submit a new reservation to the
  ResourceManager. | 
| org.apache.hadoop.yarn.api.records.Priority | updateApplicationPriority(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                         org.apache.hadoop.yarn.api.records.Priority priority)
 The interface used by client to set priority of an application | 
| org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsResponse | updateApplicationTimeouts(org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsRequest request) | 
| org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse | updateReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest request)
 The interface used by clients to update an existing Reservation. | 
createYarnClientclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected org.apache.hadoop.yarn.api.ApplicationClientProtocol rmClient
protected long submitPollIntervalMillis
protected AHSClient historyClient
protected volatile org.apache.hadoop.yarn.client.api.TimelineClient timelineClient
protected boolean timelineServiceBestEffort
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
                    throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStart()
                     throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
                    throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionpublic YarnClientApplication createApplication() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClient
 Obtain a YarnClientApplication for a new application,
 which in turn contains the ApplicationSubmissionContext and
 GetNewApplicationResponse
 objects.
 
createApplication in class YarnClientYarnClientApplication built for a new applicationorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.records.ApplicationId submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appContext)
                                                                   throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                          IOException
YarnClient
 Submit a new application to YARN. It is a blocking call - it
 will not return ApplicationId until the submitted application is
 submitted successfully and accepted by the ResourceManager.
 
 Users should provide an ApplicationId as part of the parameter
 ApplicationSubmissionContext when submitting a new application,
 otherwise it will throw the ApplicationIdNotProvidedException.
 
This internally calls (SubmitApplicationRequest), and after that, it internally invokes
 (GetApplicationReportRequest) and waits till it can make sure that the
 application gets properly submitted. If RM fails over or RM restart
 happens before ResourceManager saves the application's state,
 #getApplicationReport(GetApplicationReportRequest) will throw
 the ApplicationNotFoundException. This API automatically resubmits
 the application with the same ApplicationSubmissionContext when it
 catches the ApplicationNotFoundException
submitApplication in class YarnClientappContext - ApplicationSubmissionContext containing all the details
          needed to submit a new applicationApplicationId of the accepted applicationorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionYarnClient.createApplication()@InterfaceAudience.Private protected boolean isSecurityEnabled()
public void failApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
                            throws org.apache.hadoop.yarn.exceptions.YarnException,
                                   IOException
YarnClientFail an application attempt identified by given ID.
failApplicationAttempt in class YarnClientattemptId - ApplicationAttemptId of the attempt to fail.org.apache.hadoop.yarn.exceptions.YarnException - in case of errors or if YARN rejects the request due to
           access-control restrictions.IOExceptionYarnClient.getQueueAclsInfo()public void killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
                     throws org.apache.hadoop.yarn.exceptions.YarnException,
                            IOException
YarnClientKill an application identified by given ID.
killApplication in class YarnClientapplicationId - ApplicationId of the application that needs to be killedorg.apache.hadoop.yarn.exceptions.YarnException - in case of errors or if YARN rejects the request due to
           access-control restrictions.IOExceptionYarnClient.getQueueAclsInfo()public void killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                            String diagnostics)
                     throws org.apache.hadoop.yarn.exceptions.YarnException,
                            IOException
YarnClientKill an application identified by given ID.
killApplication in class YarnClientapplicationId - ApplicationId of the application that needs to
          be killeddiagnostics - for killing an application.org.apache.hadoop.yarn.exceptions.YarnException - in case of errors or if YARN rejects the request due
           to access-control restrictions.IOExceptionpublic org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId)
                                                                          throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                 IOException
YarnClientGet a report of the given Application.
 In secure mode, YARN verifies access to the application, queue
 etc. before accepting the request.
 
 If the user does not have VIEW_APP access then the following
 fields in the report will be set to stubbed values:
 
getApplicationReport in class YarnClientappId - ApplicationId of the application that needs a reportorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> getAMRMToken(org.apache.hadoop.yarn.api.records.ApplicationId appId)
                                                                                                         throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                                                IOException
YarnClient
 The AMRM token is required for AM to RM scheduling operations. For 
 managed Application Masters YARN takes care of injecting it. For unmanaged
 Applications Masters, the token must be obtained via this method and set
 in the UserGroupInformation of the
 current user.
 
The AMRM token will be returned only if all the following conditions are met:
getAMRMToken in class YarnClientappId - ApplicationId of the application to get the AMRM tokenorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet a report (ApplicationReport) of all Applications in the cluster.
 If the user does not have VIEW_APP access for an application
 then the corresponding report will be filtered as described in
 YarnClient.getApplicationReport(ApplicationId).
 
getApplications in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(Set<String> applicationTypes) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet a report (ApplicationReport) of Applications matching the given application types in the cluster.
 If the user does not have VIEW_APP access for an application
 then the corresponding report will be filtered as described in
 YarnClient.getApplicationReport(ApplicationId).
 
getApplications in class YarnClientapplicationTypes - set of application types you are interested inorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet a report (ApplicationReport) of Applications matching the given application states in the cluster.
 If the user does not have VIEW_APP access for an application
 then the corresponding report will be filtered as described in
 YarnClient.getApplicationReport(ApplicationId).
 
getApplications in class YarnClientapplicationStates - set of application states you are interested inorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(Set<String> applicationTypes, EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet a report (ApplicationReport) of Applications matching the given application types and application states in the cluster.
 If the user does not have VIEW_APP access for an application
 then the corresponding report will be filtered as described in
 YarnClient.getApplicationReport(ApplicationId).
 
getApplications in class YarnClientapplicationTypes - set of application types you are interested inapplicationStates - set of application states you are interested inorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(Set<String> applicationTypes, EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates, Set<String> applicationTags) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet a report (ApplicationReport) of Applications matching the given application types, application states and application tags in the cluster.
 If the user does not have VIEW_APP access for an application
 then the corresponding report will be filtered as described in
 YarnClient.getApplicationReport(ApplicationId).
 
getApplications in class YarnClientapplicationTypes - set of application types you are interested inapplicationStates - set of application states you are interested inapplicationTags - set of application tags you are interested inorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(Set<String> queues, Set<String> users, Set<String> applicationTypes, EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet a report (ApplicationReport) of Applications matching the given users, queues, application types and application states in the cluster. If any of the params is set to null, it is not used when filtering.
 If the user does not have VIEW_APP access for an application
 then the corresponding report will be filtered as described in
 YarnClient.getApplicationReport(ApplicationId).
 
getApplications in class YarnClientqueues - set of queues you are interested inusers - set of users you are interested inapplicationTypes - set of application types you are interested inapplicationStates - set of application states you are interested inorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClient
 Get a list of ApplicationReports that match the given
 GetApplicationsRequest.
 If the user does not have VIEW_APP access for an application
 then the corresponding report will be filtered as described in
 YarnClient.getApplicationReport(ApplicationId).
 
getApplications in class YarnClientrequest - the request object to get the list of applications.org.apache.hadoop.yarn.exceptions.YarnException - Exception specific to YARN.IOException - Exception mostly related to connection errors.public org.apache.hadoop.yarn.api.records.YarnClusterMetrics getYarnClusterMetrics()
                                                                            throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                   IOException
YarnClient
 Get metrics (YarnClusterMetrics) about the cluster.
 
getYarnClusterMetrics in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.NodeReport> getNodeReports(org.apache.hadoop.yarn.api.records.NodeState... states) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClient
 Get a report of nodes (NodeReport) in the cluster.
 
getNodeReports in class YarnClientstates - The NodeStates to filter on. If no filter states are
          given, nodes in all states will be returned.org.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.records.Token getRMDelegationToken(org.apache.hadoop.io.Text renewer)
                                                              throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                     IOException
YarnClientGet a delegation token so as to be able to talk to YARN using those tokens.
getRMDelegationToken in class YarnClientrenewer - Address of the renewer who can renew these tokens when needed by
          securely talking to YARN.Token) that can be used to
         talk to YARNorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClient
 Get information (QueueInfo) about a given queue.
 
getQueueInfo in class YarnClientqueueName - Name of the queue whose information is neededorg.apache.hadoop.yarn.exceptions.YarnException - in case of errors or if YARN rejects the request due to
           access-control restrictions.IOExceptionpublic List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueAclsInfo() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet information about acls for current user on all the existing queues.
getQueueAclsInfo in class YarnClientQueueUserACLInfo) for
         current userorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.QueueInfo> getAllQueues() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClient
 Get information (QueueInfo) about all queues, recursively if there
 is a hierarchy
 
getAllQueues in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.QueueInfo> getRootQueueInfos() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClient
 Get information (QueueInfo) about top level queues.
 
getRootQueueInfos in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.QueueInfo> getChildQueueInfos(String parent) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClient
 Get information (QueueInfo) about all the immediate children queues
 of the given queue
 
getChildQueueInfos in class YarnClientparent - Name of the queue whose child-queues' information is neededorg.apache.hadoop.yarn.exceptions.YarnExceptionIOException@InterfaceAudience.Private public void setRMClient(org.apache.hadoop.yarn.api.ApplicationClientProtocol rmClient)
public org.apache.hadoop.yarn.api.records.ApplicationAttemptReport getApplicationAttemptReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
                                                                                        throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                               IOException
YarnClientGet a report of the given ApplicationAttempt.
 In secure mode, YARN verifies access to the application, queue
 etc. before accepting the request.
 
getApplicationAttemptReport in class YarnClientappAttemptId - ApplicationAttemptId of the application attempt that needs
          a reportorg.apache.hadoop.yarn.exceptions.YarnExceptionorg.apache.hadoop.yarn.exceptions.ApplicationAttemptNotFoundException - if application attempt
         not foundIOExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationAttemptReport> getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet a report of all (ApplicationAttempts) of Application in the cluster.
getApplicationAttempts in class YarnClientappId - application id of the apporg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.records.ContainerReport getContainerReport(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                                                                      throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                             IOException
YarnClientGet a report of the given Container.
 In secure mode, YARN verifies access to the application, queue
 etc. before accepting the request.
 
getContainerReport in class YarnClientcontainerId - ContainerId of the container that needs a reportorg.apache.hadoop.yarn.exceptions.YarnExceptionorg.apache.hadoop.yarn.exceptions.ContainerNotFoundException - if container not found.IOExceptionpublic List<org.apache.hadoop.yarn.api.records.ContainerReport> getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet a report of all (Containers) of ApplicationAttempt in the cluster.
getContainers in class YarnClientapplicationAttemptId - application attempt idorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic void moveApplicationAcrossQueues(org.apache.hadoop.yarn.api.records.ApplicationId appId,
                                        String queue)
                                 throws org.apache.hadoop.yarn.exceptions.YarnException,
                                        IOException
YarnClientAttempts to move the given application to the given queue.
moveApplicationAcrossQueues in class YarnClientappId - Application to move.queue - Queue to place it in to.org.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.GetNewReservationResponse createReservation()
                                                                                       throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                              IOException
YarnClient
 Obtain a GetNewReservationResponse for a new reservation,
 which contains the ReservationId object.
 
createReservation in class YarnClientGetNewReservationResponse containing a new
         ReservationId object.org.apache.hadoop.yarn.exceptions.YarnException - if reservation cannot be created.IOException - if reservation cannot be created.public org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse submitReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest request)
                                                                                           throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                                  IOException
YarnClient
 The interface used by clients to submit a new reservation to the
 ResourceManager.
 
 The client packages all details of its request in a
 ReservationSubmissionRequest object. This contains information
 about the amount of capacity, temporal constraints, and gang needs.
 Furthermore, the reservation might be composed of multiple stages, with
 ordering dependencies among them.
 
 In order to respond, a new admission control component in the
 ResourceManager performs an analysis of the resources that have
 been committed over the period of time the user is requesting, verify that
 the user requests can be fulfilled, and that it respect a sharing policy
 (e.g., CapacityOverTimePolicy). Once it has positively determined
 that the ReservationRequest is satisfiable the ResourceManager
 answers with a ReservationSubmissionResponse that includes a
 ReservationId. Upon failure to find a valid allocation the response
 is an exception with the message detailing the reason of failure.
 
 The semantics guarantees that the ReservationId returned,
 corresponds to a valid reservation existing in the time-range request by
 the user. The amount of capacity dedicated to such reservation can vary
 overtime, depending of the allocation that has been determined. But it is
 guaranteed to satisfy all the constraint expressed by the user in the
 ReservationDefinition
 
submitReservation in class YarnClientrequest - request to submit a new ReservationReservationId on accepting the
         submissionorg.apache.hadoop.yarn.exceptions.YarnException - if the reservation cannot be created successfullyIOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse updateReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest request)
                                                                                       throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                              IOException
YarnClientThe interface used by clients to update an existing Reservation. This is referred to as a re-negotiation process, in which a user that has previously submitted a Reservation.
 The allocation is attempted by virtually substituting all previous
 allocations related to this Reservation with new ones, that satisfy the new
 ReservationDefinition. Upon success the previous allocation is
 atomically substituted by the new one, and on failure (i.e., if the system
 cannot find a valid allocation for the updated request), the previous
 allocation remains valid.
 
updateReservation in class YarnClientrequest - to update an existing Reservation (the
          ReservationUpdateRequest should refer to an existing valid
          ReservationId)org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid or reservation cannot be
           updated successfullyIOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse deleteReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest request)
                                                                                       throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                              IOException
YarnClientThe interface used by clients to remove an existing Reservation.
deleteReservation in class YarnClientrequest - to remove an existing Reservation (the
          ReservationDeleteRequest should refer to an existing valid
          ReservationId)org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid or reservation cannot be
           deleted successfullyIOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.ReservationListResponse listReservations(org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest request)
                                                                                    throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                           IOException
YarnClientThe interface used by clients to get the list of reservations in a plan. The reservationId will be used to search for reservations to list if it is provided. Otherwise, it will select active reservations within the startTime and endTime (inclusive).
listReservations in class YarnClientrequest - to list reservations in a plan. Contains fields to select
                String queue, ReservationId reservationId, long startTime,
                long endTime, and a bool includeReservationAllocations.
                queue: Required. Cannot be null or empty. Refers to the
                reservable queue in the scheduler that was selected when
                creating a reservation submission
                ReservationSubmissionRequest.
                reservationId: Optional. If provided, other fields will
                be ignored.
                startTime: Optional. If provided, only reservations that
                end after the startTime will be selected. This defaults
                to 0 if an invalid number is used.
                endTime: Optional. If provided, only reservations that
                start on or before endTime will be selected. This defaults
                to Long.MAX_VALUE if an invalid number is used.
                includeReservationAllocations: Optional. Flag that
                determines whether the entire reservation allocations are
                to be returned. Reservation allocations are subject to
                change in the event of re-planning as described by
                ReservationDefinition.org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalidIOException - if the request failed otherwisepublic Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> getNodeToLabels() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientThe interface used by client to get node to labels mappings in existing cluster
getNodeToLabels in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic Map<String,Set<org.apache.hadoop.yarn.api.records.NodeId>> getLabelsToNodes() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientThe interface used by client to get labels to nodes mapping in existing cluster
getLabelsToNodes in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic Map<String,Set<org.apache.hadoop.yarn.api.records.NodeId>> getLabelsToNodes(Set<String> labels) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientThe interface used by client to get labels to nodes mapping for specified labels in existing cluster
getLabelsToNodes in class YarnClientlabels - labels for which labels to nodes mapping has to be retrievedorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic List<org.apache.hadoop.yarn.api.records.NodeLabel> getClusterNodeLabels() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientThe interface used by client to get node labels in the cluster
getClusterNodeLabels in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnException - when there is a failure in
           ApplicationClientProtocolIOException - when there is a failure in
           ApplicationClientProtocolpublic org.apache.hadoop.yarn.api.records.Priority updateApplicationPriority(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                                                                             org.apache.hadoop.yarn.api.records.Priority priority)
                                                                      throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                             IOException
YarnClientThe interface used by client to set priority of an application
updateApplicationPriority in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic void signalToContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                              org.apache.hadoop.yarn.api.records.SignalContainerCommand command)
                       throws org.apache.hadoop.yarn.exceptions.YarnException,
                              IOException
YarnClientSignal a container identified by given ID.
signalToContainer in class YarnClientcontainerId - ContainerId of the container that needs to be signaledcommand - the signal container commandorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsResponse updateApplicationTimeouts(org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsRequest request)
                                                                                                       throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                                              IOException
updateApplicationTimeouts in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic Map<String,org.apache.hadoop.yarn.api.records.Resource> getResourceProfiles() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet the resource profiles available in the RM.
getResourceProfiles in class YarnClientorg.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledException - if resource-profile is disabledorg.apache.hadoop.yarn.exceptions.YarnException - if any error happens inside YARNIOException - in case of other errorspublic org.apache.hadoop.yarn.api.records.Resource getResourceProfile(String profile) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet the details of a specific resource profile from the RM.
getResourceProfile in class YarnClientprofile - the profile nameorg.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledException - if resource-profile is disabledorg.apache.hadoop.yarn.exceptions.YarnException - if any error happens inside YARNIOException - in case of other otherspublic List<org.apache.hadoop.yarn.api.records.ResourceTypeInfo> getResourceTypeInfo() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
YarnClientGet available resource types supported by RM.
getResourceTypeInfo in class YarnClientorg.apache.hadoop.yarn.exceptions.YarnException - if any issue happens inside YARNIOException - in case of other othersCopyright © 2008–2018 Apache Software Foundation. All rights reserved.