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
32 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
• 65,850 points

Related Questions In Big Data Hadoop

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 4 days ago in Big Data Hadoop by Gitika
• 8,380 points
7 views
0 votes
1 answer

How can I get the respective Bitcoin value for an input in USD when using c#

Simply make call to server and parse ...READ MORE

answered Mar 25, 2018 in Big Data Hadoop by charlie_brown
• 7,710 points
28 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,070 points
1,679 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,070 points
132 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
8,156 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
572 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
• 65,850 points
30 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
• 65,850 points
28 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.