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

    https://github.com/apache/spark/pull/877#discussion_r13034676
  
    --- 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 --
    
    This is not exactly a new problem, but may be exacerbated here. Could this 
new-fangled way of returning output instead of a classpath in error conditions 
result in bad things happening here:
    
https://github.com/apache/spark/blob/5af99d7617ba3b9fbfdb345ef9571b7dd41f45a1/core/src/main/scala/org/apache/spark/deploy/worker/CommandUtils.scala#L72
    ?


---
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