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

Referencing WASB in 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