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

    https://github.com/apache/spark/pull/877#discussion_r13034705
  
    --- 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)
    --- End diff --
    
    Do we anticipate any Byzantine user scenarios where they name their jar 
"spark-assembly-hadoop!jar", causing this grep to succeed, but ASSEMBLY_JAR to 
be empty? Perhaps fight against such users, we could escape the final `.` here. 
Or else let them win.


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

Reply via email to