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,040 points
33 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 67,000 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 in Big Data Hadoop by Gitika
• 16,410 points
9 views
0 votes
10 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 in Big Data Hadoop by Gitika
• 16,410 points
12 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,610 points
1,872 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
• 9,610 points
166 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
9,348 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,240 points
675 views
0 votes
1 answer

Issue While Running Oozie Sample Project

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

answered Jan 3 in Big Data Hadoop by Omkar
• 67,000 points
33 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 24 in Big Data Hadoop by Omkar
• 67,000 points
32 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.