Merge -c 1489236 from trunk to branch-2 to fix MAPREDUCE-5245. Added back constants to JobConf to fix incompatibilities. Contributed by Zhijie Shen.