tree: 766504cbbb02cc0b2fef4df18259a5b3f809aff7 [path history] [tgz]
  1. adapter/
  2. dev/
  3. flight/
  4. format/
  5. gandiva/
  6. memory/
  7. plasma/
  8. tools/
  9. vector/
  10. .gitattributes
  11. .gitignore
  12. Dockerfile
  13. pom.xml
  14. README.md
java/README.md

Arrow Java

Setup Build Environment

install:

  • java 7 or later
  • maven 3.3 or later

Building and running tests

cd java
mvn install

Building and running tests for gandiva (optional)

Gandiva cpp must be built before this step. The cpp build directory must be provided as the value for argument gandiva.cpp.build.dir. eg.

cd java
mvn install -P gandiva -pl gandiva -am -Dgandiva.cpp.build.dir=../../debug

This library is still in Alpha stages, and subject to API changes without deprecation warnings.

Java Code Style Guide

Arrow Java follows the Google style guide here with the following differences:

  • Imports are grouped, from top to bottom, in this order: static imports, standard Java, org.*, com.*
  • Line length can be up to 120 characters
  • Operators for line wrapping are at end-of-line
  • Naming rules for methods, parameters, etc. have been relaxed
  • Disabled NoFinalizer, OverloadMethodsDeclarationOrder, and VariableDeclarationUsageDistance due to the existing code base. These rules should be followed when possible.

Refer to `java/dev/checkstyle/checkstyle.xml for rule specifics.

Test Logging Configuration

When running tests, Arrow Java uses the Logback logger with SLF4J. By default, Logback has a log level set to DEBUG. Besides setting this level programmatically, it can also be configured with a file named either “logback.xml” or “logback-test.xml” residing in the classpath. The file location can also be specified in the Maven command line with the following option -Dlogback.configurationFile=file:<absolute-file-path>. A sample logback.xml file is available in java/dev with a log level of ERROR. Arrow Java can be built with this file using the following command run in the project root directory:

mvn -Dlogback.configurationFile=file:`pwd`/dev/logback.xml

See Logback Configuration for more details.