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

NodeManager metrics return wrong value after update resource

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • 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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: