#5, First Floor, 4th Street , Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to copy a File from HDFS to local System?
  • //To create a new directory
    Sample Code Segment

    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);

    Command

    hadoop fs -copyToLocal