Assume we have a file in HDFS called outfile. Given below is a simple demonstration for retrieving the required file from the Hadoop file system.
Step 1
Initially, view the data from HDFS using cat command.$ $HADOOP_HOME/bin/hadoop fs -cat /user/output/outfile
Step 2
Get the file from HDFS to the local file system using get command.$ $HADOOP_HOME/bin/hadoop fs -get /user/output/ /home/hadoop_tp/
No comments:
Post a Comment