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?