FAQ
Setting it into /etc/default/cloudera-scm-agent or into CM -> MR ->
Configuration -> Service Environment Safety Valve would usually do
this.

What was your entry in /etc/default/cloudera-scm-agent?
On Thu, Feb 13, 2014 at 12:35 AM, m shirley wrote:
I've searched and searched and I've found multiple possible solutions,
unfortunately none of them work.

It's pretty simple, I want my tasktrackers to use
JAVA_HOME="/usr/java/default".

Here are all the places I've attempted to manually set JAVA_HOME:

/etc/environment
/etc/profile
/etc/default/cloudera-scm-agent
/etc/default/bigtop-utils
/etc/hadoop/conf/hadoop-env.sh

I've also attempted to ensure sudo keeps JAVA_HOME by adding it to env_keep
in /etc/sudoers.

I've restarted cloudera-scm-agent numerous times, I've also restarted the
tasktracker numerous multiple times.

No matter what I change in these files the tasktracker service will always
use an old version.

I know I can use the mapreduce service level environment safety valve but
for now I only want to make this change on a few tasktrackers for testing,
not the entire cluster.

The only way I can get the tasktracker service to use the correct JAVA_HOME
is by modifying /usr/lib64/cmf/service/common/cloudera-config.sh and remove
directory paths I don't want it to look in.

if [ -z "$JAVA_HOME" ]; then
for candidate in \
/usr/lib/j2sdk1.6-sun \
/usr/lib/jvm/java-6-sun \
/usr/lib/jvm/java-1.6.0-sun-1.6.0.* \
/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre/ \
/usr/lib/jvm/j2sdk1.6-oracle \
/usr/lib/jvm/j2sdk1.6-oracle/jre \
/usr/java/jdk1.6* \
/usr/java/jre1.6* \
/usr/java/jdk1.7* \
/usr/java/jre1.7* \
/usr/lib/jvm/j2sdk1.7-oracle \
/usr/lib/jvm/j2sdk1.7-oracle/jre \
/Library/Java/Home \
/usr/java/default \
/usr/lib/jvm/default-java \
/usr/lib/jvm/java-openjdk \
/usr/lib/jvm/jre-openjdk \
/usr/lib/jvm/java-1.7.0-openjdk* \
/usr/lib/jvm/java-7-openjdk* \
/usr/lib/jvm/java-1.6.0-openjdk-1.6.* \
/usr/lib/jvm/jre-1.6.0-openjdk* ; do
if [ -e $candidate/bin/java ]; then
export JAVA_HOME=$candidate
break
fi
done

This script SHOULD be picking up $JAVA_HOME from all the other various
places I've set it, but it's not.

Why can't I manually specify JAVA_HOME for this tasktracker?

--

---
You received this message because you are subscribed to the Google Groups
"CDH Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to cdh-user+unsubscribe@cloudera.org.
For more options, visit
https://groups.google.com/a/cloudera.org/groups/opt_out.


--
Harsh J

To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.

Search Discussions

  • Philip Langdale at Feb 13, 2014 at 6:07 am
    Additionally, in CM5, including the just released beta 2, there is a host
    config you can set to override JAVA_HOME on a host or across all hosts.

    --phil

    On 12 February 2014 17:24, Harsh J wrote:

    Setting it into /etc/default/cloudera-scm-agent or into CM -> MR ->
    Configuration -> Service Environment Safety Valve would usually do
    this.

    What was your entry in /etc/default/cloudera-scm-agent?
    On Thu, Feb 13, 2014 at 12:35 AM, m shirley wrote:
    I've searched and searched and I've found multiple possible solutions,
    unfortunately none of them work.

    It's pretty simple, I want my tasktrackers to use
    JAVA_HOME="/usr/java/default".

    Here are all the places I've attempted to manually set JAVA_HOME:

    /etc/environment
    /etc/profile
    /etc/default/cloudera-scm-agent
    /etc/default/bigtop-utils
    /etc/hadoop/conf/hadoop-env.sh

    I've also attempted to ensure sudo keeps JAVA_HOME by adding it to env_keep
    in /etc/sudoers.

    I've restarted cloudera-scm-agent numerous times, I've also restarted the
    tasktracker numerous multiple times.

    No matter what I change in these files the tasktracker service will always
    use an old version.

    I know I can use the mapreduce service level environment safety valve but
    for now I only want to make this change on a few tasktrackers for testing,
    not the entire cluster.

    The only way I can get the tasktracker service to use the correct JAVA_HOME
    is by modifying /usr/lib64/cmf/service/common/cloudera-config.sh and remove
    directory paths I don't want it to look in.

    if [ -z "$JAVA_HOME" ]; then
    for candidate in \
    /usr/lib/j2sdk1.6-sun \
    /usr/lib/jvm/java-6-sun \
    /usr/lib/jvm/java-1.6.0-sun-1.6.0.* \
    /usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre/ \
    /usr/lib/jvm/j2sdk1.6-oracle \
    /usr/lib/jvm/j2sdk1.6-oracle/jre \
    /usr/java/jdk1.6* \
    /usr/java/jre1.6* \
    /usr/java/jdk1.7* \
    /usr/java/jre1.7* \
    /usr/lib/jvm/j2sdk1.7-oracle \
    /usr/lib/jvm/j2sdk1.7-oracle/jre \
    /Library/Java/Home \
    /usr/java/default \
    /usr/lib/jvm/default-java \
    /usr/lib/jvm/java-openjdk \
    /usr/lib/jvm/jre-openjdk \
    /usr/lib/jvm/java-1.7.0-openjdk* \
    /usr/lib/jvm/java-7-openjdk* \
    /usr/lib/jvm/java-1.6.0-openjdk-1.6.* \
    /usr/lib/jvm/jre-1.6.0-openjdk* ; do
    if [ -e $candidate/bin/java ]; then
    export JAVA_HOME=$candidate
    break
    fi
    done

    This script SHOULD be picking up $JAVA_HOME from all the other various
    places I've set it, but it's not.

    Why can't I manually specify JAVA_HOME for this tasktracker?

    --

    ---
    You received this message because you are subscribed to the Google Groups
    "CDH Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to cdh-user+unsubscribe@cloudera.org.
    For more options, visit
    https://groups.google.com/a/cloudera.org/groups/opt_out.


    --
    Harsh J

    To unsubscribe from this group and stop receiving emails from it, send an
    email to scm-users+unsubscribe@cloudera.org.
    To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscm-users @
categorieshadoop
postedFeb 13, '14 at 1:25a
activeFeb 13, '14 at 6:07a
posts2
users2
websitecloudera.com
irc#hadoop

2 users in discussion

Philip Langdale: 1 post Harsh J: 1 post

People

Translate

site design / logo © 2022 Grokbase