Running Alluxio Locally
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:
wget http://alluxio.org/downloads/files/1.4.0/alluxio-1.4.0-bin.tar.gz tar xvfz alluxio-1.4.0-bin.tar.gz cd alluxio-1.4.0
Before executing Alluxio run scripts, the Alluxio environment configuration
needs to be created. The default configuration can be bootstrapped using:
bin/alluxio bootstrapConf localhost local
To run in standalone mode, make sure that:
conf/alluxio-env.shis set to a tmp directory in the local filesystem (e.g.,
Remote login service is turned on so that
ssh localhostcan 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
./bin/alluxio format ./bin/alluxio-start.sh 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 (ClientBase.java:connect) - Alluxio client (version 1.0.0) is trying to connect with FileSystemMaster master @ localhost/127.0.0.1:19998 2015-11-20 08:32:22,294 INFO (ClientBase.java:connect) - Client registered with FileSystemMaster master @ localhost/127.0.0.1:19998 2015-11-20 08:32:22,387 INFO (BasicOperations.java:createFile) - createFile with fileId 33554431 took 127 ms. 2015-11-20 08:32:22,552 INFO (ClientBase.java:connect) - Alluxio client (version 1.0.0) is trying to connect with BlockMaster master @ localhost/127.0.0.1:19998 2015-11-20 08:32:22,553 INFO (ClientBase.java:connect) - Client registered with BlockMaster master @ localhost/127.0.0.1:19998 2015-11-20 08:32:22,604 INFO (WorkerClient.java:connect) - Connecting local worker @ /192.168.2.15:29998 2015-11-20 08:32:22,698 INFO (BasicOperations.java:writeFile) - writeFile to file /default_tests_files/BasicFile_CACHE_THROUGH took 311 ms. 2015-11-20 08:32:22,759 INFO (FileUtils.java:createStorageDirPath) - Folder /Volumes/ramdisk/alluxioworker/7226211928567857329 was created! 2015-11-20 08:32:22,809 INFO (LocalBlockOutStream.java:<init>) - LocalBlockOutStream created new file block, block path: /Volumes/ramdisk/alluxioworker/7226211928567857329/16777216 2015-11-20 08:32:22,886 INFO (BasicOperations.java:readFile) - 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.
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:
You can stop Alluxio any time by running: