hadoop copy a local file system folder to HDFS

0 votes

I have a directory present in my local filesystem. That directory is containing multiple directories. I have to copy the whole directory to HDFS.

I am not able to find any command for doing so? Will this command work?

$hadopp fs -copyFromLocal /local-filesystem-directory /HDFS-path
Apr 19, 2018 in Big Data Hadoop by coldcode
• 1,980 points
1,800 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can use both

hdfs dfs -put /local-filesystem-directory /HDFS-path

or 

hdfs dfs -copyFromLocal /local-filesystem-directory /HDFS-path

They write the data recursively to the HDFS. Hope this helps.

answered Apr 19, 2018 by Shubham
• 12,110 points
0 votes

There's a typo in your command: "hadopp". If you run the command mentioned in your question, you will end up getting an error telling that the command was not found. You can use the following command:

$ hadoop fs -copyFromLocal /local-filesystem-directory /HDFS-path
answered Feb 4 by Lohith
Oh Damn! Silly typo. Thanks

Related Questions In Big Data Hadoop

0 votes
1 answer

Copy file from HDFS to the local file system

There are two possible ways to copy ...READ MORE

answered Mar 27, 2018 in Big Data Hadoop by nitinrawat895
• 9,030 points
2,522 views
0 votes
1 answer

Hadoop: How to copy directory from local system to hdfs using Java code?

Just use the FileSystem's copyFromLocalFile method. If the source Path ...READ MORE

answered Nov 14, 2018 in Big Data Hadoop by Omkar
• 65,820 points
161 views
0 votes
1 answer

How to execute python script in hadoop file system (hdfs)?

If you are simply looking to distribute ...READ MORE

answered Sep 19, 2018 in Big Data Hadoop by digger
• 27,620 points
804 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,030 points
1,639 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
7,954 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
552 views
0 votes
1 answer
0 votes
1 answer

How to print the content of a file in console present in HDFS?

Yes, you can use hdfs dfs command ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 12,110 points
248 views
0 votes
1 answer

Where does HDFS stores data on the local file system?

First find the Hadoop directory present in ...READ MORE

answered May 8, 2018 in Big Data Hadoop by Shubham
• 12,110 points
460 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.