1. A method comprising: determining a job schedule of one or more MapReduce jobs within each of multiple MapReduce flows in a cluster environment, wherein said job schedule does not violate a precedence relationship within the corresponding MapReduce flow and reduces makespan of the corresponding MapReduce flow; determining a flow schedule for the multiple MapReduce flows based on consideration of a given metric, wherein said flow schedule comprises a number of slots allotted to each of the multiple MapReduce flows, and wherein said number of slots is less than or equal to a number of the one or more MapReduce jobs within each corresponding MapReduce flow; and transforming each job schedule into the flow schedule to allocate resources for the multiple MapReduce flows in the cluster environment without violating a precedence constraint of any of the multiple MapReduce flows; wherein at least one of the steps is carried out by a computer device.