Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3916#discussion_r25287706
  
    --- Diff: bin/spark-class ---
    @@ -110,83 +39,48 @@ else
         exit 1
       fi
     fi
    -JAVA_VERSION=$("$RUNNER" -version 2>&1 | grep 'version' | sed 's/.* 
version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
    -
    -# Set JAVA_OPTS to be able to load native libraries and to set heap size
    -if [ "$JAVA_VERSION" -ge 18 ]; then
    -  JAVA_OPTS="$OUR_JAVA_OPTS"
    -else
    -  JAVA_OPTS="-XX:MaxPermSize=128m $OUR_JAVA_OPTS"
    -fi
    -JAVA_OPTS="$JAVA_OPTS -Xms$OUR_JAVA_MEM -Xmx$OUR_JAVA_MEM"
    -
    -# Load extra JAVA_OPTS from conf/java-opts, if it exists
    -if [ -e "$SPARK_CONF_DIR/java-opts" ] ; then
    -  JAVA_OPTS="$JAVA_OPTS `cat "$SPARK_CONF_DIR"/java-opts`"
    -fi
    -
    -# Attention: when changing the way the JAVA_OPTS are assembled, the change 
must be reflected in CommandUtils.scala!
    -
    -TOOLS_DIR="$FWDIR"/tools
    -SPARK_TOOLS_JAR=""
    -if [ -e 
"$TOOLS_DIR"/target/scala-$SPARK_SCALA_VERSION/spark-tools*[0-9Tg].jar ]; then
    -  # Use the JAR from the SBT build
    -  export SPARK_TOOLS_JAR="`ls 
"$TOOLS_DIR"/target/scala-$SPARK_SCALA_VERSION/spark-tools*[0-9Tg].jar`"
    -fi
    -if [ -e "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar ]; then
    -  # Use the JAR from the Maven build
    -  # TODO: this also needs to become an assembly!
    -  export SPARK_TOOLS_JAR="`ls "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar`"
    -fi
     
    -# Compute classpath using external script
    -classpath_output=$("$FWDIR"/bin/compute-classpath.sh)
    -if [[ "$?" != "0" ]]; then
    -  echo "$classpath_output"
    -  exit 1
    -else
    -  CLASSPATH="$classpath_output"
    -fi
    +# Look for the launcher. In non-release mode, add the compiled classes 
directly to the classpath
    +# instead of looking for a jar file, since it's very common for people 
using sbt to use the
    +# "assembly" target instead of "package".
    --- End diff --
    
    I removed the sbt part, but I don't know what you mean by the rest of the 
question. This code adds the compiled classes to the classpath in non-release 
mode, just like the comment says.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to