remove unnecessary imports
Extract metadata then convert it directly to hdfs file
dependencies are added.
fix eclipse warnings
replace the deprecated classes.