我得到 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/