-
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-23584 : Descrease rpc getFileStatus count when open a storefile #1380
Conversation
💔 -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.
Patch is looking good. Some nits in below.
this.createdTimestamp = fStatus.getModificationTime(); | ||
this.size = fStatus.getLen(); | ||
this.localStatus = fileStatus; | ||
}else{ |
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.
Please keep the style of the surrounding file; i.e. space between '}' and 'else' and after.
this.reference = null; | ||
this.link = null; | ||
} else { | ||
throw new IOException("path=" + p + " doesn't look like a valid StoreFile"); | ||
} | ||
if(this.localStatus == null ){ |
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.
See how spacing is done in rest of the file.
@@ -350,49 +393,18 @@ private HDFSBlocksDistribution computeHDFSBlocksDistributionInternal(final FileS | |||
} | |||
} | |||
|
|||
|
|||
|
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 of these.
status = fs.getFileStatus(initialPath); | ||
} | ||
if(null == this.localStatus){ | ||
throw new IOException("localStatus is not initialize on construct"); |
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 want to add name of file to this message if available?
Spacing.
💔 -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. |
🎊 +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. |
TestStoreFileInfo class throw FileNotFoundException is right ? I see comment like this "Test file link exception" there . |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
I think this is an useful improvement. Seems the UT failures are related? Any progress here? Thanks. |
@Apache9 TestStoreFileInfo.java need to change a little after i put localstatus to construct . I will modify TestStoreFileInfo soon . |
💔 -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. |
status = link.getFileStatus(fs); | ||
} catch (FileNotFoundException ex) { | ||
// try the other location | ||
throw ex; |
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 throw ex it will have no chance to try the other location, see the old code, it should keep the behave with old code.
this.reference = null; | ||
this.link = null; | ||
} else { | ||
throw new IOException("path=" + p + " doesn't look like a valid StoreFile"); | ||
} | ||
if(this.localStatus == null){ |
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.
Should format the code.
💔 -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. |
How can i reslove the UT failure "Failed to read test report file ..." ? |
@HuiHang-Yu Those kind of failures are often the test crashing out not writing the xml report properly... Its a while since this PR ran. Try a new push to trip the UTs again? |
Closing. Replacing w/ refresh #3596 |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Actually close |
I close the PR #958 for mistaking push too many commits after correcting my code serveral times .