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

AMRMClientAsync will stop if any exceptions thrown on allocate call

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: