|
|
@ -32,9 +32,7 @@ import org.apache.hadoop.fs.FSDataInputStream; |
|
|
|
import org.apache.hadoop.fs.FileStatus; |
|
|
|
import org.apache.hadoop.fs.FileStatus; |
|
|
|
import org.apache.hadoop.fs.FileSystem; |
|
|
|
import org.apache.hadoop.fs.FileSystem; |
|
|
|
import org.apache.hadoop.fs.FileUtil; |
|
|
|
import org.apache.hadoop.fs.FileUtil; |
|
|
|
import org.apache.hadoop.fs.LocatedFileStatus; |
|
|
|
|
|
|
|
import org.apache.hadoop.fs.Path; |
|
|
|
import org.apache.hadoop.fs.Path; |
|
|
|
import org.apache.hadoop.fs.RemoteIterator; |
|
|
|
|
|
|
|
import org.apache.hadoop.hdfs.HdfsConfiguration; |
|
|
|
import org.apache.hadoop.hdfs.HdfsConfiguration; |
|
|
|
import org.apache.hadoop.security.UserGroupInformation; |
|
|
|
import org.apache.hadoop.security.UserGroupInformation; |
|
|
|
|
|
|
|
|
|
|
@ -235,10 +233,12 @@ public class HdfsStorageOperator extends AbstractStorageOperator implements Clos |
|
|
|
if (!fs.exists(path)) { |
|
|
|
if (!fs.exists(path)) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
RemoteIterator<LocatedFileStatus> remoteIterator = fs.listFiles(path, true); |
|
|
|
FileStatus[] fileStatuses = fs.listStatus(path); |
|
|
|
while (remoteIterator.hasNext()) { |
|
|
|
for (FileStatus fileStatus : fileStatuses) { |
|
|
|
LocatedFileStatus locatedFileStatus = remoteIterator.next(); |
|
|
|
if (fileStatus.isDirectory()) { |
|
|
|
result.add(transformFileStatusToResourceMetadata(locatedFileStatus)); |
|
|
|
foldersToFetch.addLast(fileStatus.getPath().toString()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
result.add(transformFileStatusToResourceMetadata(fileStatus)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
return result; |
|
|
|