title: Yarn Application master and container allocation
body: <p>In YARN, the application master requests the resource manager for the resources, so that the containers for that application can be launched.</p>
  
  <ol>
  <li><p>Does the application master wait for all the resources to be allocated before it even launches the first container or it request for each and every container and as and when it obtains the resource for a container, it starts launching that specific container?
  i.e.What about the situation when only part of the resources are available? Does it wait for the resource to be freed? or proceed based on the available resources?</p></li>
  <li><p>How does the MR application master decides the resource requirement for an MR job? Does the YARN MR client determine this and sends it to AM or the AM finds it? If so, what is this based on? I believe that this is configurable but i may be talking about the default case when the memory, CPU are not provided.</p></li>
  </ol>