I am new to hadoop/yarn, and need to get container resources consumption during task execution.
When I look at doc in apache hadoop website, it says "nodemanager... Is responsible for container,monitoring their resource usage(cpu,memory,disk,network) and report the same to the resourcemanager". My understanding is that node manager will periodically report resource usage together with heartbeat.
When I look at source code. In NodeStatusUpdaterImpl, totalResource is included in RegisterNodeManagerRequest.I think it is called when init nodemanager and tell RM about the configured resource. But in NodeHeartbeatRequest, the nodestatus only has container id, but no cpu memory etc.
So could you please help me clarify whether cpu memory used by container will be reported to RM? How I can get such data?
Many thanks!