anujmodi2021 commented on code in PR #7496: URL: https://github.com/apache/hadoop/pull/7496#discussion_r2024088523
########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemMkDir.java: ########## @@ -167,4 +181,107 @@ public void testMkdirWithExistingFilename() throws Exception { intercept(FileAlreadyExistsException.class, () -> fs.mkdirs(new Path("/testFilePath"))); intercept(FileAlreadyExistsException.class, () -> fs.mkdirs(new Path("/testFilePath/newDir"))); } + Review Comment: Do we need to add tests for this change in mkdir test file? To me it looks like more of a metadata change. We should add tests in ITestFileStatus, ITestListStatus, ITestAttributes classes. All of them have dependency on this header to return right response. Listing output also depends on this header is that also case-insensitive? Can we add some tests for that. ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java: ########## @@ -1528,10 +1528,31 @@ public AbfsRestOperation deleteBlobPath(final Path blobPath, */ @Override public boolean checkIsDir(AbfsHttpOperation result) { - String resourceType = result.getResponseHeader(X_MS_META_HDI_ISFOLDER); + String dirHeaderName = getHeaderNameIgnoreCase(result, X_MS_META_HDI_ISFOLDER); Review Comment: Won't it be better to directly get the value from this function? Something like: `getCaseInsensitiveResponseHeader()` similar to `getResponseHeader` And this can be moved to `AbfsHttpOperation` class itself where normal version of this method already exists. ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java: ########## @@ -1528,10 +1528,31 @@ public AbfsRestOperation deleteBlobPath(final Path blobPath, */ @Override public boolean checkIsDir(AbfsHttpOperation result) { - String resourceType = result.getResponseHeader(X_MS_META_HDI_ISFOLDER); + String dirHeaderName = getHeaderNameIgnoreCase(result, X_MS_META_HDI_ISFOLDER); Review Comment: It can be later used by other classes and other headers as well not only BlobClient. -- 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