Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/5156#discussion_r27016697
--- Diff: bin/compute-classpath.sh ---
@@ -25,17 +25,19 @@ FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
. "$FWDIR"/bin/load-spark-env.sh
-if [ -n "$SPARK_CLASSPATH" ]; then
- CLASSPATH="$SPARK_CLASSPATH:$SPARK_SUBMIT_CLASSPATH"
-else
- CLASSPATH="$SPARK_SUBMIT_CLASSPATH"
-fi
-
# Build up classpath
if [ -n "$SPARK_CONF_DIR" ]; then
- CLASSPATH="$CLASSPATH:$SPARK_CONF_DIR"
+ CLASSPATH="$SPARK_CONF_DIR"
else
- CLASSPATH="$CLASSPATH:$FWDIR/conf"
+ CLASSPATH="$FWDIR/conf"
+fi
+
+if [ -n "$SPARK_CLASSPATH" ]; then
+ CLASSPATH="$CLASSPATH:$SPARK_CLASSPATH"
+fi
+
+if [ -n "$SPARK_SUBMIT_CLASSPATH" ]; then
--- End diff --
So, specifically this is taking care of the case where
`SPARK_SUBMIT_CLASSPATH` is empty or not set? Otherwise I think it would be
equivalent, but yeah, we should handle that case and not add empty elements.
However your change here also puts the conf directories first, rather than
last, on the classpath. I don't know if that was intentional but I suppose it
would be better to not change that here if the problem being solved is just an
empty classpath element.
---
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]