Skip to content

Commit cafb00f

Browse files
tianchen92emkornfield
authored andcommitted
ARROW-6206: [Java][Docs] Document environment variables/java properties
Related to [ARROW-6206](https://issues.apache.org/jira/browse/ARROW-6206). Specifically, "-Dio.netty.tryReflectionSetAccessible=true" for JVMs >= 9 and BoundsChecking/NullChecking for get. Closes #5078 from tianchen92/ARROW-6206 and squashes the following commits: 5bd5ae4 <tianchen92> Update java/README.md a19498c <tianchen92> Update java/README.md 225770b <tianchen92> Update java/README.md 9a4b43c <tianchen92> Update java/README.md 6565185 <tianchen92> Update java/README.md fd1bc58 <tianchen> ARROW-6206: Document environment variables/java properties Lead-authored-by: tianchen <niki.lj@alibaba-inc.com> Co-authored-by: tianchen92 <875529044@qq.com> Signed-off-by: Micah Kornfield <emkornfield@gmail.com>
1 parent 2723884 commit cafb00f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

java/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ and arrow-format into a single JAR. Using the classifier "shade-format-flatbuff
5454
pom.xml will make use of this JAR, you can then exclude/resolve the original dependency to
5555
a version of your choosing.
5656

57+
## Performance Tuning
58+
59+
There are several system/environmental variables that users can configure. These trade off safety (they turn off checking) for speed. Typically they are only used in production settings after the code has been thoroughly tested without using them.
60+
61+
* Bounds Checking for memory accesses: Bounds checking is on by default. You can disable it by setting either the
62+
system property("arrow.enable_unsafe_memory_access") or the environmental variable
63+
("ARROW_ENABLE_UNSAFE_MEMORY_ACCESS") to "true". When both the system property and the environmental
64+
variable are set, the system property takes precedence.
65+
66+
* null checking for gets: ValueVector get methods (not getObject) methods by default verify the slot is not null. You can disable it by setting either the
67+
system property("arrow.enable_null_check_for_get") or the environmental variable
68+
("ARROW_ENABLE_NULL_CHECK_FOR_GET") to "false". When both the system property and the environmental
69+
variable are set, the system property takes precedence.
70+
71+
## Java Properties
72+
73+
For java 9 or later, should set "-Dio.netty.tryReflectionSetAccessible=true".
74+
This fixes `java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available`. thrown by netty.
5775
## Java Code Style Guide
5876

5977
Arrow Java follows the Google style guide [here][3] with the following

0 commit comments

Comments
 (0)