FAQ
Hello,

I'm currently running CDH 4.6 in a CM5 managed cluster. Running CentOs 6.2

I want to switch to Java 7.

1-I installed the java package
2-changed the /usr/java/latest link to point to the jdk1.7 path
(/usr/java/jdk1.7.0_45-cloudera in my case). /usr/java/default points to
latest so invoking "java -version" returns 1.7.0_45
3-Shut down all the cluster services
4-Restarted the agents on all nodes
5-Agent log now says : [15/Apr/2014 12:57:57 +0000] 27848
Monitor-HostMonitor throttling_logger INFO Using java location:
'/usr/java/jdk1.7.0_45-cloudera/bin/java'.

But for some reasons, the service still start using the 1.6 binary.

  ps -elf | grep hdfs

hdfs 28274 27881 23 80 0 - 435551 futex_ 12:58 ? 00:03:15
/usr/java/*jdk1.6.0_31*/bin/java -Dproc_namenode -Xmx1000m
-Dhdfs.audit.logger=INFO,RFAAUDIT -Dsecurity.audit.logger=INFO,RFAS
-Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/var/log/hadoop-hdfs[...]

What am I missing? Does it have to do with the trailing "-cloudera" in the
Java path? I installed it from the cloudera-manager repo...

Thanks
Phil

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

