Enabling UseNUMA flag for hadoop?

I wish to enable UseNUMA flag for my hadoop framework which uses java.

The problem is I don't know which all places java command has been called by hadoop framework.

So, I've written alias for java command in /etc/bash.bashrc as

alias java='java -XX:+UseNUMA'

Is it the right way to do it?

How will I know if the flag is turned on or not? I mean can check this using following command

# java -XX:+PrintFlagsFinal | grep UseNUMA

But how to check if hadoop is using it or not?

Answers


Creating an alias in bashrc won't be useful. Hadoop uses the environment variable JAVA_HOME for locating java home, java command is taken from the path ${JAVA_HOME}/bin/java. So even if you create an alias in your .bashrc, will be useless.

For specifying JVM flags during hadoop daemon's starts, make use of the configuration file /hadoop-env.sh specify the flags in the environment variable.

export HADOOP_NAMENODE_OPTS="-XX:+UseNUMA -Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS"
export HADOOP_SECONDARYNAMENODE_OPTS="-XX:+UseNUMA -Dcom.sun.management.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS"
export HADOOP_DATANODE_OPTS="-XX:+UseNUMA -Dcom.sun.management.jmxremote $HADOOP_DATANODE_OPTS"
export HADOOP_BALANCER_OPTS="-XX:+UseNUMA -Dcom.sun.management.jmxremote $HADOOP_BALANCER_OPTS"
export HADOOP_JOBTRACKER_OPTS="-XX:+UseNUMA -Dcom.sun.management.jmxremote $HADOOP_JOBTRACKER_OPTS"

Enabling the same in Client side while executing the co like hadoop,yarn,mapred use the following environment variable

export HADOOP_OPTS="-XX:+UseNUMA"

For checking the flag is enabled or not, following command can be used.

ps aux | grep hadoop

Need Your Help

How would I set a PHP session via JavaScript (Facebook SDK)

facebook facebook-javascript-sdk facebook-php-sdk facebook-apps facebook-login

I'm creating a Login Function using Facebook's SDK. I'm re-using code from a previous project that had a Login button which redirected to a Login Box on the Facebook Domain (i.e. the Login box was ...