Details
Description
Additional Java options added to "yarn-env.sh" such as
export YARN_NODEMANAGER_OPTS="$YARN_NODEMANAGER_OPTS -Duser.country=XX"
adds the same Java option two times to YARN process. Processes are started with "service" command and environment variables of the process are checked with "sed -e 's/\x0/\n/g' /proc/<PID>/environ".
This occurs because "yarn-env.sh" is executed two times from "/usr/lib/hadoop-yarn/sbin/yarn-daemon.sh" and "/usr/lib/hadoop-yarn/bin/yarn" when starting.
This is already fixed in Hadoop3.0.0-alpha1 in Hadoop-9902 but I think it is better to correct this in Hadoop2.* too.