Apache Accumulo Source Code & Developers Guide
Accumulo's web site is also maintained in Subversion using Apache's Content Management System. Committers may edit the site by following these instructions. Non-committers should follow this FAQ entry.
The build of the 'core' component will attempt to run the Apache Thrift command line to regenerate stubs. If you don't have Apache Thrift installed and in your path, you will see a warning, and the build will wait for you to enter a newline to proceed. To avoid this, install Thrift 0.9 and make sure that the 'thrift' command is in your path. Watch out for THRIFT-1367; you may need to configure Thrift with --without-ruby.
Checking out from svn
To check out the code:
svn co https://svn.apache.org/repos/asf/accumulo/trunk/
To build the code:
mvn package -P assemble
This will create a file accumulo-*-SNAPSHOT-dist.tar.gz in the assemble/target directory.
For older branches, "mvn package && mvn assembly:single" may be required instead, and the tar will be built in the target directory.
Accumulo uses Jenkins for automatic builds.
Changes should be merged from earlier branches of Accumulo to later branches. Currently, all changes are being merged from the 1.4 branch and later, but not all changes are merged from the 1.3 branch. When you make a change in branch 1.x, use the following process to merge to subsequent versions 1.y and 1.z:
svn merge -r 1:HEAD 1.x_svn_url 1.y_local_dir examine merged files and conflicts svn ci 1.y_local_dir make sure the commit includes the svn mergeinfo svn merge -r 1:HEAD 1.y_svn_url 1.z_local_dir examine merged files and conflicts svn ci 1.z_local_dir make sure the commit includes the svn mergeinfo
An additional step is now required to merge from 1.4 to 1.5 since the directory structure changed. Ask the dev list for instructions.
- License Header: Always add the current ASF license header as described in ASF Source Header.
- Trailing Whitespaces: Remove all trailing whitespaces. Eclipse users can use Source->Cleanup option to accomplish this.
- Indentation: Use 2 space indents and never use tabs!
- Line Wrapping: Use 160-column line width for Java code and Javadoc.
- Control Structure New Lines: Use a new line with single statement if/else blocks.
- Author Tags: Do not use Author Tags. The code is developed and owned by the community.
Eclipse Configuration Tips
- Download Eclipse formatting and style guides for Accumulo.
- Import Formatter: Preferences > Java > Code Style > Formatter and import the Eclipse-Accumulo-Codestyle.xml downloaded in the previous step.
- Import Template: Preferences > Java > Code Style > Code Templates and import the Eclipse-Accumulo-Template.xml. Make sure to check the "Automatically add comments" box. This template adds the ASF header and so on for new code.
Intellij Configuration Tips
- Formatter plugin that uses eclipse code style xml.
Instructions for configuring svn clients are here.
Accumulo's release guide can be found here.