Stop Thinking, Just Do!

Sung-Soo Kim's Blog

Building Tachyon Master Branch


18 October 2015

Building Tachyon Master Branch

This guide describes how to compile Tachyon from the beginning.

The prerequisite for this guide is that you have Java 6 (or above), Maven, and Thrift 0.9.1 (Optional) installed.

Checkout the Tachyon master branch from Github and package:

$ git clone git://
$ cd tachyon
$ mvn install

If you getting java.lang.OutOfMemoryError: Java heap space, please execute

$ export MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m"

If you want to build a particular version of Tachyon, for example 0.7.1, please do git checkout v0.7.1 after cd tachyon.

The Maven build system fetches its dependencies, compiles, runs system’s unit tests, and package the system. If this is the first time you are building the project, it can take a while to download all the dependencies. Subsequent builds, however, will be much faster.

Once it is built, you can start Tachyon:

$ cp conf/ conf/
$ ./bin/tachyon format
$ ./bin/ local

To verify that Tachyon is running, you can visit http://localhost:19999 or check the log in the folder tachyon/logs. You can also run a simple program:

$ ./bin/tachyon runTest Basic CACHE_THROUGH

You should be able to see results similar to the following:

/Basic_File_CACHE_THROUGH has been removed
2014-02-02 09:32:02,760 INFO   ( - Trying to connect master @ localhost/
2014-02-02 09:32:02,791 INFO   ( - User registered at the master localhost/ got UserId 10
2014-02-02 09:32:02,792 INFO   ( - Trying to get local worker host : hy-ubuntu
2014-02-02 09:32:02,800 INFO   ( - Connecting local worker @ hy-ubuntu/
2014-02-02 09:32:02,819 INFO   ( - createFile with fileId 18 took 60 ms.
2014-02-02 09:32:03,194 INFO   ( - Folder /mnt/ramdisk/tachyonworker/users/10 was created!
2014-02-02 09:32:03,198 INFO   (<init>) - /mnt/ramdisk/tachyonworker/users/10/19327352832 was created!
Passed the test!

You can also stop the system by using:

$ ./bin/

Unit tests

To run all unit tests:

$ mvn test

To run all the unit tests with under filesystem other than local filesystem:

$ mvn test [ -Dhadoop.version=x.x.x ] [ -Dtest.profile=hdfs ]

Current supported profiles:

local #default, uses local disk
hdfs # uses hadoop's minicluster
glusterfs # uses glusterfs

To have the logs output to STDOUT, append the following to the mvn command

-Dtest.output.redirect=false -Dtachyon.root.logger=DEBUG,CONSOLE

Distro Support

To build master against one of the different distros of hadoop, you only need to change the hadoop.version.


All main builds are from Apache so all Apache releases can be used directly



To build against Cloudera’s releases, just use a version like $apacheRelease-cdh$cdhRelease



To build against a MapR release



To build against a Pivotal release, just use a version like $apacheRelease-gphd-$pivotalRelease



To build against a Hortonworks release, just use a version like $apacheRelease.$hortonRelease


System Settings

Some times you will need to play with a few system settings in order to have the unit tests pass locally. A common setting that may need to be set is ulimit.


In order to increase the number of files and procs allowed, run the following

sudo launchctl limit maxfiles 16384 16384 
sudo launchctl limit maxproc 2048 2048
sudo ulimit -n 16384 sudo ulimit -u 2048

It is also recommended to exclude your local clone of Tachyon from Spotlight indexing as otherwise your Mac may hang constantly trying to re-index the file system during the unit tests. To do this go to System Preferences > Spotlight > Privacy and click the + button, browse to the folder containing your local clone of Tachyon and click Choose to add it to the exclusions list.

comments powered by Disqus