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-25324 Remove unnecessary array to list conversion in SplitLogManager #2703
Conversation
🎊 +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. |
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
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
FileStatus[] logfiles = getFileList(logDirs, filter); | ||
if (logfiles.length != 0) { | ||
List<FileStatus> logfiles = getFileList(logDirs, filter); | ||
if (logfiles.size() != 0) { |
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.
s/logfiles.size != 0/logfiles.isEmpty()/
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.
Nice, I will use CollectionUtils.isNotEmpty
instead
SplitLogManager.getFileList(conf, Collections.singletonList(walsDir), null); | ||
List<Path> splits = new ArrayList<>(); | ||
if (ArrayUtils.isNotEmpty(wals)) { | ||
if (CollectionUtils.isNotEmpty(wals)) { |
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.
wals.isEmpty()?
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 logic here: if wals is not (empty or null), we will do the following loop, so i can't clearly figure out your meaning, could you description it in detail ?
🎊 +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. |
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
🎊 +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. |
💔 -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. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
…nager (#2703) Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: stack <stack@apache.com>
…nager