A flexible heuristic to schedule distributed analytic applications in compute clusters