1.1 如何启动AM并申请资源

1.1.1 如何启动AM

Android培训,安卓培训,手机开发培训,移动开发培训,云培训培训

val yarnClient = YarnClient.createYarnClient
setupCredentials()
yarnClient.init(yarnConf)
yarnClient.start()// Get a new application from our RMval newApp = yarnClient.createApplication()
val newAppResponse = newApp.getNewApplicationResponse()
appId = newAppResponse.getApplicationId() 
// Set up the appropriate contexts to launch our AMval containerContext = createContainerLaunchContext(newAppResponse)
val appContext = createApplicationSubmissionContext(newApp, containerContext) 
// Finally, submit and monitor the applicationlogInfo(s"Submitting application $appId to ResourceManager")
yarnClient.submitApplication(appContext)

Android培训,安卓培训,手机开发培训,移动开发培训,云培训培训

1.1.2 FairScheduler如何处理AM的ResourceRequest

1、FairScheduler接收到SchedulerEventType.APP

网友评论