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

    https://github.com/apache/spark/pull/877#discussion_r13056089
  
    --- Diff: bin/compute-classpath.sh ---
    @@ -51,17 +53,31 @@ if [ -f "$ASSEMBLY_DIR"/spark-assembly*hadoop*-deps.jar 
]; then
       
CLASSPATH="$CLASSPATH:$FWDIR/sql/core/target/scala-$SCALA_VERSION/classes"
       
CLASSPATH="$CLASSPATH:$FWDIR/sql/hive/target/scala-$SCALA_VERSION/classes"
       
CLASSPATH="$CLASSPATH:$FWDIR/yarn/stable/target/scala-$SCALA_VERSION/classes"
    +fi
     
    -  ASSEMBLY_JAR=$(ls "$ASSEMBLY_DIR"/spark-assembly*hadoop*-deps.jar 
2>/dev/null)
    +# Use spark-assembly jar from either RELEASE or assembly directory
    +if [ -f "$FWDIR/RELEASE" ]; then
    +  assembly_folder="$FWDIR"/lib
     else
    -  # Else use spark-assembly jar from either RELEASE or assembly directory
    -  if [ -f "$FWDIR/RELEASE" ]; then
    -    ASSEMBLY_JAR=$(ls "$FWDIR"/lib/spark-assembly*hadoop*.jar 2>/dev/null)
    -  else
    -    ASSEMBLY_JAR=$(ls "$ASSEMBLY_DIR"/spark-assembly*hadoop*.jar 
2>/dev/null)
    -  fi
    +  assembly_folder="$ASSEMBLY_DIR"
     fi
     
    +num_jars=$(ls "$assembly_folder" | grep "spark-assembly.*hadoop.*.jar" | 
wc -l)
    +if [ "$num_jars" -eq "0" ]; then
    +  echo "Failed to find Spark assembly in $assembly_folder"
    +  echo "You need to build Spark before running this program."
    +  exit 1
    --- End diff --
    
    Couldn't we pipe the message to stderr to avoid breaking existing behavior ?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to