Building Flume

Getting the source

Check-out the code using Git. Click here forthe git repository root.

The Flume 1.x development happens under the branch “trunk” so this command linecan be used:


Compile/test Flume

The Flume build is mavenized. You can compile Flume using the standard Mavencommands:

  • Compile only: mvn clean compile
  • Compile and run unit tests: mvn clean test
  • Run individual test(s): mvn clean test -Dtest=,,… -DfailIfNoTests=false
  • Create tarball package: mvn clean install
  • Create tarball package (skip unit tests): mvn clean install -DskipTests
    Please note that Flume builds requires that the Google Protocol Buffers compilerbe in the path. You can download and install it by following the instructionshere.

Updating Protocol Buffer Version

File channel has a dependency on Protocol Buffer. When updating the version of Protocol Bufferused by Flume, it is necessary to regenerate the data access classes using the protoc compilerthat is part of Protocol Buffer as follows.

  • Install the desired version of Protocol Buffer on your local machine
  • Update version of Protocol Buffer in pom.xml
  • Generate new Protocol Buffer data access classes in Flume: cd flume-ng-channels/flume-file-channel; mvn -P compile-proto clean package -DskipTests
  • Add Apache license header to any of the generated files that are missing it
  • Rebuild and test Flume: cd ../..; mvn clean install