HADOOP-15598. DataChecksum calculate checksum is contented on hashtable synchronization. Contributed by Prasanth Jayachandran.
This commit is contained in:
parent
238ffff999
commit
0c7a578927
|
@ -28,12 +28,12 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
* natively.
|
* natively.
|
||||||
*/
|
*/
|
||||||
class NativeCrc32 {
|
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.
|
* Return true if the JNI-based native CRC extensions are available.
|
||||||
*/
|
*/
|
||||||
public static boolean isAvailable() {
|
public static boolean isAvailable() {
|
||||||
if (System.getProperty("os.arch").toLowerCase().startsWith("sparc")) {
|
if (isSparc) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return NativeCodeLoader.isNativeCodeLoaded();
|
return NativeCodeLoader.isNativeCodeLoaded();
|
||||||
|
|
Loading…
Reference in New Issue