I\'m having a problem with trying to \"download\" file from HDFS file system to my local system. (even though opposite operation works without a problem). *Note: File exists on
Try using this method from the API :
//where delSrc is do you want to delete the source, src and dst you already have and useRawLocalFileSystem should be set to true in your case
hdfsFileSystem.copyToLocalFile(delSrc, src, dst, useRawLocalFileSystem);
in your case replace the :
hdfsFileSystem.copyToLocalFile(hdfs, local);
with:
hdfsFileSystem.copyToLocalFile(false, hdfs, local, true);