repackaging into spark and mapreduce