Configuring Alluxio with OSS

Slack Docker Pulls GitHub edit source

This guide describes how to configure Alluxio with Aliyun OSS as the under storage system. Object Storage Service (OSS) is a massive, secure and highly reliable cloud storage service provided by Aliyun.

Initial Setup

To run an Alluxio cluster on a set of machines, you must deploy Alluxio binaries to each of these machines.You can either compile the binaries from Alluxio source code, or download the precompiled binaries directly.

Also, in preparation for using OSS with alluxio, create a bucket or use an existing bucket. You should also note that the directory you want to use in that bucket, either by creating a new directory in the bucket, or using an existing one. For the purposes of this guide, the OSS bucket name is called OSS_BUCKET, and the directory in that bucket is called OSS_DIRECTORY. Also, for using the OSS Service, you should provide an OSS endpoint to specify which range your bucket is on. The endpoint here is called OSS_ENDPOINT, and to learn more about the endpoints for special range you can see here. For more information about OSS Bucket, Please see here

Configuring Alluxio

You need to configure Alluxio to use OSS as its under storage system. The first modification is to specify an existing OSS bucket and directory as the under storage system by modifying conf/ to include:


Next you need to specify the Aliyun credentials for OSS access. In conf/, add:


Here fs.oss.accessKeyId is the Access Key Id string and fs.oss.accessKeySecret is the Access Key Secret string, which are managed in AccessKeys in Aliyun UI. fs.oss.endpoint is the endpoint of this bucket, which can be found in the Bucket overview with possible values like “”, “” (OSS Internet Endpoint).

After these changes, Alluxio should be configured to work with OSS as its under storage system, and you can try to run alluxio locally with OSS.

Running Alluxio Locally with OSS

After everything is configured, you can start up Alluxio locally to see that everything works.

bin/alluxio format
bin/ local

This should start an Alluxio master and an Alluxio worker. You can see the master UI at http://localhost:19999.

Next, you can run a simple example program:

bin/alluxio runTests

After this succeeds, you can visit your OSS directory OSS_BUCKET/OSS_DIRECTORY to verify the files and directories created by Alluxio exist. For this test, you should see files named like OSS_BUCKET/OSS_DIRECTORY/default_tests_files/BasicFile_CACHE_PROMOTE_MUST_CACHE.

To stop Alluxio, you can run:

bin/ local