Search Discussions

  • Darren Lo at Apr 15, 2014 at 7:12 pm
    Hi Phil,

    Why do you want CDH 4 to run on Java 7? It works just fine on Java 6.

    CM 5 will install both JDK 6 and 7 for you. Even though both JDK6 and 7 are
    installed, and java -version reports Java 6, CM and all CDH daemons will
    automatically pick the correct version of Java. They do not rely on what is
    on the path by default.

    CM 5 will prefer JDK 7 or JDK 6 (but works with both).

    CDH 5 requires JDK 7 and will pick it even if the wrong java (or no java)
    is on the path.

    CDH 4 generally prefers JDK 6.

    I think you can change this behavior by altering JAVA_HOME to point to your
    JDK 7. You may need to restart or hard restart (which will restart all of
    your services) agents to pick this up.

    Thanks,
    Darren

    On Tue, Apr 15, 2014 at 6:14 AM, Philippe Marseille wrote:

    Hello,

    I'm currently running CDH 4.6 in a CM5 managed cluster. Running CentOs 6.2

    I want to switch to Java 7.

    1-I installed the java package
    2-changed the /usr/java/latest link to point to the jdk1.7 path
    (/usr/java/jdk1.7.0_45-cloudera in my case). /usr/java/default points to
    latest so invoking "java -version" returns 1.7.0_45
    3-Shut down all the cluster services
    4-Restarted the agents on all nodes
    5-Agent log now says : [15/Apr/2014 12:57:57 +0000] 27848
    Monitor-HostMonitor throttling_logger INFO Using java location:
    '/usr/java/jdk1.7.0_45-cloudera/bin/java'.

    But for some reasons, the service still start using the 1.6 binary.

    ps -elf | grep hdfs

    hdfs 28274 27881 23 80 0 - 435551 futex_ 12:58 ? 00:03:15
    /usr/java/*jdk1.6.0_31*/bin/java -Dproc_namenode -Xmx1000m
    -Dhdfs.audit.logger=INFO,RFAAUDIT -Dsecurity.audit.logger=INFO,RFAS
    -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/var/log/hadoop-hdfs[...]

    What am I missing? Does it have to do with the trailing "-cloudera" in
    the Java path? I installed it from the cloudera-manager repo...

    Thanks
    Phil

    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.
  • Philip Langdale at Apr 15, 2014 at 10:16 pm
    CDH 4.6 will prefer java 6 so this is expected.

    CM5 has a host config to specify the java home. Set this and it will
    override the detection logic.

    --phil

    On 15 April 2014 12:12, Darren Lo wrote:

    Hi Phil,

    Why do you want CDH 4 to run on Java 7? It works just fine on Java 6.

    CM 5 will install both JDK 6 and 7 for you. Even though both JDK6 and 7
    are installed, and java -version reports Java 6, CM and all CDH daemons
    will automatically pick the correct version of Java. They do not rely on
    what is on the path by default.

    CM 5 will prefer JDK 7 or JDK 6 (but works with both).

    CDH 5 requires JDK 7 and will pick it even if the wrong java (or no java)
    is on the path.

    CDH 4 generally prefers JDK 6.

    I think you can change this behavior by altering JAVA_HOME to point to
    your JDK 7. You may need to restart or hard restart (which will restart all
    of your services) agents to pick this up.

    Thanks,
    Darren

    On Tue, Apr 15, 2014 at 6:14 AM, Philippe Marseille wrote:

    Hello,

    I'm currently running CDH 4.6 in a CM5 managed cluster. Running CentOs
    6.2

    I want to switch to Java 7.

    1-I installed the java package
    2-changed the /usr/java/latest link to point to the jdk1.7 path
    (/usr/java/jdk1.7.0_45-cloudera in my case). /usr/java/default points to
    latest so invoking "java -version" returns 1.7.0_45
    3-Shut down all the cluster services
    4-Restarted the agents on all nodes
    5-Agent log now says : [15/Apr/2014 12:57:57 +0000] 27848
    Monitor-HostMonitor throttling_logger INFO Using java location:
    '/usr/java/jdk1.7.0_45-cloudera/bin/java'.

    But for some reasons, the service still start using the 1.6 binary.

    ps -elf | grep hdfs

    hdfs 28274 27881 23 80 0 - 435551 futex_ 12:58 ? 00:03:15
    /usr/java/*jdk1.6.0_31*/bin/java -Dproc_namenode -Xmx1000m
    -Dhdfs.audit.logger=INFO,RFAAUDIT -Dsecurity.audit.logger=INFO,RFAS
    -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/var/log/hadoop-hdfs[...]

    What am I missing? Does it have to do with the trailing "-cloudera" in
    the Java path? I installed it from the cloudera-manager repo...

    Thanks
    Phil

    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.
    To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.
  • Philippe Marseille at Apr 16, 2014 at 11:32 am
    Running Java 7 is a company policy for our workstation (enforced by our
    local security group.. long story). Since the dev is done on our
    workstation, deploying Java 7 bytecode does not work on Java 6 VM... so we
    would like to switch the Java 7 on the cluster as well. Right now, we do
    the dev on our machine and compile on one of the cluster's machine.

    Thanks for the explanation, it makes sense - we have Java 6 and 7 installed
    on the cluster (also reported by the Host inspector) and I wasn't aware
    there would be a "prefered choice".

    -->Found the option, "Java Home Directory", will try this out.
    On Tuesday, 15 April 2014 18:16:07 UTC-4, Philip Langdale wrote:

    CDH 4.6 will prefer java 6 so this is expected.

    CM5 has a host config to specify the java home. Set this and it will
    override the detection logic.

    --phil

    On 15 April 2014 12:12, Darren Lo <d...@cloudera.com <javascript:>> wrote:

    Hi Phil,

    Why do you want CDH 4 to run on Java 7? It works just fine on Java 6.

    CM 5 will install both JDK 6 and 7 for you. Even though both JDK6 and 7
    are installed, and java -version reports Java 6, CM and all CDH daemons
    will automatically pick the correct version of Java. They do not rely on
    what is on the path by default.

    CM 5 will prefer JDK 7 or JDK 6 (but works with both).

    CDH 5 requires JDK 7 and will pick it even if the wrong java (or no java)
    is on the path.

    CDH 4 generally prefers JDK 6.

    I think you can change this behavior by altering JAVA_HOME to point to
    your JDK 7. You may need to restart or hard restart (which will restart all
    of your services) agents to pick this up.

    Thanks,
    Darren


    On Tue, Apr 15, 2014 at 6:14 AM, Philippe Marseille <mars...@gmail.com<javascript:>
    wrote:
    Hello,

    I'm currently running CDH 4.6 in a CM5 managed cluster. Running CentOs
    6.2

    I want to switch to Java 7.

    1-I installed the java package
    2-changed the /usr/java/latest link to point to the jdk1.7 path
    (/usr/java/jdk1.7.0_45-cloudera in my case). /usr/java/default points to
    latest so invoking "java -version" returns 1.7.0_45
    3-Shut down all the cluster services
    4-Restarted the agents on all nodes
    5-Agent log now says : [15/Apr/2014 12:57:57 +0000] 27848
    Monitor-HostMonitor throttling_logger INFO Using java location:
    '/usr/java/jdk1.7.0_45-cloudera/bin/java'.

    But for some reasons, the service still start using the 1.6 binary.

    ps -elf | grep hdfs

    hdfs 28274 27881 23 80 0 - 435551 futex_ 12:58 ? 00:03:15
    /usr/java/*jdk1.6.0_31*/bin/java -Dproc_namenode -Xmx1000m
    -Dhdfs.audit.logger=INFO,RFAAUDIT -Dsecurity.audit.logger=INFO,RFAS
    -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/var/log/hadoop-hdfs[...]

    What am I missing? Does it have to do with the trailing "-cloudera" in
    the Java path? I installed it from the cloudera-manager repo...

    Thanks
    Phil

    To unsubscribe from this group and stop receiving emails from it, send
    an email to scm-users+...@cloudera.org <javascript:>.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to scm-users+...@cloudera.org <javascript:>.
    To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.
  • Skr989 at Apr 17, 2014 at 5:36 pm
    To fix this may require some outage - so be prepared just in case.


        1. Stop all services from the cloudera manager.
        2. Stop cloudera manager
        3. Since you already upgraded JDK to 1.7 - delete /usr/java/jdk1.6.x
        4. Restart cloudera manager agents
        5. Start back cloudera manager and all the services.

    If you run into issues, you may have to check "alternatives" and set them
    accordingly.

    Hope this helps.

    -SR
    On Tuesday, April 15, 2014 8:14:46 AM UTC-5, Philippe Marseille wrote:

    Hello,

    I'm currently running CDH 4.6 in a CM5 managed cluster. Running CentOs 6.2

    I want to switch to Java 7.

    1-I installed the java package
    2-changed the /usr/java/latest link to point to the jdk1.7 path
    (/usr/java/jdk1.7.0_45-cloudera in my case). /usr/java/default points to
    latest so invoking "java -version" returns 1.7.0_45
    3-Shut down all the cluster services
    4-Restarted the agents on all nodes
    5-Agent log now says : [15/Apr/2014 12:57:57 +0000] 27848
    Monitor-HostMonitor throttling_logger INFO Using java location:
    '/usr/java/jdk1.7.0_45-cloudera/bin/java'.

    But for some reasons, the service still start using the 1.6 binary.

    ps -elf | grep hdfs

    hdfs 28274 27881 23 80 0 - 435551 futex_ 12:58 ? 00:03:15
    /usr/java/*jdk1.6.0_31*/bin/java -Dproc_namenode -Xmx1000m
    -Dhdfs.audit.logger=INFO,RFAAUDIT -Dsecurity.audit.logger=INFO,RFAS
    -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/var/log/hadoop-hdfs[...]

    What am I missing? Does it have to do with the trailing "-cloudera" in
    the Java path? I installed it from the cloudera-manager repo...

    Thanks
    Phil
    To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.
  • Darren Lo at Apr 17, 2014 at 6:43 pm
    It requires an outage, but it's better to use Phil's suggestion to alter
    your host configuration (for all hosts) for java home. CM already prefers
    JDK1.7 by default, so you shouldn't need to restart it. You don't need to
    delete jdk 1.6 and the alternatives system is ignored. Restarting agents
    isn't necessary either. So it should be:
    1. Change host configuration to use java 1.7
    2. Restart cluster(s)

    On Thu, Apr 17, 2014 at 10:36 AM, wrote:

    To fix this may require some outage - so be prepared just in case.


    1. Stop all services from the cloudera manager.
    2. Stop cloudera manager
    3. Since you already upgraded JDK to 1.7 - delete /usr/java/jdk1.6.x
    4. Restart cloudera manager agents
    5. Start back cloudera manager and all the services.

    If you run into issues, you may have to check "alternatives" and set them
    accordingly.

    Hope this helps.

    -SR
    On Tuesday, April 15, 2014 8:14:46 AM UTC-5, Philippe Marseille wrote:

    Hello,

    I'm currently running CDH 4.6 in a CM5 managed cluster. Running CentOs
    6.2

    I want to switch to Java 7.

    1-I installed the java package
    2-changed the /usr/java/latest link to point to the jdk1.7 path
    (/usr/java/jdk1.7.0_45-cloudera in my case). /usr/java/default points
    to latest so invoking "java -version" returns 1.7.0_45
    3-Shut down all the cluster services
    4-Restarted the agents on all nodes
    5-Agent log now says : [15/Apr/2014 12:57:57 +0000] 27848
    Monitor-HostMonitor throttling_logger INFO Using java location:
    '/usr/java/jdk1.7.0_45-cloudera/bin/java'.

    But for some reasons, the service still start using the 1.6 binary.

    ps -elf | grep hdfs

    hdfs 28274 27881 23 80 0 - 435551 futex_ 12:58 ? 00:03:15
    /usr/java/*jdk1.6.0_31*/bin/java -Dproc_namenode -Xmx1000m
    -Dhdfs.audit.logger=INFO,RFAAUDIT -Dsecurity.audit.logger=INFO,RFAS
    -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/var/log/
    hadoop-hdfs[...]

    What am I missing? Does it have to do with the trailing "-cloudera" in
    the Java path? I installed it from the cloudera-manager repo...

    Thanks
    Phil
    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
postedApr 15, '14 at 1:14p
activeApr 17, '14 at 6:43p
posts6
users4
websitecloudera.com
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase