当前位置:   article > 正文

Hadoop3.1.1:UnsupportedFileSystemException异常_exception in thread "main" org.apache.hadoop.fs.un

exception in thread "main" org.apache.hadoop.fs.unsupportedfilesystemexcepti

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);
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

导入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/*
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

报错:

Exception in thr
    声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/519446
    推荐阅读
    相关标签
      

    闽ICP备14008679号