How is heirarchical namespace different from heirarchical listing?

Nandu S Raj 40 Reputation points
2024-11-13T15:44:18.9933333+00:00

I read the documentation for heirarchical namespace and what I understood is that it is a storage level concept and applies to how Azure stores data in the storage account, and listing is just the way in which we represent this in code when fetching this. Is it safe to assume that these two are unrelated? ie a Flat namespaced storage account can be listed using both Flat Listing and Heirarchical listing and vice versa.

Thanks in advance.

The question is to get more clarity on namespace vs listing in general not just limited to heirarchical/flat namespace/listing.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,976 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vinod Kumar Reddy Chilupuri 1,600 Reputation points Microsoft Vendor
    2024-11-13T17:38:03.79+00:00

    Hi @Nandu S Raj

    Welcome to Microsoft Q&A, thanks for posting your query.

    Namespace determines how data is structured and stored within a storage account. There are two types:

    1. Flat Namespace: This is the default for Azure Blob Storage. In a flat namespace, all blobs exist at the same level, without a true directory or structure. The appearance of folders is simulated by using blob names that include slashes.
    2. Hierarchical Namespace: Available with Azure Data Lake Storage Gen2, this type supports a true directory structure, allowing you to create directories and subdirectories. With hierarchical namespaces, you can perform operations like renaming and deleting directories, which aren’t supported in flat namespaces.

    Listing is the process of retrieving and displaying the contents within a storage account. The listing approach depends on the type of namespace used:

    • Flat Listing method retrieves all blobs without regard to any directory structure. It lists all blobs in a single, flat view, ignoring any simulated hierarchy.
    • Hierarchical Listing approach respects the directory structure, retrieving blobs according to directories and subdirectories. It allows you to list blobs within specific directories, offering an organized view based on the folder structure.

    Relationship Between Namespace and Listing

    Namespace and listing methods in Azure Storage work independently, meaning either listing method can be applied to either namespace type. However, the output will vary depending on the namespace structure:

    • Flat Namespace:
      • When using flat listing, all blobs are displayed on a single level with no directory structure.
      • When using hierarchical listing, all blobs are still retrieved, but no folder structure is displayed since none exists in a flat namespace.
    • Hierarchical Namespace:
      • With flat listing, all blobs are returned without any folder context, showing everything on a single level.
      • With hierarchical listing, blobs are organized within their directories and subdirectories, respecting the hierarchical folder structure.

    Summary

    • The namespace defines how data is organized and stored, where listing defines how that data is retrieved and displayed. 
    • They are related in that the type of namespace can affect the results of a listing operation, but they are not inherently dependent on each other. 
    • You can use different listing methods on both flat and hierarchical namespaces, but the output will vary based on the structure of the namespace. 

    The concepts of namespace and listing are different, and you can use different listing methods on both types of namespaces, with the understanding that the results will reflect the underlying structure of the namespace.

     

    Please let us know if you have any further queries. I’m happy to assist you further. 


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.