Running into an issue while running the mapred job on the server

0 votes

I installed Hadoop on a 5 node cluster and started the services on all 5 nodes. I am testing a mapreduce job to find the word count for a given input file. 

I have created the sample input file under /var/tmp directory. Now I am trying to copy the file to hdfs using the command, Hadoop dfs -put /var/tmp/students.txt /home. Here's the contents of the input file. 

 [hadoop@nn~]$ cat /var/tmp/students.txt 
Paris 
Italy 
London 
Mumbai 
Goa 

When I run the below command to transfer the file tohdfs, I am seeing the following error.  

hadoop@nn ~]$ hadoop dfs -put /var/tmp/students.txt /home put: Target /home already exists
Dec 20, 2018 in Big Data Hadoop by slayer
• 29,370 points
498 views

1 answer to this question.

0 votes

Try this command

hadoop dfs -put /var/tmp/students.txt /
hadoop dfs -ls  /

or if you want to copy to a particular hdfs directory, you can use this:

hadoop dfs -put /var/tmp/students.txt /path/to/dir
answered Dec 20, 2018 by Omkar
• 69,220 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Command to allows polling the Oozie server for an Oozie job?

Hey, You can use this command to see polling ...READ MORE

answered Jun 18, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,045 views
0 votes
11 answers
0 votes
2 answers
0 votes
1 answer

Should the region server be located on all DataNodes?

Hey, Absolute Yes, because Region server runs on ...READ MORE

answered May 22, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,651 views
+1 vote
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
• 11,380 points
11,029 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,538 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,836 views
–1 vote
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,350 points
4,612 views
0 votes
1 answer

Issue While Running Oozie Sample Project

Hey @supriya.  Seems like you have not set ...READ MORE

answered Jan 4, 2019 in Big Data Hadoop by Omkar
• 69,220 points
875 views
0 votes
1 answer

How to find the port on which hdfs is running?

If you are using hadoop 2.7 or ...READ MORE

answered Jan 25, 2019 in Big Data Hadoop by Omkar
• 69,220 points
3,804 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP