Abhi0505-kinagi commented on code in PR #8764:
URL: https://github.com/apache/hadoop/pull/8764#discussion_r4214203195


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/AbstractCGroupsResourceCalculator.java:
##########
@@ -92,11 +89,17 @@ public long getRssMemorySize(int olderThanAge) {
     return 1 < olderThanAge ? UNAVAILABLE : getStat(rssMemoryKey);
   }
 
+ /**
+ * @return memory + swap in bytes, or {@link #UNAVAILABLE} if not readable.
+ * Reads the stats loaded by the last {@code updateProcessTree()}.
+ */
   @Override
   public long getVirtualMemorySize(int olderThanAge) {
-    return 1 < olderThanAge ? UNAVAILABLE : getStat(virtualMemoryKey);
+    return 1 < olderThanAge ? UNAVAILABLE : calculateVirtualMemory();
   }
 
+  protected abstract long calculateVirtualMemory();

Review Comment:
   @pan3793  
   Thanks for the suggestion! Updated to getVirtualMemorySize0() and the build 
passes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to