Update deprecated methods for hadoop 2.5.x