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 <yuqi.gu@arm.com>
Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
Yuqi Gu 2017-11-16 08:17:15 +00:00 committed by tedyu
parent 9434d52c19
commit ddbff4fd87
1 changed files with 1 additions and 1 deletions

View File

@ -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 {