From d32ba0977f6f499faf5373273513429798051a14 Mon Sep 17 00:00:00 2001 From: Yuqi Gu Date: Thu, 16 Nov 2017 08:17:15 +0000 Subject: [PATCH] HBASE-19386 Enable Arm64 unaligned support for HBase On Arm64, java.nio.Bits.unaligned() wrongly returns false due to a JDK bug. This causes HBase UnsafeAvailChecker wrongly returning false on Arm64. And it slso cause FuzzyRowFilter Unit test failed. Fix it by providing a hard-code to enbale Arm64 unaligned support. Jira: HBASE-19386 Change-Id: I3ab821dacbe42b18cd515080da1fa3dc1f1e1d28 Signed-off-by: Yuqi Gu Signed-off-by: tedyu --- .../java/org/apache/hadoop/hbase/util/UnsafeAvailChecker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAvailChecker.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAvailChecker.java index f6744d7f0a6..8fe70443ae9 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAvailChecker.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAvailChecker.java @@ -52,7 +52,7 @@ public class UnsafeAvailChecker { // When Unsafe itself is not available/accessible consider unaligned as false. if (avail) { String arch = System.getProperty("os.arch"); - if ("ppc64".equals(arch) || "ppc64le".equals(arch)) { + if ("ppc64".equals(arch) || "ppc64le".equals(arch) || "aarch64".equals(arch)) { // java.nio.Bits.unaligned() wrongly returns false on ppc (JDK-8165231), unaligned = true; } else {