You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/11/27 21:44:49 UTC
[arrow] branch master updated: ARROW-3493: [Java] Make sure bound
checks are off
This is an automated email from the ASF dual-hosted git repository.
wesm 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 853ba6b ARROW-3493: [Java] Make sure bound checks are off
853ba6b is described below
commit 853ba6b6e67f2eb1b51fb9191361c0392c7fddef
Author: Animesh Trivedi <at...@apache.org>
AuthorDate: Tue Nov 27 16:44:42 2018 -0500
ARROW-3493: [Java] Make sure bound checks are off
As discussed previously on the mailing list, I found
that the bound checks have significant performance
penalty. This commit:
* renames the property from "drill.enable_unsafe_memory_access"
to "arrow.check_unsafe_memory_access"
* set the default value to false
For somehow doing debugging, they can set it back to true.
Signed-off-by: Animesh Trivedi <at...@apache.org>
Author: Animesh Trivedi <at...@apache.org>
Closes #3032 from animeshtrivedi/ARROW-3493 and squashes the following commits:
71752ca5c <Animesh Trivedi> ARROW-3493: Make sure bound checks are on
4cbe7b588 <Animesh Trivedi> ARROW-3493: Make sure bound checks are on
b1f1c6417 <Animesh Trivedi> ARROW-3493: Make sure bound checks are off
35fd031c2 <Animesh Trivedi> ARROW-3493: Make sure bound checks are off
---
.../src/main/java/org/apache/arrow/memory/BoundsChecking.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/java/memory/src/main/java/org/apache/arrow/memory/BoundsChecking.java b/java/memory/src/main/java/org/apache/arrow/memory/BoundsChecking.java
index 90ac77f..e9b5f38 100644
--- a/java/memory/src/main/java/org/apache/arrow/memory/BoundsChecking.java
+++ b/java/memory/src/main/java/org/apache/arrow/memory/BoundsChecking.java
@@ -23,10 +23,17 @@ public class BoundsChecking {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BoundsChecking.class);
static {
+ String oldProperty = System.getProperty("drill.enable_unsafe_memory_access");
+ if (oldProperty != null) {
+ logger.warn("\"drill.enable_unsafe_memory_access\" has been renamed to \"arrow.enable_unsafe_memory_access\"");
+ logger.warn("\"arrow.enable_unsafe_memory_access\" can be set to: " +
+ " true (to not check) or false (to check, default)");
+ }
boolean isAssertEnabled = false;
assert isAssertEnabled = true;
BOUNDS_CHECKING_ENABLED = isAssertEnabled ||
- !"true".equals(System.getProperty("drill.enable_unsafe_memory_access"));
+ !"true".equals(System.getProperty("arrow.enable_unsafe_memory_access")) ||
+ !"true".equals(oldProperty);
}
private BoundsChecking() {