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

Race condition in MiniMRYarnCluster when getting history server address

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 2.7.2, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None

      Description

      Problem in this place when waiting for JHS to be started

              new Thread() {
                public void run() {
                  historyServer.start();
                };
              }.start();
              while (historyServer.getServiceState() == STATE.INITED) {
                LOG.info("Waiting for HistoryServer to start...");
                Thread.sleep(1500);
              }
      

      The service state is updated before the service is actually started. See AbstractServic#start. So it's possible that when the while loop breaks, the service is not yet started.

        Attachments

        1. YARN-4313.1.patch
          2 kB
          Jian He
        2. YARN-4313.2.patch
          1 kB
          Jian He

          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: