Cloud Data Access
Also available as:
PDF
loading table of contents...

Referencing WASB in the URLs

Regardless of which specific Hadoop ecosystem application you are using, you can access data stored in WASB using the URL starting with the wasb:// prefix.

The URL structure is:

wasb://<container_name>@<storage_account_name>.blob.core.windows.net/dir/file

For example, to access a file called "testfile" located in a directory called "testdir", stored in the container called "testcontainer" on the account called "hortonworks", the URL is:

wasb://testcontainer@hortonworks.blob.core.windows.net/testdir/testfile

You can also use wasbs prefix to utilize SSL-encrypted HTTPS access:

wasbs://<container_name>@<storage_account_name>.blob.core.windows.net/dir/file

For example, the following Hadoop FileSystem shell commands demonstrate access to a storage account named myaccount and a container named mycontainer:

hadoop fs -ls wasb://mycontainer@myaccount.blob.core.windows.net/

hadoop fs -mkdir wasb://mycontainer@myaccount.blob.core.windows.net/testDir

hadoop fs -put testFile wasb://mycontainer@myaccount.blob.core.windows.net/testDir/testFile

hadoop fs -cat wasb://mycontainer@myaccount.blob.core.windows.net/testDir/testFile
test file content

It is also possible to configure fs.defaultFS to use a wasb or wasbs URL. This causes all bare paths, such as /testDir/testFile to resolve automatically to that file system.