-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-17720. Replace Guava Sets usage by Hadoop's own Sets in hadoop-hdfs-project #3031
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
Conversation
💔 -1 overall
This message was automatically generated. |
277e007
to
71d1f07
Compare
💔 -1 overall
This message was automatically generated. |
|
Ah, I see. Thanks @tasanuma. Shall we remove |
71d1f07
to
dfe5ecf
Compare
|
@virajjasani Thanks for your investigation. Let's create another jira for removing |
@virajjasani It would be a lot of work, but I think import sentences should be written in alphabetical order as much as possible. I mean |
Sure @tasanuma. Created HDFS-16035 and working on rearranging imports. |
dfe5ecf
to
ca88448
Compare
Done @tasanuma. Please take a look, I will rearrange imports in other 2 relevant PRs in the meanwhile. |
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.
We don't need to break lines here since the 80-length rule does not apply to import statements.
ca88448
to
603cb32
Compare
@virajjasani Thanks for updating it quickly. +1 on the latest commit, pending Jenkins. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
} | ||
|
||
TreeSet<Long> imageTxIds = Sets.newTreeSet(Collections.reverseOrder()); | ||
TreeSet<Long> imageTxIds = new TreeSet<>(Collections.reverseOrder()); |
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.
Note: It is recommended to use the TreeSet constructor directly.
https://github.com/google/guava/blob/v30.1.1/guava/src/com/google/common/collect/Sets.java#L399-L403
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.
That's correct. Hence, I have also created this follow-up Jira HADOOP-17726 for the same so that empty set constructors can be directly created.
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 failed test is not related. +1.
Merged. Thanks for your contribution, @virajjasani. |
…pache#3031) Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
No description provided.