HBASE-14354 Minor improvements for usage of the mlock agent
This commit is contained in:
parent
5bb36f1594
commit
f8dd99d738
|
@ -98,22 +98,20 @@ if [ -z "$HBASE_ENV_INIT" ] && [ -f "${HBASE_CONF_DIR}/hbase-env.sh" ]; then
|
||||||
export HBASE_ENV_INIT="true"
|
export HBASE_ENV_INIT="true"
|
||||||
fi
|
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
|
# Verify if hbase has the mlock agent
|
||||||
if [ "$HBASE_REGIONSERVER_MLOCK" = "true" ]; then
|
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
|
if [ ! -f "$MLOCK_AGENT" ]; then
|
||||||
cat 1>&2 <<EOF
|
cat 1>&2 <<EOF
|
||||||
Unable to find mlockall_agent, hbase must be compiled with -Pnative
|
Unable to find mlockall_agent, hbase must be compiled with -Pnative
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ -z "$HBASE_REGIONSERVER_UID" ] || [ "$HBASE_REGIONSERVER_UID" == "$USER" ]; then
|
||||||
HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -agentpath:$MLOCK_AGENT=user=$HBASE_REGIONSERVER_UID"
|
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
|
fi
|
||||||
|
|
||||||
# Newer versions of glibc use an arena memory allocator that causes virtual
|
# Newer versions of glibc use an arena memory allocator that causes virtual
|
||||||
|
|
Loading…
Reference in New Issue