Make sure to subscribe to our newsletter and be the first to know the news.
Make sure to subscribe to our newsletter and be the first to know the news.
This blog post we are going to learn commands to fetch files from HDFS to Local System
Lets go through this video to understand the whole process
Commands for fetching a file in HDFS
HDFS to Local | |
---|---|
hadoop fs -get /user/asterix/log.txt /home/ubuntu/data | Copies file from HDFS to local system, in this instance file log.txt in HDFS is copied to /home/ubuntu/data local linux folder |
hadoop fs -get -p /user/asterix/log.txt /home/ubuntu/data | Copies file from HDFS to local system, in this instance file log.txt in HDFS is copied to /home/ubuntu/data local linux folder -p preserves access and modification times, ownership and the mode. |
hadoop fs -get /user/asterix/*.csv /home/ubuntu/data | Copies all the matching files from HDFS to local, in this instance all the csv files will be copied from HDFS folder to linux local system |