HADOOP-15598. DataChecksum calculate checksum is contented on hashtable 
synchronization. Contributed by Prasanth Jayachandran.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/0c7a5789
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/0c7a5789
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/0c7a5789

Branch: refs/heads/HDFS-12943
Commit: 0c7a578927032d5d1ef3469283d7d1fb7dee2a56
Parents: 238ffff
Author: Wei-Chiu Chuang <weic...@apache.org>
Authored: Mon Jul 16 11:32:45 2018 -0700
Committer: Wei-Chiu Chuang <weic...@apache.org>
Committed: Mon Jul 16 11:32:45 2018 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/util/NativeCrc32.java        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/0c7a5789/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 0669b0a..3142df2 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
@@ -28,12 +28,12 @@ import com.google.common.annotations.VisibleForTesting;
  * natively.
  */
 class NativeCrc32 {
-  
+  private static final boolean isSparc = 
System.getProperty("os.arch").toLowerCase().startsWith("sparc");
   /**
    * Return true if the JNI-based native CRC extensions are available.
    */
   public static boolean isAvailable() {
-    if (System.getProperty("os.arch").toLowerCase().startsWith("sparc")) {
+    if (isSparc) {
       return false;
     } else {
       return NativeCodeLoader.isNativeCodeLoaded();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to