code work from Hadoop in Practice