Sample codes for mapreduce application