Bigtop
  1. Bigtop
  2. BIGTOP-843

It would be really cool if bigtop-detect-javahome were smarter and didn't pick a 32-bit JVM, or a 1.7 JVM set with default

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.6.0
    • Component/s: general
    • Labels:
      None

      Description

      I see more and more folks with whacked versions of java configured in /usr/java/default or /usr/lib/jvm/default-java that are pointing to 32-bit JVMs or are simply not even a 1.6 JVM. I was wondering if we could do a bit more intelligence in this script and run a java -version to rule out a 32-bit JVM or a 1.7 JDK? Or would that be too error prone?

      if [ -z "$JAVA_HOME" ]; then
      for candidate in \
      /usr/lib/jvm/java-6-sun \
      /usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre/ \
      /usr/lib/jvm/java-1.6.0-sun-1.6.0.* \
      /usr/lib/jvm/j2sdk1.6-oracle \
      /usr/lib/jvm/j2sdk1.6-oracle/jre \
      /usr/lib/j2sdk1.6-sun \
      /usr/java/jdk1.6* \
      /usr/java/jre1.6* \
      /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.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
      fi

        Activity

        Hide
        Mark Grover added a comment -

        Thanks for filing this, Robert! I, personally, would be ok with ensuring that the JVM being picked up from generic paths (ones you suggested and others like Library/Java/Home) is not 32 bit. I am not too sure about doing it for 1.7 JDK though. Would love to hear other people's opinion.

        Show
        Mark Grover added a comment - Thanks for filing this, Robert! I, personally, would be ok with ensuring that the JVM being picked up from generic paths (ones you suggested and others like Library/Java/Home) is not 32 bit. I am not too sure about doing it for 1.7 JDK though. Would love to hear other people's opinion.
        Hide
        Sean Mackrory added a comment - - edited

        Hadoop will need to run well on Java 7 sooner or later, so I'm hesitant to cut that off (I try to use Java 7 when I can) and I don't know if any contributors or downstream projects / users are using 32-bit, but personally I'm okay with cutting that off. In my opinion, serious users should be explicitly specifying the JVM to be used in /etc/default/bigtop-utils anyway, so maybe we should make that a more obvious step in the process of getting Bigtop up and running? If somebody wants to run Bigtop on Java 7 or 32-bit, I don't think bigtop-utils should be getting in the way unnecessarily, but if it really makes a big difference in terms of working well out-of-the-box for a lot of people, I'm not opposed to it.

        Show
        Sean Mackrory added a comment - - edited Hadoop will need to run well on Java 7 sooner or later, so I'm hesitant to cut that off (I try to use Java 7 when I can) and I don't know if any contributors or downstream projects / users are using 32-bit, but personally I'm okay with cutting that off. In my opinion, serious users should be explicitly specifying the JVM to be used in /etc/default/bigtop-utils anyway, so maybe we should make that a more obvious step in the process of getting Bigtop up and running? If somebody wants to run Bigtop on Java 7 or 32-bit, I don't think bigtop-utils should be getting in the way unnecessarily, but if it really makes a big difference in terms of working well out-of-the-box for a lot of people, I'm not opposed to it.
        Hide
        Konstantin Boudnik added a comment -

        A lot of enterprises are running on jre6 and - from my time back in Sun JDK project - will be doing this for years to come. That means that Hadoop and Co will have to support at least -target=1.6 and produce meaningful bytecode.

        Hence, I would object using JDK7 as default at least until Oracle keep producing crazy regressions like the recent one reported on the River dev list.

        Show
        Konstantin Boudnik added a comment - A lot of enterprises are running on jre6 and - from my time back in Sun JDK project - will be doing this for years to come. That means that Hadoop and Co will have to support at least -target=1.6 and produce meaningful bytecode. Hence, I would object using JDK7 as default at least until Oracle keep producing crazy regressions like the recent one reported on the River dev list.
        Hide
        Konstantin Boudnik added a comment -

        Hasn't this been fixed in master as b8e4e4c? If so - please close it as fixed.

        Show
        Konstantin Boudnik added a comment - Hasn't this been fixed in master as b8e4e4c? If so - please close it as fixed.

          People

          • Assignee:
            Mark Grover
            Reporter:
            Robert Justice
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development