refactor codes against hadoop-2.2.0