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

(cherry picked from commit 0c7a578927)
(cherry picked from commit 34f1dd03ee)
This commit is contained in:
Wei-Chiu Chuang 2018-07-16 11:32:45 -07:00
parent 0d2b983dc2
commit 67ee584fd8
1 changed files with 2 additions and 2 deletions

View File

@ -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();