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