• Hadoop3 No FileSystem for scheme "hdfs"


    Hadoop3 No FileSystem for scheme "hdfs"

    异常信息:

    org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "hdfs"
     at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:3372)
     at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3392)
     at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:124)
     at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3443)
     at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3411)
    

    异常FileSystem源码:

      public static Class<? extends FileSystem> getFileSystemClass(String scheme,
          Configuration conf) throws IOException {
        if (!FILE_SYSTEMS_LOADED) {
          loadFileSystems();
        }
        Class<? extends FileSystem> clazz = null;
        if (conf != null) {
          clazz = (Class<? extends FileSystem>) conf.getClass("fs." + scheme + ".impl", null);
        }
        if (clazz == null) {
          clazz = SERVICE_FILE_SYSTEMS.get(scheme);
        }
        if (clazz == null) {
          throw new IOException("No FileSystem for scheme: " + scheme);
        }
        return clazz;
      }
    

    core-site.xml添加配置

    <property>
    	<name>fs.hdfs.impl</name>
        <value>org.apache.hadoop.hdfs.DistributedFileSystem</value>
    </property>
    <property>
    	<name>fs.file.impl</name>
        <value>org.apache.hadoop.fs.LocalFileSystem</value>
    </property>
    
  • 相关阅读:
    call与apply
    git的.gitignore文件内容
    docker安装nacos
    项目某些代码突然报红的问题
    用打字查看当前时间以及显示数字各种形式
    mybatisPlus crud操作注意事项
    nginx location关于root、alias配置的区别
    docker安装kafka
    docker基础容器中bash: vi: command not found问题解决
    docker安装fastdfs
  • 原文地址:https://www.cnblogs.com/flowerbirds/p/14191874.html
Copyright © 2020-2023  润新知