GitHub user CodingCat opened a pull request:

    https://github.com/apache/spark/pull/1331

    SPARK-2404: don't overwrite SPARK_HOME when it is set

    In spark-class and spark-submit, the SPARK_HOME is set to the present 
working directory, causing the value of already defined SPARK_HOME being 
overwritten
    
    We should not overwrite that if SPARK_HOME has been defined
    
    Our scenario:
    
    We have a login portal for all the team members to use the spark-cluster, 
everyone gets an account and home directory. Spark-1.0 is copied in the root 
path "/", every account gets a software link to the /spark-1.0 in it's home 
directory. 
    
    Spark 1.0 is deployed in a cluster, where the user name is different with 
any accounts except one, say "CodingCat", we set a global SPARK_HOME to 
/home/CodingCat/spark-1.0 which is consistent with the remote cluster setup, 
but unfortunately, this is overwritten by the spark-class and spark-submit 
....so in login portal, when the user runs spark-shell, it always tries to run 
/home/user_account/spark-1.0/bin/compute-class.sh, which does not exist.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/CodingCat/spark SPARK-2404

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/1331.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1331
    
----
commit 90c8310e66992ae8a57665d7eb3002db64692285
Author: CodingCat <[email protected]>
Date:   2014-07-08T17:36:10Z

    don't overwrite SPARK_HOME when it is set

----


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