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

    https://github.com/apache/spark/pull/4873#discussion_r25713616
  
    --- 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 --
    
    Hmm... not sure about this one. The thrift server probably won't run, in 
many cases, if the datanucleus jars are not added to its classpath. So won't 
apps that use HiveContext with a local metastore, for example. Perhaps this 
should be an error instead? Of maybe try to be smart and look at 
`$JAVA_HOME/../bin/jar` too?
    
    (BTW, shameless plug: SPARK-4924 fixes this. But it's not in 1.3.)


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to