static SnapshottableDirectoryStatus[] getSnapshottableDirListing( FSDirectory fsd, FSPermissionChecker pc, SnapshotManager snapshotManager) throws IOException { fsd.readLock(); try { final String user = pc.isSuperUser()? null : pc.getUser(); return snapshotManager.getSnapshottableDirListing(user); } finally { fsd.readUnlock(); } }
static SnapshottableDirectoryStatus[] getSnapshottableDirListing( FSDirectory fsd, SnapshotManager snapshotManager) throws IOException { FSPermissionChecker pc = fsd.getPermissionChecker(); fsd.readLock(); try { final String user = pc.isSuperUser()? null : pc.getUser(); return snapshotManager.getSnapshottableDirListing(user); } finally { fsd.readUnlock(); } }
static SnapshottableDirectoryStatus[] getSnapshottableDirListing( FSDirectory fsd, SnapshotManager snapshotManager) throws IOException { FSPermissionChecker pc = fsd.getPermissionChecker(); fsd.readLock(); try { final String user = pc.isSuperUser()? null : pc.getUser(); return snapshotManager.getSnapshottableDirListing(user); } finally { fsd.readUnlock(); } }
.getSnapshottableDirListing(null); assertEquals(root, sdirs[0].getFullPath());