Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5208

Finding path to java executable should be deterministic

    XMLWordPrintableJSON

Details

    Description

      Command to find JAVA in drill-config.sh is not deterministic. drill-config.sh uses the following command to find JAVA:
      JAVA=`find -L "$JAVA_HOME" -name $JAVA_BIN -type f | head -n 1`

      On one of my node the following command returned 2 entries:
      find -L $JAVA_HOME -name java -type f
      /usr/local/java/jdk1.7.0_67/jre/bin/java
      /usr/local/java/jdk1.7.0_67/bin/java

      On another node, the same command returned entries in different order:
      find -L $JAVA_HOME -name java -type f
      /usr/local/java/jdk1.7.0_67/bin/java
      /usr/local/java/jdk1.7.0_67/jre/bin/java

      The complete command picks the first one returned which may not be the same on each node:
      find -L $JAVA_HOME -name java -type f | head -n 1
      /usr/local/java/jdk1.7.0_67/jre/bin/java

      If JAVA_HOME is found, we should just append the "bin/java" to the path"
      JAVA=$JAVA_HOME/bin/java

      Attachments

        Issue Links

          Activity

            People

              paul-rogers Paul Rogers
              knguyen Krystal
              Arina Ielchiieva Arina Ielchiieva
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: