Path sourcepath= new Path("user/D/filelLocation"); Path despath= new Path("hdfs://slogix.in:54310/home/hduser/hadoopfile”); FileSystem fs = FileSystem.get(conf); fs.copyToLocalFile(despath,sourcepath);
hadoop fs -copyToLocal