HADOOP-19548: [ABFS] Fix Logging in FSDataInputStream to Mention Correct Buffersize#7642
Conversation
|
💔 -1 overall
This message was automatically generated. |
anujmodi2021
left a comment
There was a problem hiding this comment.
LGTM. Just a minor suggestion for logging.
| public FSDataInputStream open(final Path path, final int bufferSize) throws IOException { | ||
| LOG.debug("AzureBlobFileSystem.open path: {} bufferSize: {}", path, bufferSize); | ||
| // bufferSize is unused. | ||
| LOG.debug("AzureBlobFileSystem.open path: {} bufferSize: {}", path, |
There was a problem hiding this comment.
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.
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.
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.
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.
Let's use constants here like "ONE_MB"
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
e2ff769 to
8df1b5b
Compare
|
🎊 +1 overall
This message was automatically generated. |
…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.