finish the sample ot scala map reduce