anujmodi2021 commented on code in PR #7698: URL: https://github.com/apache/hadoop/pull/7698#discussion_r2098177426
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java: ########## @@ -431,6 +435,31 @@ public ListResponseData listPath(final String relativePath, final boolean recurs return listResponseData; } + + @Override + public List<FileStatus> postListProcessing(String relativePath, List<FileStatus> fileStatuses, + TracingContext tracingContext, URI uri) throws AzureBlobFileSystemException { + List<FileStatus> rectifiedFileStatuses = new ArrayList<>(); + if (fileStatuses.isEmpty() && !relativePath.equals(ROOT_PATH)) { + // If the list operation returns no paths, we need to check if the path is a file. + // If it is a file, we need to return the file in the list. + // If it is a non-existing path, we need to throw a FileNotFoundException. + // Root Always exists as directory. It can be an empty listing. + AbfsRestOperation pathStatus = this.getPathStatus(relativePath, tracingContext, null, false); + BlobListResultSchema listResultSchema = getListResultSchemaFromPathStatus(relativePath, pathStatus); + LOG.debug("ListStatus attempted on a file path. Returning file status."); Review Comment: Taken ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsDfsClient.java: ########## @@ -348,6 +349,20 @@ public ListResponseData listPath(final String relativePath, return listResponseData; } + @Override Review Comment: Taken -- 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