java - 方法 listFiles(Path, boolean) 对于类型 FileSystem 是未定义的

标签 java hadoop filesystems fs

我得到 The method listFiles(Path, boolean) is undefined for the type FileSystem.有人遇到过这个问题吗?

Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
RemoteIterator<LocatedFileStatus> itr =  fs.listFiles(srcPath,true);

最佳答案

您可能正在导入 java 文件系统,而不是 Apache 文件系统。检查您的导入。

关于java - 方法 listFiles(Path, boolean) 对于类型 FileSystem 是未定义的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38601851/

相关文章:

hadoop - yarn - Spark 工作的执行者

hadoop - 霍顿工厂 : start datanode failed

hadoop - MapR 分发中使用的容器架构是什么?

c# - 从在线资源统一将图像保存在移动设备上

windows - Windows 上是否有对应的 Mac OS-X 文件系统 bundle ?

java - 是否可以创建一个正则表达式来查找与模式不匹配的字符串?

java - 在 java 中使用 apache poi 在现有 Excel 文件中追加数据

java - 出现错误页面,上周上传文件有效,但我没有做任何更改

linux - 什么 du 可以看到 rsync 不能?

java - 从 Android 存储访问框架中选取时文件是只读的