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

    https://github.com/apache/spark/pull/4873#discussion_r25714556
  
    --- Diff: bin/compute-classpath.sh ---
    @@ -121,10 +124,15 @@ datanucleus_jars="$(find "$datanucleus_dir" 
2>/dev/null | grep "datanucleus-.*\\
     datanucleus_jars="$(echo "$datanucleus_jars" | tr "\n" : | sed s/:$//g)"
     
     if [ -n "$datanucleus_jars" ]; then
    -  hive_files=$("$JAR_CMD" -tf "$ASSEMBLY_JAR" 
org/apache/hadoop/hive/ql/exec 2>/dev/null)
    -  if [ -n "$hive_files" ]; then
    -    echo "Spark assembly has been built with Hive, including Datanucleus 
jars on classpath" 1>&2
    -    CLASSPATH="$CLASSPATH:$datanucleus_jars"
    +  if [ $(command -v "$JAR_CMD") ] ; then
    +    hive_files=$("$JAR_CMD" -tf "$ASSEMBLY_JAR" 
org/apache/hadoop/hive/ql/exec 2>/dev/null)
    +    if [ -n "$hive_files" ]; then
    +      echo "Spark assembly has been built with Hive, including Datanucleus 
jars on classpath" 1>&2
    +      CLASSPATH="$CLASSPATH:$datanucleus_jars"
    +    fi
    +  else
    +    echo "No jar command available; unable to check if assembly was built 
with Hive."
    --- End diff --
    
    Yeah, this upgrades silence to a warning; upgrading it to an error however 
means that a JDK is suddenly required to run the thrift server et al, which 
does not seem like something that should be required (production usually 
disallows JDKs). However, yes, my question is: why not just always add these 
JARs if there's doubt, and they're present? They could be added in the `else` 
block, or, why bother inspecting what is built into the assembly anyway?


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