diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index cc1827b500c..70295be5467 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -1359,6 +1359,9 @@ Release 2.8.0 - UNRELEASED HADOOP-9822. Create constant MAX_CAPACITY in RetryCache rather than hard-coding 16 in RetryCache constructor. (Tsuyoshi Ozawa via wheat9) + HADOOP-11954. Solaris does not support RLIMIT_MEMLOCK as in Linux + (Alan Burlison via aw) + OPTIMIZATIONS HADOOP-12051. ProtobufRpcEngine.invoke() should use Exception.toString() diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c index bd7784eff70..a7d4b55c65c 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c @@ -1255,9 +1255,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_hadoop_io_nativeio_NativeIO_getMemlockLimit0( JNIEnv *env, jclass clazz) { -#ifdef WINDOWS - return 0; -#else +#ifdef RLIMIT_MEMLOCK struct rlimit rlim; int rc = getrlimit(RLIMIT_MEMLOCK, &rlim); if (rc != 0) { @@ -1266,6 +1264,8 @@ JNIEnv *env, jclass clazz) } return (rlim.rlim_cur == RLIM_INFINITY) ? INT64_MAX : rlim.rlim_cur; +#else + return 0; #endif }