HDFS-7797. Add audit log for setQuota operation (Rakesh R via umamahesh)
This commit is contained in:
parent
2f0f756b26
commit
f24a56787a
@ -637,6 +637,8 @@ Release 2.7.0 - UNRELEASED
|
|||||||
HDFS-7604. Track and display failed DataNode storage locations in NameNode.
|
HDFS-7604. Track and display failed DataNode storage locations in NameNode.
|
||||||
(cnauroth)
|
(cnauroth)
|
||||||
|
|
||||||
|
HDFS-7797. Add audit log for setQuota operation (Rakesh R via umamahesh)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-7454. Reduce memory footprint for AclEntries in NameNode.
|
HDFS-7454. Reduce memory footprint for AclEntries in NameNode.
|
||||||
|
@ -3814,14 +3814,19 @@ void setQuota(String src, long nsQuota, long ssQuota, StorageType type)
|
|||||||
throws IOException {
|
throws IOException {
|
||||||
checkOperation(OperationCategory.WRITE);
|
checkOperation(OperationCategory.WRITE);
|
||||||
writeLock();
|
writeLock();
|
||||||
|
boolean success = false;
|
||||||
try {
|
try {
|
||||||
checkOperation(OperationCategory.WRITE);
|
checkOperation(OperationCategory.WRITE);
|
||||||
checkNameNodeSafeMode("Cannot set quota on " + src);
|
checkNameNodeSafeMode("Cannot set quota on " + src);
|
||||||
FSDirAttrOp.setQuota(dir, src, nsQuota, ssQuota, type);
|
FSDirAttrOp.setQuota(dir, src, nsQuota, ssQuota, type);
|
||||||
|
success = true;
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
|
if (success) {
|
||||||
|
getEditLog().logSync();
|
||||||
|
}
|
||||||
|
logAuditEvent(success, "setQuota", src);
|
||||||
}
|
}
|
||||||
getEditLog().logSync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Persist all metadata about this file.
|
/** Persist all metadata about this file.
|
||||||
|
Loading…
Reference in New Issue
Block a user