Fixed a checkstyle and few review comments
This commit is contained in:
parent
2c55c9a5cf
commit
2d2ec00ca3
|
@ -1116,7 +1116,7 @@ public class ViewFileSystem extends FileSystem {
|
||||||
final long creationTime; // of the the mount table
|
final long creationTime; // of the the mount table
|
||||||
final UserGroupInformation ugi; // the user/group of user who created mtable
|
final UserGroupInformation ugi; // the user/group of user who created mtable
|
||||||
final URI myUri;
|
final URI myUri;
|
||||||
final boolean showMountLinksAsSymlinks;
|
private final boolean showMountLinksAsSymlinks;
|
||||||
|
|
||||||
public InternalDirOfViewFs(final InodeTree.INodeDir<FileSystem> dir,
|
public InternalDirOfViewFs(final InodeTree.INodeDir<FileSystem> dir,
|
||||||
final long cTime, final UserGroupInformation ugi, URI uri,
|
final long cTime, final UserGroupInformation ugi, URI uri,
|
||||||
|
@ -1262,10 +1262,10 @@ public class ViewFileSystem extends FileSystem {
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
result[i++] = new FileStatus(0, true, 0, 0,
|
result[i++] =
|
||||||
creationTime, creationTime, PERMISSION_555,
|
new FileStatus(0, true, 0, 0, creationTime, creationTime,
|
||||||
ugi.getShortUserName(), ugi.getPrimaryGroupName(),
|
PERMISSION_555, ugi.getShortUserName(),
|
||||||
path);
|
ugi.getPrimaryGroupName(), path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fallbackStatuses.length > 0) {
|
if (fallbackStatuses.length > 0) {
|
||||||
|
|
|
@ -1056,11 +1056,10 @@ public class ViewFs extends AbstractFileSystem {
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
result[i++] = new FileStatus(0, true, 0, 0,
|
result[i++] =
|
||||||
creationTime, creationTime,
|
new FileStatus(0, true, 0, 0, creationTime, creationTime,
|
||||||
PERMISSION_555, ugi.getShortUserName(), ugi.getGroupNames()[0],
|
PERMISSION_555, ugi.getShortUserName(),
|
||||||
new Path(inode.fullPath).makeQualified(
|
ugi.getGroupNames()[0], path);
|
||||||
myUri, null));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fallbackStatuses.length > 0) {
|
if (fallbackStatuses.length > 0) {
|
||||||
|
|
|
@ -47,12 +47,14 @@ public class TestViewFsOverloadSchemeListStatus {
|
||||||
private static final File TEST_DIR =
|
private static final File TEST_DIR =
|
||||||
GenericTestUtils.getTestDir(TestViewfsFileStatus.class.getSimpleName());
|
GenericTestUtils.getTestDir(TestViewfsFileStatus.class.getSimpleName());
|
||||||
|
|
||||||
@Before public void setUp() {
|
@Before
|
||||||
|
public void setUp() {
|
||||||
FileUtil.fullyDelete(TEST_DIR);
|
FileUtil.fullyDelete(TEST_DIR);
|
||||||
assertTrue(TEST_DIR.mkdirs());
|
assertTrue(TEST_DIR.mkdirs());
|
||||||
}
|
}
|
||||||
|
|
||||||
@After public void tearDown() throws IOException {
|
@After
|
||||||
|
public void tearDown() throws IOException {
|
||||||
FileUtil.fullyDelete(TEST_DIR);
|
FileUtil.fullyDelete(TEST_DIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,11 +114,11 @@ public class TestViewFsOverloadSchemeListStatus {
|
||||||
if (status.getPath().getName().equals(fileScheme)) {
|
if (status.getPath().getName().equals(fileScheme)) {
|
||||||
assertEquals(FsPermission.valueOf("-rwxr--r--"),
|
assertEquals(FsPermission.valueOf("-rwxr--r--"),
|
||||||
status.getPermission());
|
status.getPermission());
|
||||||
assertEquals(false, status.isDirectory());
|
assertFalse(status.isDirectory());
|
||||||
} else {
|
} else {
|
||||||
assertEquals(FsPermission.valueOf("-r--rwxr--"),
|
assertEquals(FsPermission.valueOf("-r--rwxr--"),
|
||||||
status.getPermission());
|
status.getPermission());
|
||||||
assertEquals(true, status.isDirectory());
|
assertTrue(status.isDirectory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,11 +148,11 @@ public class TestViewfsFileStatus {
|
||||||
if (status.getPath().getName().equals("file")) {
|
if (status.getPath().getName().equals("file")) {
|
||||||
assertEquals(FsPermission.valueOf("-rwxr--r--"),
|
assertEquals(FsPermission.valueOf("-rwxr--r--"),
|
||||||
status.getPermission());
|
status.getPermission());
|
||||||
assertEquals(false, status.isDirectory());
|
assertFalse(status.isDirectory());
|
||||||
} else {
|
} else {
|
||||||
assertEquals(FsPermission.valueOf("-r--rwxr--"),
|
assertEquals(FsPermission.valueOf("-r--rwxr--"),
|
||||||
status.getPermission());
|
status.getPermission());
|
||||||
assertEquals(true, status.isDirectory());
|
assertTrue(status.isDirectory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue