Skip to content

Commit

Permalink
Fix invalid detection of hierarchical namespace stub blobs as files (n…
Browse files Browse the repository at this point in the history
…extflow-io#4046)

Signed-off-by: Florian De Temmerman <[email protected]>
  • Loading branch information
fbdtemme authored and abhi18av committed Oct 28, 2023
1 parent e4a84b6 commit f9803cc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ class AzFileAttributes implements BasicFileAttributes {
updateTime = time(props.getLastModified())
directory = client.blobName.endsWith('/')
size = props.getBlobSize()

// Support for Azure Data Lake Storage Gen2 with hierarchical namespace enabled
final meta = props.getMetadata()
if( meta.containsKey("hdi_isfolder") && size == 0 ){
directory = meta.get("hdi_isfolder")
}
}

AzFileAttributes(String containerName, BlobItem item) {
Expand Down

0 comments on commit f9803cc

Please sign in to comment.