some code for apache hdfs