Developer Tips

Slack Docker Pulls GitHub edit source

This page is a collection of tips and howtos geared towards developers of Alluxio.

Change a Thrift RPC definition

Alluxio uses thrift for RPC communication between clients and servers. The .thrift files defined in common/src/thrift/ are used to auto-generate Java code for calling the RPCs on clients and implementing the RPCs on servers. To change a Thrift definition, you must first install the Thrift compiler. If you have brew, you can do this by running

brew install thrift

Then to regenerate the Java code, run

bin/alluxio thriftGen

Change a Protocol Buffer Message

Alluxio uses protocol buffers to read and write journal messages. The .proto files defined in servers/src/proto/journal/ are used to auto-generate Java definitions for the protocol buffer messages. To change one of these messages, first read about updating a message type to make sure your change will not break backwards compatibility. Next, install protoc. If you have brew, you can do this by running

 brew install protobuf

Then to regenerate the Java code, run

bin/alluxio protoGen

Full list of the commands in bin/alluxio

Most commands in bin/alluxio are for developers. The following table explains the description and the syntax of each command.

</tr>
CommandArgsDescription
format [-s]
formatWorker None
bootstrapConf <ALLUXIO_MASTER_HOSTNAME>
fs [fs-commands]
loadufs <TachyonPath> <UfsPath> [ExcludePathPrefixes]
runTest <Example> <ReadType> <WriteType>
runTests None
journalCrashTest [-creates <arg>] [-deletes <arg>] [-renames <arg>] [-maxAlive <arg>] [-testDir <arg>] [-totalTime <arg>] [-help]
readJournal [-help] [-noTimeout]
killAll <WORD>
copyDir <PATH>
clearCache None
thriftGen None
protoGen None
version None
validateConf None

In addition, these commands have different prerequisites. The prerequisite for the format, formatWorker, journalCrashTest, readJournal, version and validateConf commands is that you have already built Alluxio (see Build Alluxio Master Branch about how to build Alluxio manually). Further, the prerequisite for the fs, loadufs, runTest and runTests commands is that you have a running Alluxio system.