Implementation of a map reduce