hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject hadoop git commit: HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina.
Date Fri, 24 Apr 2015 17:23:44 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk eee9facbb -> cf6c8a1b4


HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by
J. Andreina.


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

Branch: refs/heads/trunk
Commit: cf6c8a1b4ee70dd45c2e42ac61999e61a05db035
Parents: eee9fac
Author: Jing Zhao <jing9@apache.org>
Authored: Fri Apr 24 10:23:32 2015 -0700
Committer: Jing Zhao <jing9@apache.org>
Committed: Fri Apr 24 10:23:32 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/hadoop/blob/cf6c8a1b/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 56f8ec3..1cc31b2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -472,6 +472,9 @@ Release 2.8.0 - UNRELEASED
 
     HDFS-8052. Move WebHdfsFileSystem into hadoop-hdfs-client. (wheat9)
 
+    HDFS-8176. Record from/to snapshots in audit log for snapshot diff report.
+    (J. Andreina via jing9)
+
   OPTIMIZATIONS
 
     HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

http://git-wip-us.apache.org/repos/asf/hadoop/blob/cf6c8a1b/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 4477dc4..229c4d1 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
@@ -7406,8 +7406,12 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
     } finally {
       readUnlock();
     }
-
-    logAuditEvent(diffs != null, "computeSnapshotDiff", null, null, null);
+    String fromSnapshotRoot = (fromSnapshot == null || fromSnapshot.isEmpty()) ?
+        path : Snapshot.getSnapshotPath(path, fromSnapshot);
+    String toSnapshotRoot = (toSnapshot == null || toSnapshot.isEmpty()) ?
+        path : Snapshot.getSnapshotPath(path, toSnapshot);
+    logAuditEvent(diffs != null, "computeSnapshotDiff", fromSnapshotRoot,
+        toSnapshotRoot, null);
     return diffs;
   }
   


Mime
View raw message