You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by em...@apache.org on 2019/08/14 06:09:55 UTC

[arrow] branch master updated: ARROW-6206: [Java][Docs] Document environment variables/java properties

This is an automated email from the ASF dual-hosted git repository.

emkornfield pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new cafb00f  ARROW-6206: [Java][Docs] Document environment variables/java properties
cafb00f is described below

commit cafb00fef833b38666d5c9ac74aeb0d87606df6e
Author: tianchen <ni...@alibaba-inc.com>
AuthorDate: Tue Aug 13 23:09:20 2019 -0700

    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:
    
    5bd5ae459 <tianchen92> Update java/README.md
    a19498c12 <tianchen92> Update java/README.md
    225770b30 <tianchen92> Update java/README.md
    9a4b43c45 <tianchen92> Update java/README.md
    6565185c1 <tianchen92> Update java/README.md
    fd1bc5841 <tianchen> ARROW-6206:  Document environment variables/java properties
    
    Lead-authored-by: tianchen <ni...@alibaba-inc.com>
    Co-authored-by: tianchen92 <87...@qq.com>
    Signed-off-by: Micah Kornfield <em...@gmail.com>
---
 java/README.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/java/README.md b/java/README.md
index 34ff51a..a8422e2 100644
--- a/java/README.md
+++ b/java/README.md
@@ -54,6 +54,24 @@ and arrow-format into a single JAR.  Using the classifier "shade-format-flatbuff
 pom.xml will make use of this JAR, you can then exclude/resolve the original dependency to
 a version of your choosing.
 
+## Performance Tuning
+
+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.
+
+* Bounds Checking for memory accesses: Bounds checking is on by default.  You can disable it by setting either the 
+system property("arrow.enable_unsafe_memory_access") or the environmental variable
+("ARROW_ENABLE_UNSAFE_MEMORY_ACCESS") to "true". When both the system property and the environmental 
+variable are set, the system property takes precedence.
+
+* 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 
+system property("arrow.enable_null_check_for_get") or the environmental variable 
+("ARROW_ENABLE_NULL_CHECK_FOR_GET") to "false". When both the system property and the environmental 
+variable are set, the system property takes precedence. 
+
+## Java Properties
+
+For java 9 or later, should set "-Dio.netty.tryReflectionSetAccessible=true".
+This fixes `java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available`. thrown by netty.
 ## Java Code Style Guide
 
 Arrow Java follows the Google style guide [here][3] with the following