What is a container in YARN? Is it same as the child JVM in which the tasks on the nodemanager run or is it different?
Container is a place where the application runs its task. If you want to know the total no.of running containers in a cluster, then you could check in your cluster Yarn-Resource manager UI.
Yarn URL: http://Your-Active-ResourceManager-IP:45020/cluster/apps/RUNNING
At the "Running containers" column, the total no. of running containers details is present.
Note: If you are using spark, then the spark executors would be running inside the container. One container can accommodate multiple spark executors.