Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5999

AMRMClientAsync will stop if any exceptions thrown on allocate call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha2
    • None
    • None

    Description

      Currently, for any exceptions thrown on the allocate call of AMRMClientAsync, it will stop both heartbeat thread and the callback handler thread, leaving AMRMClient in an unusable state. Caller has to instantiate a new AMRMClient.
      IMO, the threads should keep on running, it should be up to the caller whether to stop the AMRMClient or not.

                try {
                  response = client.allocate(progress);
                } catch (ApplicationAttemptNotFoundException e) {
                  handler.onShutdownRequest();
                  LOG.info("Shutdown requested. Stopping callback.");
                  return;
                } catch (Throwable ex) {
                  LOG.error("Exception on heartbeat", ex);
                  savedException = ex;
                  // interrupt handler thread in case it waiting on the queue
                  handlerThread.interrupt();
                  return;
                }
      

      Attachments

        1. YARN-5999.1.patch
          4 kB
          Jian He

        Issue Links

          Activity

            People

              jianhe Jian He
              jianhe Jian He
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: