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,050 points
44 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
• 67,480 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
• 25,340 points
37 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 in Big Data Hadoop by Gitika
• 25,340 points
25 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
• 10,670 points
2,739 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
• 10,670 points
289 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
13,574 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
995 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,480 points
53 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,480 points
60 views