HDFS-16085. Move the getPermissionChecker out of the read lock (#3134). Contributed by tomscut.
Signed-off-by: Takanobu Asanuma <tasanuma@apache.org> Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
parent
5fc61d2e56
commit
4ca49fcd44
|
@ -573,10 +573,11 @@ public class NamenodeFsck implements DataEncryptionKeyFactory {
|
|||
final FSNamesystem fsn = namenode.getNamesystem();
|
||||
final String operationName = "fsckGetBlockLocations";
|
||||
FSPermissionChecker.setOperationType(operationName);
|
||||
FSPermissionChecker pc = fsn.getPermissionChecker();
|
||||
fsn.readLock();
|
||||
try {
|
||||
blocks = FSDirStatAndListingOp.getBlockLocations(
|
||||
fsn.getFSDirectory(), fsn.getPermissionChecker(),
|
||||
fsn.getFSDirectory(), pc,
|
||||
path, 0, fileLen, false)
|
||||
.blocks;
|
||||
} catch (FileNotFoundException fnfe) {
|
||||
|
|
Loading…
Reference in New Issue