HDFS-7797. Add audit log for setQuota operation (Rakesh R via umamahesh)
(cherry picked from commit f24a56787a
)
This commit is contained in:
parent
00fb0710b6
commit
35fecb5306
|
@ -344,6 +344,8 @@ Release 2.7.0 - UNRELEASED
|
|||
HDFS-7604. Track and display failed DataNode storage locations in NameNode.
|
||||
(cnauroth)
|
||||
|
||||
HDFS-7797. Add audit log for setQuota operation (Rakesh R via umamahesh)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-7454. Reduce memory footprint for AclEntries in NameNode.
|
||||
|
|
|
@ -3813,15 +3813,20 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|||
throws IOException {
|
||||
checkOperation(OperationCategory.WRITE);
|
||||
writeLock();
|
||||
boolean success = false;
|
||||
try {
|
||||
checkOperation(OperationCategory.WRITE);
|
||||
checkNameNodeSafeMode("Cannot set quota on " + src);
|
||||
FSDirAttrOp.setQuota(dir, src, nsQuota, ssQuota, type);
|
||||
success = true;
|
||||
} finally {
|
||||
writeUnlock();
|
||||
}
|
||||
if (success) {
|
||||
getEditLog().logSync();
|
||||
}
|
||||
logAuditEvent(success, "setQuota", src);
|
||||
}
|
||||
}
|
||||
|
||||
/** Persist all metadata about this file.
|
||||
* @param src The string representation of the path
|
||||
|
|
Loading…
Reference in New Issue