老师,好!
在Windows10环境下,通过IDEA执行:
ALSModel alsModel = ALSModel.load(“file:///E:/learn/es/dianpingFile/alsModel”);报如下错误,麻烦帮忙看一下(感觉像是解析路径的问题):
Exception in thread “main” java.lang.RuntimeException: Error while running command to get file permissions : java.io.IOException: (null) entry in command string: null ls -F E:\learn\es\dianpingFile\alsModel\metadata\part-00000
at org.apache.hadoop.util.ShellShellCommandExecutor.execute(Shell.java:762)atorg.apache.hadoop.util.Shell.execCommand(Shell.java:859)atorg.apache.hadoop.util.Shell.execCommand(Shell.java:842)atorg.apache.hadoop.fs.FileUtil.execCommand(FileUtil.java:1097)atorg.apache.hadoop.fs.RawLocalFileSystemShellCommandExecutor.execute(Shell.java:762)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:859)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:842)
at org.apache.hadoop.fs.FileUtil.execCommand(FileUtil.java:1097)
at org.apache.hadoop.fs.RawLocalFileSystemShellCommandExecutor.execute(Shell.java:762)atorg.apache.hadoop.util.Shell.execCommand(Shell.java:859)atorg.apache.hadoop.util.Shell.execCommand(Shell.java:842)atorg.apache.hadoop.fs.FileUtil.execCommand(FileUtil.java:1097)atorg.apache.hadoop.fs.RawLocalFileSystemDeprecatedRawLocalFileStatus.loadPermissionInfo(RawLocalFileSystem.java:587)
at org.apache.hadoop.fs.RawLocalFileSystem$DeprecatedRawLocalFileStatus.getPermission(RawLocalFileSystem.java:562)
at org.apache.hadoop.fs.LocatedFileStatus.(LocatedFileStatus.java:47)
at org.apache.hadoop.fs.FileSystem$4.next(FileSystem.java:1701)
at org.apache.hadoop.fs.FileSystem$4.next(FileSystem.java:1681)
at org.apache.hadoop.mapred.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:268)
at org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:228)
at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:313)
我的spark配置:
org.apache.spark
spark-mllib_2.12
2.4.4
com.google.guava
guava
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>