Details
Description
We meet a case that user call sc.stop() after run all custom code, but stuck in some place.
Cause below situation
- User call sc.stop()
- sc.stop() stuck in some process, but SchedulerBackend.stop was called
- Since tarn ApplicationMaster didn't finish, still call YarnAllocator.allocateResources()
- Since driver endpoint stop new allocated executor failed to register
- untll trigger Max number of executor failures
Caused by
Before call CoarseGrainedSchedulerBackend.stop() will call YarnSchedulerBackend.requestTotalExecutor() to clean request info
From the log we make sure that CoarseGrainedSchedulerBackend.stop() was called
When YarnAllocator handle then empty resource request, since resourceTotalExecutorsWithPreferedLocalities is empty, miss clean targetNumExecutorsPerResourceProfileId.