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
• 9,030 points
192 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
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
• 12,150 points

Related Questions In Big Data Hadoop

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
• 9,030 points

edited Mar 21, 2018 by nitinrawat895 145 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
• 65,850 points
23 views
0 votes
1 answer

Getting error when writing to HDFS. Unable to load native-hadoop library for your platform

Try this: sudo service hadoop-master restart After that try ...READ MORE

answered Dec 19, 2018 in Big Data Hadoop by Omkar
• 65,850 points
56 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,030 points
1,659 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,044 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
560 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
• 12,150 points
337 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
• 12,150 points
229 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.