Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8176

Record from/to snapshots in audit log for snapshot diff report

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: snapshots
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Provide information about the snapshots compared in audit log.
      In current code value "null" is been passed.

      logAuditEvent(diffs != null, "computeSnapshotDiff", null, null, null);
      
      2015-04-15 09:56:49,328 INFO FSNamesystem.audit: allowed=true   ugi=Rex (auth:SIMPLE)   ip=/XXXXXXXXX        cmd=computeSnapshotDiff src=null        dst=null        perm=null       proto=rpc
      
      1. HDFS-8176.1.patch
        1 kB
        J.Andreina
      2. HDFS-8176.2.patch
        1 kB
        J.Andreina

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2124 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2124/)
        HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2124 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2124/ ) HDFS-8176 . Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #175 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/175/)
        HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #175 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/175/ ) HDFS-8176 . Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Hide
        aw Allen Wittenauer added a comment -

        Err, what's the value of doing this? Does doing a snapshot compare actually change the data on HDFS? If no, then this shouldn't be in the audit log.

        Show
        aw Allen Wittenauer added a comment - Err, what's the value of doing this? Does doing a snapshot compare actually change the data on HDFS? If no, then this shouldn't be in the audit log.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #165 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/165/)
        HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #165 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/165/ ) HDFS-8176 . Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2106 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2106/)
        HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2106 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2106/ ) HDFS-8176 . Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #908 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/908/)
        HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #908 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/908/ ) HDFS-8176 . Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #174 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/174/)
        HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #174 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/174/ ) HDFS-8176 . Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #7664 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7664/)
        HDFS-8176. Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7664 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7664/ ) HDFS-8176 . Record from/to snapshots in audit log for snapshot diff report. Contributed by J. Andreina. (jing9: rev cf6c8a1b4ee70dd45c2e42ac61999e61a05db035) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        jingzhao Jing Zhao added a comment -

        The patch looks good to me. +1. Thanks J.Andreina for the contributions!

        I've committed this to trunk and branch-2.

        Show
        jingzhao Jing Zhao added a comment - The patch looks good to me. +1. Thanks J.Andreina for the contributions! I've committed this to trunk and branch-2.
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 15m 2s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 tests included 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 javac 7m 49s There were no new javac warning messages.
        +1 javadoc 9m 45s There were no new javadoc warning messages.
        +1 release audit 0m 24s The applied patch does not increase the total number of release audit warnings.
        -1 checkstyle 5m 34s The applied patch generated 1 additional checkstyle issues.
        +1 install 1m 34s mvn install still works.
        +1 eclipse:eclipse 0m 38s The patch built with eclipse:eclipse.
        +1 findbugs 3m 10s The patch does not introduce any new Findbugs (version 2.0.3) warnings.
        +1 native 3m 16s Pre-build of native portion
        -1 hdfs tests 167m 14s Tests failed in hadoop-hdfs.
            214m 33s  



        Reason Tests
        Failed unit tests hadoop.hdfs.server.namenode.TestDiskspaceQuotaUpdate
        Timed out tests org.apache.hadoop.hdfs.TestParallelUnixDomainRead



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12727864/HDFS-8176.2.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / c8d7290
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/10368/artifact/patchprocess/checkstyle-result-diff.txt
        hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/10368/artifact/patchprocess/testrun_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/10368/testReport/
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/10368/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 15m 2s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. -1 tests included 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 javac 7m 49s There were no new javac warning messages. +1 javadoc 9m 45s There were no new javadoc warning messages. +1 release audit 0m 24s The applied patch does not increase the total number of release audit warnings. -1 checkstyle 5m 34s The applied patch generated 1 additional checkstyle issues. +1 install 1m 34s mvn install still works. +1 eclipse:eclipse 0m 38s The patch built with eclipse:eclipse. +1 findbugs 3m 10s The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 native 3m 16s Pre-build of native portion -1 hdfs tests 167m 14s Tests failed in hadoop-hdfs.     214m 33s   Reason Tests Failed unit tests hadoop.hdfs.server.namenode.TestDiskspaceQuotaUpdate Timed out tests org.apache.hadoop.hdfs.TestParallelUnixDomainRead Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12727864/HDFS-8176.2.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / c8d7290 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/10368/artifact/patchprocess/checkstyle-result-diff.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/10368/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/10368/testReport/ Console output https://builds.apache.org/job/PreCommit-HDFS-Build/10368/console This message was automatically generated.
        Hide
        andreina J.Andreina added a comment -

        Thanks Jing Zhao for reviewing the patch.
        I have updated the patch as per your comments.
        Please review.

        Show
        andreina J.Andreina added a comment - Thanks Jing Zhao for reviewing the patch. I have updated the patch as per your comments. Please review.
        Hide
        jingzhao Jing Zhao added a comment -

        Thanks for working on this, J.Andreina! The patch looks good to me overall. Just one minor: currently the parameter fromSnapshot/toSnapshot can be null or empty, which indicates the current path (i.e., the non-snapshot path). Thus we need to check this case when computing the src/dst for audit log.

        Show
        jingzhao Jing Zhao added a comment - Thanks for working on this, J.Andreina ! The patch looks good to me overall. Just one minor: currently the parameter fromSnapshot / toSnapshot can be null or empty, which indicates the current path (i.e., the non-snapshot path). Thus we need to check this case when computing the src/dst for audit log.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12726157/HDFS-8176.1.patch
        against trunk revision d52de61.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.server.namenode.TestFileTruncate

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/10328//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/10328//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12726157/HDFS-8176.1.patch against trunk revision d52de61. +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.namenode.TestFileTruncate Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/10328//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/10328//console This message is automatically generated.
        Hide
        andreina J.Andreina added a comment -

        Attached an initial patch.
        Please review.

        Show
        andreina J.Andreina added a comment - Attached an initial patch. Please review.

          People

          • Assignee:
            andreina J.Andreina
            Reporter:
            andreina J.Andreina
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development