1. A method comprising: accepting hierarchical data; performing a map-reduce job on the hierarchical data; said performing comprising: determining a cost of partitioning the data; determining a cost of redefining the job; thereupon selectively performing at least one step taken from the group consisting of: partitioning the data and redefining the job.