New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDFS-15516.Add info for create flags in NameNode audit logs. #2281
base: trunk
Are you sure you want to change the base?
Conversation
💔 -1 overall
This message was automatically generated. |
7c9997e
to
486b544
Compare
💔 -1 overall
This message was automatically generated. |
486b544
to
caa5b79
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
caa5b79
to
e0997f7
Compare
💔 -1 overall
This message was automatically generated. |
@@ -2639,10 +2639,11 @@ HdfsFileStatus startFile(String src, PermissionStatus permissions, | |||
createParent, replication, blockSize, supportedVersions, ecPolicyName, | |||
storagePolicy, logRetryCache); | |||
} catch (AccessControlException e) { | |||
logAuditEvent(false, "create", src); | |||
logAuditEvent(false, "create(options=" + flag.toString() + ")", src); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we leave a space after "create" so it is consistent with rename? e.g., "create (options=..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your suggestion.
I will modify it.
final FileSystem fs = cluster.getFileSystem(); | ||
final Path p = new Path("/debug.log"); | ||
FSDataOutputStream stm = fs.create(p); | ||
assertTrue(auditlog.getOutput().contains("create(options")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we test a few more cases? e.g., with or without flag, and check whether the content of the flag is actually logged correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your suggestion.
I will modify it.
e0997f7
to
10afd5d
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
10afd5d
to
c6c5b39
Compare
💔 -1 overall
This message was automatically generated. |
c6c5b39
to
e667f64
Compare
🎊 +1 overall
This message was automatically generated. |
@ayushtkn, I made some changes, can you review it? |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
NOTICE
Please create an issue in ASF JIRA before opening a pull request,
and you need to set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in YYY.)
For more details, please see https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute