-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
HADOOP-18156. Address JavaDoc warnings in classes like MarkerTool, S3ObjectAttributes, etc #4965
Conversation
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.
One nit-pick comment. With that resolved, lgtm.
public ScanArgsBuilder withLimit(final int l) { | ||
this.limit = l; | ||
return this; | ||
} | ||
|
||
/** Consider only markers in nonauth paths as errors. */ | ||
/** Consider only markers in non-authoritative paths as errors. | ||
* @param b True if tool should only consider markers in non-authoritative paths |
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.
nit: indentation
can you drop the extra space from this line, commit, and push?
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.
+1 (non-binding) assuming Yetus is happy, lgtm! Thanks for this @sauraank.
Hey @mukund-thakur, do you have time this week to review this? |
💔 -1 overall
This message was automatically generated. |
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.
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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.
+1 (non-binding). Yetus only complains about no test changes, that's fine since we changed no code.
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.
looks good. Just some minor comments post that will merge. Thanks @sauraank for picking this up.
@@ -37,6 +37,7 @@ | |||
import com.amazonaws.services.s3.model.MultiObjectDeleteException; | |||
import org.apache.hadoop.classification.VisibleForTesting; | |||
import org.apache.hadoop.util.Preconditions; | |||
|
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.
Let's not add a new line here. Will cause backporting issue.
@@ -960,43 +960,64 @@ public static final class ScanArgsBuilder { | |||
/** Consider only markers in nonauth paths as errors. */ | |||
private boolean nonAuth = false; | |||
|
|||
/** Source FS; must be or wrap an S3A FS. */ | |||
/** Source FS; must be or wrap an S3A FS. |
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.
the comment should start in newline not in the **. The same goes for all the comments below at multiple places.
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.
Do you think it's a good idea adding this to CheckStyle?
This one looks relevant (though maybe it will flag a lot of existing files): https://checkstyle.sourceforge.io/config_javadoc.html#JavadocContentLocation
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.
Started all the comments from new line MarkerTool.java. Thanks Mukund and Danny for the feedback.
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.
Let's not change the check style as yes it will flag many issues.
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.
Well, when there is a single line comment we don't need a new line but a new line is required when there are multiple lines comments as explained in the check style rule sent by Danny. This is based on my observation in the Apache Hadoop codebase.
Although I think the current changes should be okay, will confirm with @steveloughran once and commit.
Sorry for not being clear before.
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.
Let's not change the check style as yes it will flag many issues.
It will flag issues, but maybe worth it to avoid needing to add this sort of feedback in future.
Let Yetus tell us before we review.
If we were to consider it, I'd propose to do it:
- In a separate PR / task so we can acknowledge "yes this is adding new warnings".
- Only for
hadoop-aws
module.
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.
Sure we can try only for hadoop-aws module.
💔 -1 overall
This message was automatically generated. |
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.
-1 to splitting one line javadoc description of fields; that's a common style used throughout the codebase and other apps.
for methods with @return values, different story, and makes sense if the javadoc tool is happy.
do view this stuff in intellij set to format javadocs, if you haven't already. it will show why
elements do make a big difference in readability of formatted docs.
@@ -34,20 +34,20 @@ | |||
* Tracks directory markers which have been reported in object listings. | |||
* This is needed for auditing and cleanup, including during rename | |||
* operations. | |||
* <p></p> | |||
* |
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.
these should actually be
without the closing element, but retained.
if you set your IDE to format javadocs, it will then preserve the line break
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 Steve! Will work on your recommended changes.
/** Number of markers deleted. */ | ||
/** | ||
* Number of markers deleted. | ||
*/ |
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.
no need to do this for fields; leave as is
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@steveloughran thanks for the review. I have made the changes of keeping the one line comment for fields. I have also added the tag for new line in JavaDoc. |
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 working in the feedback, @sauraank.
+1 (non-binding)
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.
+1, merging.
@@ -34,20 +34,20 @@ | |||
* Tracks directory markers which have been reported in object listings. | |||
* This is needed for auditing and cleanup, including during rename | |||
* operations. | |||
* <p></p> | |||
* <p> |
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.
these are all good
@@ -840,6 +846,7 @@ public void setVerbose(final boolean verbose) { | |||
* Execute the marker tool, with no checks on return codes. | |||
* | |||
* @param scanArgs set of args for the scanner. | |||
* @throws IOException IO failure |
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 you put this below the @return line?
…ObjectAttributes, etc (apache#4965) Contributed by Ankit Saurabh
…ObjectAttributes, etc (#4965) Contributed by Ankit Saurabh
…ObjectAttributes, etc (apache#4965) Contributed by Ankit Saurabh
Description of PR
Fixed the Javadoc warnings that were there in MarkerTool.java, DirectoryPolicy.java, DirMarkerTracker.java and OperationCallbacks.java
How was this patch tested?
Checked the JavaDoc warnings during build