YARN-RPC-ApplicationClientProtocol源码
一. ApplicationClientProtocol
ApplicationClientProtocol接口继承ApplicationBaseProtocol接口
ApplicationBaseProtocol接口的内容
1.1 ApplicationBaseProtocol
客户端和RM/ApplicationHistoryServer之间的协议,获取信息/applications/application attempts/containers,方法有:
getApplicationReport
getApplications
getApplicationAttemptReport
getApplicationAttempts
getContainerReport
getContainers
getDelegationToken
renewDelegationToken
cancelDelegationToken
以getApplicationReport说明如下:
public GetApplicationReportResponse getApplicationReport(
      GetApplicationReportRequest request) throws YarnException, IOException;
客户端通过GetApplicationReportRequest提供ApplicationId;
在安全模式,在接收request之前,RM/AHS验证到应用的访问权限/队列等。
RM/AHS返回GetApplicationReportResponse,含有ApplicationReport;
如果没有应用的访问权限,有一些标志位做相应的设置;
public GetApplicationsResponse
      getApplications(GetApplicationsRequest request) throws YarnException,
          IOException;
GetApplicationsRequest中定义了一些filter,进行application匹配,
RM或AHS响应一个GetApplicationsResponse,包含ApplicationReport,也会验证访问权限;
1.2 ApplicationClientProtocol
client和RM之间发送/停止jobs,或者获取应用、集群信息、节点、队列和ACL
ApplicationClientProtocol继承自ApplicationBaseProtocol
#获取新的ApplicationId,资源信息等
getNewApplication	
#提交application,client需要提交队列、运行ApplicationMaster的资源,ContainerLaunchContext去launch ApplicationMaster
submitApplication
forceKillApplication
getClusterMetrics
getClusterNodes
getQueueInfo
getQueueUserAcls
moveApplicationAcrossQueues
submitReservation
updateReservation
deleteReservation
#获取NodeToLabels
getNodeToLabels
getClusterNodeLabels
Label based scheduling:http://dongxicheng.org/mapreduce-nextgen/hadoop-yarn-label-based-scheduling/
 
                    
                     
                    
                 
                    
                
 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号