HDFS-15396. Fix TestViewFileSystemOverloadSchemeHdfsFileSystemContract#testListStatusRootDir. Contributed by Ayush Saxena.

This commit is contained in:
Ayush Saxena 2020-06-08 01:59:10 +05:30 committed by GitHub
parent 3ca15292c5
commit a8610c15c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1202,6 +1202,9 @@ public FileStatus[] listStatus(Path f) throws AccessControlException,
INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;
try {
String linkedPath = link.getTargetFileSystem().getUri().getPath();
if("".equals(linkedPath)) {
linkedPath = "/";
}
FileStatus status =
((ChRootedFileSystem)link.getTargetFileSystem())
.getMyFs().getFileStatus(new Path(linkedPath));