hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umamah...@apache.org
Subject hadoop git commit: HDFS-7797. Add audit log for setQuota operation (Rakesh R via umamahesh)
Date Tue, 17 Feb 2015 14:42:14 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 2f0f756b2 -> f24a56787


HDFS-7797. Add audit log for setQuota operation (Rakesh R via umamahesh)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f24a5678
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f24a5678
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f24a5678

Branch: refs/heads/trunk
Commit: f24a56787a15e89a7c1e777b8043ab9ae8792505
Parents: 2f0f756
Author: Uma Maheswara Rao G <umamahesh@apache.org>
Authored: Tue Feb 17 20:11:11 2015 +0530
Committer: Uma Maheswara Rao G <umamahesh@apache.org>
Committed: Tue Feb 17 20:11:11 2015 +0530

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                   | 2 ++
 .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java  | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f24a5678/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 8b234fe..fcf5994 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -637,6 +637,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.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f24a5678/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
index 84ab179..06d7bd0 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
@@ -3814,14 +3814,19 @@ 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);
     }
-    getEditLog().logSync();
   }
 
   /** Persist all metadata about this file.


Mime
View raw message