Hadoop code implementation