How to copy file from HDFS to the local file system
bin/hadoop fs -get /hdfs/source/path /localfs/destination/path
bin/hadoop fs -copyToLocal /hdfs/source/path /localfs/destination/path
- Point your web browser to HDFS WEBUI(
namenode_machine:50070
), browse to the file you intend to copy, scroll down the page and click on download the file.
In Hadoop 2.0,
hdfs dfs -copyToLocal <hdfs_input_file_path> <output_path>
where,
hdfs_input_file_path
maybe obtained fromhttp://<<name_node_ip>>:50070/explorer.html
output_path
is the local path of the file, where the file is to be copied to.you may also use
get
in place ofcopyToLocal
.