hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From este...@apache.org
Subject hbase git commit: HBASE-14354 Minor improvements for usage of the mlock agent
Date Wed, 02 Sep 2015 01:37:59 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 5bb36f159 -> f8dd99d73


HBASE-14354 Minor improvements for usage of the mlock agent


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

Branch: refs/heads/master
Commit: f8dd99d7380e5eafae62a9f0c526ba24f98eb2e5
Parents: 5bb36f1
Author: Esteban Gutierrez <esteban@apache.org>
Authored: Tue Sep 1 18:36:39 2015 -0700
Committer: Esteban Gutierrez <esteban@apache.org>
Committed: Tue Sep 1 18:37:34 2015 -0700

----------------------------------------------------------------------
 bin/hbase-config.sh | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f8dd99d7/bin/hbase-config.sh
----------------------------------------------------------------------
diff --git a/bin/hbase-config.sh b/bin/hbase-config.sh
index 5c518b1..c113adb 100644
--- a/bin/hbase-config.sh
+++ b/bin/hbase-config.sh
@@ -98,22 +98,20 @@ if [ -z "$HBASE_ENV_INIT" ] && [ -f "${HBASE_CONF_DIR}/hbase-env.sh"
]; then
   export HBASE_ENV_INIT="true"
 fi
 
-# Set default value for regionserver uid if not present
-if [ -z "$HBASE_REGIONSERVER_UID" ]; then
-  HBASE_REGIONSERVER_UID="hbase"
-fi
-
 # Verify if hbase has the mlock agent
 if [ "$HBASE_REGIONSERVER_MLOCK" = "true" ]; then
-  MLOCK_AGENT="$HBASE_HOME/native/libmlockall_agent.so"
+  MLOCK_AGENT="$HBASE_HOME/lib/native/libmlockall_agent.so"
   if [ ! -f "$MLOCK_AGENT" ]; then
     cat 1>&2 <<EOF
 Unable to find mlockall_agent, hbase must be compiled with -Pnative
 EOF
     exit 1
   fi
-
-  HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -agentpath:$MLOCK_AGENT=user=$HBASE_REGIONSERVER_UID"
+  if [ -z "$HBASE_REGIONSERVER_UID" ] || [ "$HBASE_REGIONSERVER_UID" == "$USER" ]; then
+      HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -agentpath:$MLOCK_AGENT"
+  else
+      HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -agentpath:$MLOCK_AGENT=user=$HBASE_REGIONSERVER_UID"
+  fi
 fi
 
 # Newer versions of glibc use an arena memory allocator that causes virtual


Mime
View raw message