Distcp From Local to HDFS giving error file not found

0 votes

I was checking the ways to copy data from local to HDFS, so I found copyFromLocal, put and distcp command. Distcp performs the operation faster than put or copyFromLocal. So I was trying the same but I am receiving the error FIleNotFoundException. Can anyone help to resolve the error?

Apr 29 in Big Data Hadoop by Amey
• 210 points
85 views

1 answer to this question.

0 votes

Hey, @Amey,

This is probably because of a lack of configuration. Try to add the Hadoop configuration files as a resource to the object Configuration:

Configuration conf = new Configuration();
conf.addResource(new Path("/etc/hadoop/conf/core-site.xml")); 
conf.addResource(new Path("/etc/hadoop/conf/hdfs-site.xml"));
FileSystem hdfs = FileSystem.get(conf);

I hope this will help. If you get any other queries regarding this, please post it here.

answered Apr 29 by Gitika
• 29,690 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Error while copying the file from local to HDFS

Well, the reason you are getting such ...READ MORE

answered May 2, 2018 in Big Data Hadoop by Ashish
• 2,630 points
1,156 views
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
• 10,920 points
9,514 views
0 votes
1 answer

Not able to create Hive table from HDFS file

You dont have to specify the file name ...READ MORE

answered Dec 5, 2018 in Big Data Hadoop by Omkar
• 69,060 points
869 views
0 votes
1 answer
0 votes
1 answer

Copy file from local to hdfs from the spark job in yarn mode

Please refer to the below code: import org.apache.hadoop.conf.Configuration import ...READ MORE

answered Jul 16, 2019 in Big Data Hadoop by Raj
2,458 views
0 votes
1 answer

Not Able to read the file from hdfs location

You have to mention the hdfs path, ...READ MORE

answered Jul 23, 2019 in Big Data Hadoop by Esha
85 views
0 votes
1 answer
0 votes
1 answer

How can I put file to HDFS directly without copying it local disk?

Can use pipe from wget to hdfs. You ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by kurt_cobain
• 9,310 points
1,782 views