Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-46006

YarnAllocator miss clean targetNumExecutorsPerResourceProfileId after YarnSchedulerBackend call stop

    XMLWordPrintableJSON

Details

    Description

      We meet a case that user call sc.stop() after run all custom code, but stuck in some place. 

      Cause below situation

      1. User call sc.stop()
      2. sc.stop() stuck in some process, but SchedulerBackend.stop was called
      3. Since tarn ApplicationMaster didn't finish, still call YarnAllocator.allocateResources()
      4. Since driver endpoint stop new allocated executor failed to register
      5. 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.

       

       

      Attachments

        1. image-2023-11-20-17-56-56-507.png
          184 kB
          angerszhu
        2. image-2023-11-20-17-56-45-212.png
          364 kB
          angerszhu

        Activity

          People

            angerszhuuu angerszhu
            angerszhuuu angerszhu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: