HADOOP-11954. Solaris does not support RLIMIT_MEMLOCK as in Linux (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/e8a87d73 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e8a87d73 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e8a87d73 Branch: refs/heads/yarn-2877 Commit: e8a87d739f0ffa98fdf87d15440d1e2528080d0c Parents: 56493cd Author: Allen Wittenauer <a...@apache.org> Authored: Tue Nov 24 12:44:58 2015 -0800 Committer: Allen Wittenauer <a...@apache.org> Committed: Tue Nov 24 12:45:08 2015 -0800 ---------------------------------------------------------------------- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/e8a87d73/hadoop-common-project/hadoop-common/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index cc1827b..70295be 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() http://git-wip-us.apache.org/repos/asf/hadoop/blob/e8a87d73/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c ---------------------------------------------------------------------- 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 bd7784e..a7d4b55 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 }