|
@@ -1982,6 +1982,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -2012,6 +2013,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -2039,6 +2041,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
GetBlockLocationsResult res = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
final INode inode;
|
|
|
try {
|
|
|
readLock();
|
|
@@ -2149,6 +2152,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "concat";
|
|
|
FileStatus stat = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
try {
|
|
|
writeLock();
|
|
@@ -2178,6 +2182,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -2220,6 +2225,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
}
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
writeLock();
|
|
|
BlocksMapUpdateInfo toRemoveBlocks = new BlocksMapUpdateInfo();
|
|
|
try {
|
|
@@ -2255,6 +2261,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
}
|
|
|
FileStatus auditStat = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -2293,6 +2300,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
boolean success = false;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -2326,6 +2334,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -2408,6 +2417,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -2435,6 +2445,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
BlockStoragePolicy getStoragePolicy(String src) throws IOException {
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(null);
|
|
|
readLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.READ);
|
|
@@ -2462,6 +2473,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
long getPreferredBlockSize(String src) throws IOException {
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(null);
|
|
|
readLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.READ);
|
|
@@ -2575,6 +2587,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(null);
|
|
|
writeLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
@@ -2670,6 +2683,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
boolean skipSync = false;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(null);
|
|
|
writeLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
@@ -2810,6 +2824,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
LastBlockWithStatus lbs = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
writeLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
@@ -2866,6 +2881,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FSDirWriteFileOp.ValidateAddBlockResult r;
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
readLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.READ);
|
|
@@ -2916,6 +2932,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final BlockType blockType;
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(null);
|
|
|
readLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.READ);
|
|
@@ -2964,6 +2981,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
"BLOCK* NameSystem.abandonBlock: {} of file {}", b, src);
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(null);
|
|
|
writeLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
@@ -3029,6 +3047,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
boolean success = false;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(null);
|
|
|
writeLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
@@ -3108,6 +3127,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FSDirRenameOp.RenameResult ret = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -3136,6 +3156,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FSDirRenameOp.RenameResult res = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -3175,6 +3196,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
BlocksMapUpdateInfo toRemovedBlocks = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
boolean ret = false;
|
|
|
try {
|
|
|
writeLock();
|
|
@@ -3283,6 +3305,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
HdfsFileStatus stat = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -3307,6 +3330,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "isFileClosed";
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
boolean success = false;
|
|
|
try {
|
|
|
readLock();
|
|
@@ -3335,6 +3359,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -3373,6 +3398,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "contentSummary";
|
|
|
ContentSummary cs;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -3408,6 +3434,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "quotaUsage";
|
|
|
QuotaUsage quotaUsage;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -3439,6 +3466,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final String operationName = getQuotaCommand(nsQuota, ssQuota);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
checkSuperuserPrivilege(pc);
|
|
|
writeLock();
|
|
@@ -3471,6 +3499,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
NameNode.stateChangeLog.info("BLOCK* fsync: " + src + " for " + clientName);
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(null);
|
|
|
writeLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
@@ -3973,6 +4002,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "listStatus";
|
|
|
DirectoryListing dl = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -6793,6 +6823,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "createSnapshot";
|
|
|
String snapshotPath = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -6829,6 +6860,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
String oldSnapshotRoot = Snapshot.getSnapshotPath(path, snapshotOldName);
|
|
|
String newSnapshotRoot = Snapshot.getSnapshotPath(path, snapshotNewName);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -6862,6 +6894,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
SnapshottableDirectoryStatus[] status = null;
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -6905,6 +6938,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
String toSnapshotRoot = (toSnapshot == null || toSnapshot.isEmpty()) ?
|
|
|
path : Snapshot.getSnapshotPath(path, toSnapshot);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
long actualTime = Time.monotonicNow();
|
|
|
try {
|
|
|
readLock();
|
|
@@ -6978,6 +7012,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
(toSnapshot == null || toSnapshot.isEmpty()) ? path :
|
|
|
Snapshot.getSnapshotPath(path, toSnapshot);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -7012,6 +7047,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
String rootPath = null;
|
|
|
BlocksMapUpdateInfo blocksToBeDeleted = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
try {
|
|
|
writeLock();
|
|
@@ -7307,6 +7343,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
cacheManager.waitForRescanIfNeeded();
|
|
|
}
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -7334,6 +7371,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
if (!flags.contains(CacheFlag.FORCE)) {
|
|
|
cacheManager.waitForRescanIfNeeded();
|
|
|
}
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
try {
|
|
|
writeLock();
|
|
@@ -7359,6 +7397,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "removeCacheDirective";
|
|
|
String idStr = "{id: " + Long.toString(id) + "}";
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -7381,6 +7420,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
long startId, CacheDirectiveInfo filter) throws IOException {
|
|
|
final String operationName = "listCacheDirectives";
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
BatchedListEntries<CacheDirectiveEntry> results;
|
|
|
cacheManager.waitForRescanIfNeeded();
|
|
|
try {
|
|
@@ -7482,6 +7522,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "listCachePools";
|
|
|
BatchedListEntries<CachePoolEntry> results;
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
cacheManager.waitForRescanIfNeeded();
|
|
|
try {
|
|
|
readLock();
|
|
@@ -7505,6 +7546,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -7528,6 +7570,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
FileStatus auditStat = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -7550,6 +7593,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -7572,6 +7616,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -7594,6 +7639,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -7616,6 +7662,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final AclStatus ret;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -7652,6 +7699,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
Metadata metadata = FSDirEncryptionZoneOp.ensureKeyIsInitialized(dir,
|
|
|
keyName, src);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
checkSuperuserPrivilege(pc);
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
writeLock();
|
|
@@ -7685,6 +7733,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus resultingStat = null;
|
|
|
EncryptionZone encryptionZone;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
try {
|
|
|
readLock();
|
|
@@ -7711,6 +7760,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
boolean success = false;
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
checkSuperuserPrivilege(pc);
|
|
|
readLock();
|
|
|
try {
|
|
@@ -7748,6 +7798,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
boolean success = false;
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
checkSuperuserPrivilege(pc);
|
|
|
readLock();
|
|
|
try {
|
|
@@ -7834,6 +7885,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkErasureCodingSupported(operationName);
|
|
|
FileStatus resultingStat = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
writeLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
@@ -8002,6 +8054,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkErasureCodingSupported(operationName);
|
|
|
FileStatus resultingStat = null;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
writeLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
@@ -8067,6 +8120,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
checkErasureCodingSupported(operationName);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
readLock();
|
|
|
try {
|
|
|
checkOperation(OperationCategory.READ);
|
|
@@ -8129,6 +8183,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -8153,6 +8208,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
List<XAttr> fsXattrs;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -8174,6 +8230,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
List<XAttr> fsXattrs;
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|
|
@@ -8196,6 +8253,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
FileStatus auditStat = null;
|
|
|
checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -8241,6 +8299,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
final String operationName = "checkAccess";
|
|
|
checkOperation(OperationCategory.READ);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
+ FSPermissionChecker.setOperationType(operationName);
|
|
|
try {
|
|
|
readLock();
|
|
|
try {
|