aboutsummaryrefslogtreecommitdiff
path: root/bin/spark-shell.cmd
diff options
context:
space:
mode:
authorMasayoshi TSUZUKI <tsudukim@oss.nttdata.co.jp>2014-10-14 18:50:14 -0700
committerAndrew Or <andrewor14@gmail.com>2014-10-14 18:50:14 -0700
commit66af8e2508bfe9c9d4aecc17a19f297c98e9661d (patch)
tree11918e2e8a293fb20ed6427613b5c134f47f90c0 /bin/spark-shell.cmd
parent7b4f39f647da1f7b1b57e38827a8639243c661cb (diff)
downloadspark-66af8e2508bfe9c9d4aecc17a19f297c98e9661d.tar.gz
spark-66af8e2508bfe9c9d4aecc17a19f297c98e9661d.tar.bz2
spark-66af8e2508bfe9c9d4aecc17a19f297c98e9661d.zip
[SPARK-3943] Some scripts bin\*.cmd pollutes environment variables in Windows
Modified not to pollute environment variables. Just moved the main logic into `XXX2.cmd` from `XXX.cmd`, and call `XXX2.cmd` with cmd command in `XXX.cmd`. `pyspark.cmd` and `spark-class.cmd` are already using the same way, but `spark-shell.cmd`, `spark-submit.cmd` and `/python/docs/make.bat` are not. Author: Masayoshi TSUZUKI <tsudukim@oss.nttdata.co.jp> Closes #2797 from tsudukim/feature/SPARK-3943 and squashes the following commits: b397a7d [Masayoshi TSUZUKI] [SPARK-3943] Some scripts bin\*.cmd pollutes environment variables in Windows
Diffstat (limited to 'bin/spark-shell.cmd')
-rwxr-xr-xbin/spark-shell.cmd5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/spark-shell.cmd b/bin/spark-shell.cmd
index 2ee60b4e2a..8f90ba5a0b 100755
--- a/bin/spark-shell.cmd
+++ b/bin/spark-shell.cmd
@@ -17,6 +17,7 @@ rem See the License for the specific language governing permissions and
rem limitations under the License.
rem
-set SPARK_HOME=%~dp0..
+rem This is the entry point for running Spark shell. To avoid polluting the
+rem environment, it just launches a new cmd to do the real work.
-cmd /V /E /C %SPARK_HOME%\bin\spark-submit.cmd --class org.apache.spark.repl.Main %* spark-shell
+cmd /V /E /C %~dp0spark-shell2.cmd %*