CDAP-654: refactored setup method of mapper and reducer