ratio mapper and reducer update