-
Notifications
You must be signed in to change notification settings - Fork 9k
HADOOP-19548: [ABFS] Fix Logging in FSDataInputStream to Mention Correct Buffersize #7642
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. |
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.
LGTM. Just a minor suggestion for logging.
// bufferSize is unused. | ||
LOG.debug("AzureBlobFileSystem.open path: {} bufferSize: {}", path, |
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.
Trying to understand this from a user's perspective. If someone is calling this method with a buffer size they expect that buffer size to get honoured and if they really want that buffer size to be honored they should know how to make that happen.
Let's add debug something like this: AzureBlobFileSystem.open path: {} bufferSize as configured in "fs.azure.read.request.size": {}", path, abfsStore.getAbfsConfiguration().getReadBufferSize())
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.
Makes sense, taken
We might need to add some tests to pass the Yetus checks. You can verify that whatever parameter we pass, the buffer size is always what is configured. |
|
||
abfsConfig.setReadBufferSize(bufferSizeConfig); | ||
fs.open(testPath, bufferSizeArg); | ||
int actualBufferSize = abfsConfig.getReadBufferSize(); |
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.
To assert we should take bufer size from the FSDataInputStream not the configs.
Configs we are only setting so that is bound to be same
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.
Makes sense, corrected
public void testBufferSizeSet() throws Exception { | ||
final AzureBlobFileSystem fs = getFileSystem(); | ||
AbfsConfiguration abfsConfig = fs.getAbfsStore().getAbfsConfiguration(); | ||
int bufferSizeConfig = 5 * 1024 * 1024; |
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 use constants here like "ONE_MB"
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.
Taken
🎊 +1 overall
This message was automatically generated. |
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java
Outdated
Show resolved
Hide resolved
...ools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestFileSystemProperties.java
Outdated
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
e2ff769
to
8df1b5b
Compare
🎊 +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.
LGTM +1
…ect Buffersize (apache#7642) Contributed by: Manika Joshi
Description of PR
JIRA: https://issues.apache.org/jira/browse/HADOOP-19548
Small change to fix logging in FSDataInputStream and mention the correct buffersize being used.
How was this patch tested?
No production change made- only changed the logging. Test runs not required.