Running Alluxio Locally

Slack Docker Pulls GitHub edit source

Run Alluxio Standalone on a Single Machine.

The prerequisite for this part is that you have Java (JDK 7 or above).

Download the binary distribution of Alluxio 1.4.0:

tar xvfz alluxio-1.4.0-bin.tar.gz
cd alluxio-1.4.0

Before executing Alluxio run scripts, the Alluxio environment configuration conf/ needs to be created. The default configuration can be bootstrapped using:

bin/alluxio bootstrapConf localhost local

To run in standalone mode, make sure that:

  • ALLUXIO_UNDERFS_ADDRESS in conf/ is set to a tmp directory in the local filesystem (e.g., export ALLUXIO_UNDERFS_ADDRESS=/tmp).

  • Remote login service is turned on so that ssh localhost can succeed.

Then, you can format Alluxio FileSystem and start it. Note: since Alluxio needs to setup RAMFS, starting a local system requires users to input their root password for Linux based users. To avoid the need to repeatedly input the root password, you can add the public ssh key for the host into ~/.ssh/authorized_keys. See this tutorial for more details.

./bin/alluxio format
./bin/ local

To verify that Alluxio is running, you can visit http://localhost:19999, or see the log in the logs folder. You can also run a sample program:

./bin/alluxio runTest Basic CACHE THROUGH

For the first sample program, you should be able to see something similar to the following:

2015-11-20 08:32:22,271 INFO   ( - Alluxio client (version 1.0.0) is trying to connect with FileSystemMaster master @ localhost/
2015-11-20 08:32:22,294 INFO   ( - Client registered with FileSystemMaster master @ localhost/
2015-11-20 08:32:22,387 INFO   ( - createFile with fileId 33554431 took 127 ms.
2015-11-20 08:32:22,552 INFO   ( - Alluxio client (version 1.0.0) is trying to connect with BlockMaster master @ localhost/
2015-11-20 08:32:22,553 INFO   ( - Client registered with BlockMaster master @ localhost/
2015-11-20 08:32:22,604 INFO   ( - Connecting local worker @ /
2015-11-20 08:32:22,698 INFO   ( - writeFile to file /default_tests_files/BasicFile_CACHE_THROUGH took 311 ms.
2015-11-20 08:32:22,759 INFO   ( - Folder /Volumes/ramdisk/alluxioworker/7226211928567857329 was created!
2015-11-20 08:32:22,809 INFO   (<init>) - LocalBlockOutStream created new file block, block path: /Volumes/ramdisk/alluxioworker/7226211928567857329/16777216
2015-11-20 08:32:22,886 INFO   ( - readFile file /default_tests_files/BasicFile_CACHE_THROUGH took 187 ms.
Passed the test!

And you can visit Alluxio web UI at http://localhost:19999 again. Click Browse in the navigation bar and you should see the files written to Alluxio by the above test.

To run a more comprehensive sanity check:

./bin/alluxio runTests

You can stop Alluxio any time by running:

./bin/ all