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

We should make a copy of configuration when init MiniYARNCluster with multiple RMs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None
    • None

    Description

      When I was trying to write a test case for YARN-2674, I found DS client trying to connect to both rm1 and rm2 with the same address 0.0.0.0:18032 when RM failover. But I initially set yarn.resourcemanager.address.rm1=0.0.0.0:18032, yarn.resourcemanager.address.rm2=0.0.0.0:28032 After digging, I found it is in ClientRMService where the value of yarn.resourcemanager.address.rm2 changed to 0.0.0.0:18032. See the following code in ClientRMService:

      clientBindAddress = conf.updateConnectAddr(YarnConfiguration.RM_BIND_HOST,
                                                     YarnConfiguration.RM_ADDRESS,
                                                     YarnConfiguration.DEFAULT_RM_ADDRESS,
                                                     server.getListenerAddress());
      

      Since we use the same instance of configuration in rm1 and rm2 and init both RM before we start both RM, we will change yarn.resourcemanager.ha.id to rm2 during init of rm2 and yarn.resourcemanager.ha.id will become rm2 during starting of rm1.
      So I think it is safe to make a copy of configuration when init both of the rm.

      Attachments

        1. YARN-3749.2.patch
          19 kB
          Chun Chen
        2. YARN-3749.3.patch
          21 kB
          Chun Chen
        3. YARN-3749.4.patch
          22 kB
          Chun Chen
        4. YARN-3749.5.patch
          22 kB
          Chun Chen
        5. YARN-3749.6.patch
          22 kB
          Chun Chen
        6. YARN-3749.7.patch
          24 kB
          Xuan Gong
        7. YARN-3749.7.patch
          24 kB
          Chun Chen
        8. YARN-3749.patch
          15 kB
          Chun Chen

        Issue Links

          Activity

            People

              chenchun Chun Chen
              chenchun Chun Chen
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: