Contributed by Xieming Li. Follow-up to HADOOP-16445 Change-Id: I72c62d55b734a0f67556844f398ef4a50d9ea585