From fd1bc58412c501b9cd3f710fb9b70fc3cd157534 Mon Sep 17 00:00:00 2001 From: tianchen Date: Wed, 14 Aug 2019 10:54:47 +0800 Subject: [PATCH 1/6] ARROW-6206: [Java][Docs] Document environment variables/java properties --- java/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/java/README.md b/java/README.md index 34ff51a37ae5f..db6f69a939c0e 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. +## System/Environmental Variables + +There are several system/environmental variables that users can config. + +* BoundsChecking: 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. + +* NullCheckingForGet: Null checking is on by default. 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". + ## Java Code Style Guide Arrow Java follows the Google style guide [here][3] with the following From 6565185c1c9f42df3a0d5e3c8f424cdf1b6a81fb Mon Sep 17 00:00:00 2001 From: tianchen92 <875529044@qq.com> Date: Wed, 14 Aug 2019 11:58:16 +0800 Subject: [PATCH 2/6] Update java/README.md Co-Authored-By: emkornfield --- java/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/README.md b/java/README.md index db6f69a939c0e..c677d6f1b8c87 100644 --- a/java/README.md +++ b/java/README.md @@ -56,7 +56,7 @@ a version of your choosing. ## System/Environmental Variables -There are several system/environmental variables that users can config. +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. * BoundsChecking: 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 From 9a4b43c452d74b49d48dd61e33cd3a15148633a0 Mon Sep 17 00:00:00 2001 From: tianchen92 <875529044@qq.com> Date: Wed, 14 Aug 2019 11:58:28 +0800 Subject: [PATCH 3/6] Update java/README.md Co-Authored-By: emkornfield --- java/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/README.md b/java/README.md index c677d6f1b8c87..8d83704c8398e 100644 --- a/java/README.md +++ b/java/README.md @@ -54,7 +54,7 @@ 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. -## System/Environmental Variables +## 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. From 225770b304cb896f7abdcfbe49e907babadfc7df Mon Sep 17 00:00:00 2001 From: tianchen92 <875529044@qq.com> Date: Wed, 14 Aug 2019 11:58:43 +0800 Subject: [PATCH 4/6] Update java/README.md Co-Authored-By: emkornfield --- java/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/README.md b/java/README.md index 8d83704c8398e..52391e1e1091a 100644 --- a/java/README.md +++ b/java/README.md @@ -58,7 +58,7 @@ a version of your choosing. 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. -* BoundsChecking: Bounds checking is on by default. You can disable it by setting either the +* 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. From a19498c12c6350c63c736eb6d396a0f85e74acb6 Mon Sep 17 00:00:00 2001 From: tianchen92 <875529044@qq.com> Date: Wed, 14 Aug 2019 11:59:02 +0800 Subject: [PATCH 5/6] Update java/README.md Co-Authored-By: emkornfield --- java/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/README.md b/java/README.md index 52391e1e1091a..4d582834e504f 100644 --- a/java/README.md +++ b/java/README.md @@ -63,7 +63,7 @@ system property("arrow.enable_unsafe_memory_access") or the environmental variab ("ARROW_ENABLE_UNSAFE_MEMORY_ACCESS") to "true". When both the system property and the environmental variable are set, the system property takes precedence. -* NullCheckingForGet: Null checking is on by default. You can disable it by setting either the +* 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. From 5bd5ae4590eaa7ffb1b6325bb8ea8fabc5451e10 Mon Sep 17 00:00:00 2001 From: tianchen92 <875529044@qq.com> Date: Wed, 14 Aug 2019 11:59:24 +0800 Subject: [PATCH 6/6] Update java/README.md Co-Authored-By: emkornfield --- java/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/README.md b/java/README.md index 4d582834e504f..a8422e27aeec4 100644 --- a/java/README.md +++ b/java/README.md @@ -71,7 +71,7 @@ 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