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

NodeManager metrics return wrong value after update node resource

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.0
    • 3.1.0, 2.10.0, 2.9.1, 3.0.1, 2.8.4, 2.7.6
    • None
    • 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

              wangyang0918 Yang Wang
              wangyang0918 Yang Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: