You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ae...@apache.org on 2016/05/27 04:39:53 UTC
[19/31] hadoop git commit: HADOOP-12925. Checks for SPARC
architecture need to include 64-bit SPARC (Alan Burlison via aw)
HADOOP-12925. Checks for SPARC architecture need to include 64-bit SPARC (Alan Burlison via aw)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3c83cee1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3c83cee1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3c83cee1
Branch: refs/heads/HDFS-1312
Commit: 3c83cee118137e3d5bbe0c942e92e179d1234d5b
Parents: 1ba31fe
Author: Allen Wittenauer <aw...@apache.org>
Authored: Wed May 25 15:28:02 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Wed May 25 15:28:02 2016 -0700
----------------------------------------------------------------------
.../main/java/org/apache/hadoop/io/FastByteComparisons.java | 2 +-
.../src/main/java/org/apache/hadoop/util/NativeCrc32.java | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3c83cee1/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/FastByteComparisons.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/FastByteComparisons.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/FastByteComparisons.java
index a3fea31..705678e 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/FastByteComparisons.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/FastByteComparisons.java
@@ -75,7 +75,7 @@ abstract class FastByteComparisons {
* implementation if unable to do so.
*/
static Comparer<byte[]> getBestComparer() {
- if (System.getProperty("os.arch").equals("sparc")) {
+ if (System.getProperty("os.arch").toLowerCase().startsWith("sparc")) {
if (LOG.isTraceEnabled()) {
LOG.trace("Lexicographical comparer selected for "
+ "byte aligned system architecture");
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3c83cee1/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NativeCrc32.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NativeCrc32.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NativeCrc32.java
index cacf006..0669b0a 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NativeCrc32.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NativeCrc32.java
@@ -33,7 +33,11 @@ class NativeCrc32 {
* Return true if the JNI-based native CRC extensions are available.
*/
public static boolean isAvailable() {
- return NativeCodeLoader.isNativeCodeLoaded();
+ if (System.getProperty("os.arch").toLowerCase().startsWith("sparc")) {
+ return false;
+ } else {
+ return NativeCodeLoader.isNativeCodeLoaded();
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org