Hadoop3.1.1 报Exception in thread “main” org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "hdfs"解决
配置环境:
CentOS 7 64位
eclipse-jee-2019-06-R-linux-gtk-x86_64.tar
hadoop-3.1.1
jdk-8u211-linux-x64.tar
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
Path src = new Path("hdfs://namenode:9000/jdk-7u80-linux-x64.tar.gz");
FSDataInputStream in = fs.open(src);
FileOutputStream os = new FileOutputStream("/home/hlmou/download");
IOUtils.copy(in, os);
导入jar包:
share/hadoop/hdfs/hadoop-hdfs-3.1.1.jar
share/hadoop/hdfs/lib/*
share/hadoop/common/hadoop-common-3.1.1.jar
share/hadoop/common/lib/*
报错:
Exception in thread "main" org.apache.hadoop.fs.UnsupportedFileSystemExcep