Configuring Cloud Data Access
Also available as:
PDF

Test access to WASB

To test access to WASB, SSH to a cluster node and run a few hadoop fs shell commands against your existing WASB account.

To test access, SSH to any cluster node and switch to the hdfs user by using sudo su hdfs.

WASB access path syntax 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</pre>

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

For more information about configuring the ADLS connector and working with data stored in ADLS, refer to Cloud Data Access HDP documentation.