mukund-thakur commented on code in PR #7642: URL: https://github.com/apache/hadoop/pull/7642#discussion_r2058963010
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java: ########## @@ -118,7 +118,22 @@ import static org.apache.hadoop.fs.CommonConfigurationKeys.IOSTATISTICS_LOGGING_LEVEL; import static org.apache.hadoop.fs.CommonConfigurationKeys.IOSTATISTICS_LOGGING_LEVEL_DEFAULT; import static org.apache.hadoop.fs.Options.OpenFileOptions.FS_OPTION_OPENFILE_STANDARD_OPTIONS; -import static org.apache.hadoop.fs.azurebfs.AbfsStatistic.*; +import static org.apache.hadoop.fs.azurebfs.AbfsStatistic.CALL_APPEND; Review Comment: this may cause backport pain. Is this a necessary change ########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestFileSystemProperties.java: ########## @@ -135,4 +135,23 @@ public void testSetFileSystemProperties() throws Exception { assertEquals(properties, fetchedProperties); } + + @Test + //Test to verify buffersize remains the same as set in the configuration, irrespective of the parameter passed to FSDataInputStream + public void testBufferSizeSet() throws Exception { + final AzureBlobFileSystem fs = getFileSystem(); + AbfsConfiguration abfsConfig = fs.getAbfsStore().getAbfsConfiguration(); + int bufferSizeConfig = 5 * 1024 * 1024; + int bufferSizeArg = 10 * 1024 * 1024; + + Path testPath = path(TEST_PATH); + fs.create(testPath); + + abfsConfig.setReadBufferSize(bufferSizeConfig); + fs.open(testPath, bufferSizeArg); + int actualBufferSize = abfsConfig.getReadBufferSize(); + + assertEquals(bufferSizeConfig, actualBufferSize); + assertNotEquals(bufferSizeArg, actualBufferSize); Review Comment: Add messages and shouldn't this be other way around like assertEquals(actualBufferSize, bufferSizeConfig) Use AssertJ. those are great -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org