Development Guidelines¶
Unit Testing¶
Unit tests are run by Maven during the build.
To speed up the build, you can skip them by passing -DskipTests. .. code-block:
$ cd arrow/java
$ mvn \
-Darrow.cpp.build.dir=../java-dist/lib -Parrow-jni \
-Darrow.c.jni.dist.dir=../java-dist/lib -Parrow-c-data \
clean install
Performance Testing¶
The arrow-performance
module contains benchmarks.
Let’s configure our environment to run performance tests:
In case you need to see your performance tests on the UI, then, configure (optional):
Install conbench
Lets execute benchmark tests:
$ cd benchmarks
$ conbench java-micro --help
$ conbench java-micro
--iterations=1
--commit=e90472e35b40f58b17d408438bb8de1641bfe6ef
--java-home=<absolute path to your java home>
--src=<absolute path to your arrow project>
--benchmark-filter=org.apache.arrow.adapter.AvroAdapterBenchmarks.testAvroToArrow
Benchmark Mode Cnt Score Error Units
AvroAdapterBenchmarks.testAvroToArrow avgt 725545.783 ns/op
Time to POST http://localhost:5000/api/login/ 0.14911699295043945
Time to POST http://localhost:5000/api/benchmarks/ 0.06116318702697754
Then go to: http://127.0.0.1:5000/ to see reports:
UI Home:
UI Runs:
UI Benchmark:
Integration Testing¶
Integration tests can be run via Archery:
$ archery integration --with-java true --with-cpp false --with-js false --with-csharp false --with-go false --with-rust false
Code Style¶
Code style is enforced with Checkstyle. The configuration is located at checkstyle. You can also just check the style without building the project. This checks the code style of all source code under the current directory or from within an individual module.
$ mvn checkstyle:check