You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by kellrott <gi...@git.apache.org> on 2014/03/09 07:13:06 UTC
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
GitHub user kellrott opened a pull request:
https://github.com/apache/spark/pull/109
Ability to initialize Spark-Shell with command script
This script allows a user to define a script file with code that will be executed when then spark-shell starts up.
This initialization script file can be set either by setting the SPARK_SHELL_RC environmental variable to the path, or by placing a file at $HOME/.spark_shell_rc (the environmental variable takes precedence over the home directory file)
There are two main usage scenarios:
1) The user has a set of commands they want run automatically whenever they open spark-shell
2) Other software packages that depend on spark, and want to provide easy access to their code in a way similar to spark-shell, can provide a wrapper shell for spark-shell that adds the tool jars with ADD_JARS and then executes an initialization with SPARK_SHELL_RC to do all the import calls and variable initialization.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kellrott/spark shell-rc
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/109.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 #109
----
commit 6432e0c30d3605498582313bd8728e7b9cc5413b
Author: Kyle Ellrott <ke...@gmail.com>
Date: 2014-03-09T01:59:21Z
Adding code to execute rc file at start of spark-shell. Either defined via environmental variable SPARKSHELL_RC or by file at $HOME/.spark_shell_rc
commit 6a30cfdfe946017748620ae7fb89daa3a2dc5eae
Author: Kyle Ellrott <ke...@gmail.com>
Date: 2014-03-09T05:02:29Z
Changing SPARKSHELL_RC to SPARK_SHELL_RC
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/109#issuecomment-37121123
Merged build finished.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/109#issuecomment-37121124
All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13082/
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/109#issuecomment-37120323
Merged build triggered.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by kellrott <gi...@git.apache.org>.
Github user kellrott closed the pull request at:
https://github.com/apache/spark/pull/109
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/109#issuecomment-37120324
Merged build started.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by kellrott <gi...@git.apache.org>.
Github user kellrott commented on the pull request:
https://github.com/apache/spark/pull/109#issuecomment-37154745
That would be enough for my usage. Wasn't aware of the '-i' flag, it doesn't show up in the '--help' and wasn't mentioned when I asked about this feature in spark-users
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by mateiz <gi...@git.apache.org>.
Github user mateiz commented on the pull request:
https://github.com/apache/spark/pull/109#issuecomment-37147073
You can actually already use the `-i` argument on `spark-shell` (similar to on `scala`) to load a script at the beginning. Is that enough? We don't want to diverge too much from the existing Scala shell.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by mateiz <gi...@git.apache.org>.
Github user mateiz commented on the pull request:
https://github.com/apache/spark/pull/109#issuecomment-37156133
Yeah let's add those flags to help. I didn't realize that they weren't shown.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: Ability to initialize Spark-Shell with command...
Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:
https://github.com/apache/spark/pull/109#issuecomment-37154936
What if instead we added to the help docs the `-i` and `-e` flag from the scala repl? I don't think there is any way for the user to see these now. We should make sure these both work though and that spark-shell doesn't gobble them somehow.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---