我有一个Java项目,正在其中运行一些Spark代码。当我通过IntelliJ IDE运行时,它可以正常工作,但是当我以jar运行时,出现以下错误。
我正在使用this教程来创建一个jar。
Failed to get file system for path: /dir1/version-hint.text.
Caused by: org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "file"
Caused by: org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "file"
at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:3332)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3352)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:124)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3403)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3371)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:477)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:226)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:461)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:361)
at com.netflix.iceberg.hadoop.HadoopTableOperations.readVersionHint(HadoopTableOperations.java:188)
... 6 more