-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-25363 Improve performance of HFileLinkCleaner by using ReadWrit… #2738
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
LGTM |
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.
Just some minor nit, can fix or not.
if (HFileLink.isHFileLink(filePath)) return true; | ||
public boolean isFileDeletable(FileStatus fStat) { | ||
try { | ||
lock.readLock().lock(); |
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.
Usually we will put this line before the try block.
public boolean isFileDeletable(FileStatus fStat) { | ||
try { | ||
lock.readLock().lock(); | ||
if (this.fs == null) return false; |
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.
nits: add '{}' to hold the 'return false;' block to fix a checkstyle warning.
if (this.fs == null) return false; | ||
Path filePath = fStat.getPath(); | ||
// HFile Link is always deletable | ||
if (HFileLink.isHFileLink(filePath)) return true; |
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.
Ditto.
super.setConf(conf); | ||
|
||
// setup filesystem | ||
try { | ||
lock.writeLock().lock(); |
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.
Better move this line before the try block.
🎊 +1 overall
This message was automatically generated. |
Please fix the checkstyle issue? Looks like they are all line length too long, the width should 100, not 120. |
🎊 +1 overall
This message was automatically generated. |
now here are three commits, It should be only one commit |
Ah, this is not a problem. Just choose 'Squash and merge' when merging the PR, and modify the commit message accordingly. |
…eLock instead of synchronize
Thanks for reviewing @Apache9 @nyl3532016 . I have fixed the checkstyle issue and merged the commits to one(to make merging simple and conveniently). |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…eLock instead of synchronize Closes #2738 Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Yulin Niu <niuyulin@apache.org>
…eLock instead of synchronize