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

NodeManager metrics return wrong value after update node resource

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 3.1.0, 2.10.0, 2.9.1, 3.0.1, 2.8.4, 2.7.6
    • Component/s: None
    • Labels:
      None

      Description

      NodeManagerMetrics.java
        public void addResource(Resource res) {
          availableMB = availableMB + res.getMemorySize();
          availableGB.incr((int)Math.floor(availableMB/1024d));
          availableVCores.incr(res.getVirtualCores());
        }
      

      When the node resource was updated through RM-NM heartbeat, the NM metric will get wrong value.
      The root cause of this issue is that new resource has been added to availableMB, so not needed to increase for availableGB again.

        Attachments

        1. YARN-7661.001.patch
          3 kB
          Yang Wang
        2. YARN-7661.002.patch
          2 kB
          Yang Wang

          Issue Links

            Activity

              People

              • Assignee:
                fly_in_gis Yang Wang
                Reporter:
                fly_in_gis Yang Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: