Java MapReduce error saying No FileSystem for scheme hdfs

0 votes

I am writing java code to upload a file to HDFS. So, my code is as follows:

Configuration configuration = new Configuration();
configuration.set(“fs.hdfs.impl”, org.apache.hadoop.DistributedFileSystem.class.getName());
Filesystem filesystem = FileSystem.get(URI.create(remote), configuration);

I included the following dependencies while executing the project:

  • hadoop-auth-2.6.1.jar
  • hadoop-common-2.6.1.jar 
  • hadoop-hdfs-2.6.1.jar

While executing the project I got an error saying

No FileSystem for scheme:hdfs

Can anyone tell me what is wrong with my code?

May 9, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
2,707 views

1 answer to this question.

0 votes
The problem is with the dependencies. The DistributedFileSystem is present in hadoop-core package. So, I guess you haven’t given the hadoop-core dependencies.

Import hadoop-core jar from org.apache.hadoop package.

One more important thing, sometimes we also get this issue if the version of Hadoop is different from the version of jar dependencies that you are using. So kindly look at the version of Hadoop that you are using & the version of jars that you are importing.
answered May 9, 2018 by Shubham
• 13,490 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

How to create a FileSystem object that can be used for reading from and writing to HDFS?

Read operation on HDFS In order to read ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points

edited Mar 22, 2018 by nitinrawat895 3,036 views
0 votes
1 answer
0 votes
1 answer

Hadoop MapReduce wordcount "type job is not applicable for the arguments" error

The combiner class is not required in ...READ MORE

answered Dec 19, 2018 in Big Data Hadoop by Omkar
• 69,220 points
824 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,028 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,832 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
0 votes
1 answer

Getting error in command hdfs dfs -mkdir

You are getting this error because the ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,490 points
3,264 views
0 votes
1 answer

Getting error in MapReduce job.setInputFormatClass

In old Hadoop API(i.e. below Hadoop 0.20.0), ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,067 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