Abhi0505-kinagi opened a new pull request, #8764: URL: https://github.com/apache/hadoop/pull/8764
## Summary On hosts using cgroup v2, `CGroupsV2ResourceCalculator#getVirtualMemorySize()` returns only the swap usage (`memory.swap.current`) instead of the real virtual memory of the container process tree. `AbstractCGroupsResourceCalculator` previously read a single `virtualMemoryKey` directly. This works for cgroup v1, where `memory.memsw.usage_in_bytes` already includes memory + swap in one value, but cgroup v2 exposes them separately. This fix removes the generic `virtualMemoryKey` handling and adds `calculateVirtualMemory()`, with version-specific behavior: - cgroup v1: use `memory.memsw.usage_in_bytes` - cgroup v2: use `memory.stat#anon + memory.swap.current` The v2 unit test was updated to expect `33000L`: `22000 (anon) + 11000 (swap)` Related: https://issues.apache.org/jira/browse/YARN-11991 -- 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]
