[ 
https://issues.apache.org/jira/browse/HDFS-15516?focusedWorklogId=484875&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-484875
 ]

ASF GitHub Bot logged work on HDFS-15516:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Sep/20 02:15
            Start Date: 16/Sep/20 02:15
    Worklog Time Spent: 10m 
      Work Description: jianghuazhu commented on a change in pull request #2281:
URL: https://github.com/apache/hadoop/pull/2281#discussion_r489120569



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogger.java
##########
@@ -231,6 +232,30 @@ public void testAuditLoggerWithSetPermission() throws 
IOException {
     }
   }
 
+  @Test
+  public void testAuditLoggerWithCreateFlag() throws IOException {
+    final Configuration conf = new HdfsConfiguration();
+    final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
+    LogCapturer auditlog = LogCapturer.captureLogs(FSNamesystem.auditLog);
+    try {
+      cluster.waitClusterUp();
+      auditlog.clearOutput();
+      final FileSystem fs = cluster.getFileSystem();
+      final Path p = new Path("/debug.log");
+      FSDataOutputStream stm = fs.create(p);
+      assertTrue(auditlog.getOutput().contains("create(options"));

Review comment:
       thanks for your suggestion.
   I will modify it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 484875)
    Time Spent: 1.5h  (was: 1h 20m)

> Add info for create flags in NameNode audit logs
> ------------------------------------------------
>
>                 Key: HDFS-15516
>                 URL: https://issues.apache.org/jira/browse/HDFS-15516
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>            Reporter: Shashikant Banerjee
>            Assignee: jianghua zhu
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HDFS-15516.001.patch, HDFS-15516.002.patch, 
> HDFS-15516.003.patch, HDFS-15516.004.patch
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Currently, if file create happens with flags like overwrite , the audit logs 
> doesn't seem to contain the info regarding the flags in the audit logs. It 
> would be useful to add info regarding the create options in the audit logs 
> similar to Rename ops. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to