Back to home page

OSCL-LXR

 
 

    


0001 @echo off
0002 
0003 rem
0004 rem Licensed to the Apache Software Foundation (ASF) under one or more
0005 rem contributor license agreements.  See the NOTICE file distributed with
0006 rem this work for additional information regarding copyright ownership.
0007 rem The ASF licenses this file to You under the Apache License, Version 2.0
0008 rem (the "License"); you may not use this file except in compliance with
0009 rem the License.  You may obtain a copy of the License at
0010 rem
0011 rem    http://www.apache.org/licenses/LICENSE-2.0
0012 rem
0013 rem Unless required by applicable law or agreed to in writing, software
0014 rem distributed under the License is distributed on an "AS IS" BASIS,
0015 rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0016 rem See the License for the specific language governing permissions and
0017 rem limitations under the License.
0018 rem
0019 
0020 rem Figure out where the Spark framework is installed
0021 call "%~dp0find-spark-home.cmd"
0022 
0023 call "%SPARK_HOME%\bin\load-spark-env.cmd"
0024 set _SPARK_CMD_USAGE=Usage: bin\pyspark.cmd [options]
0025 
0026 rem Figure out which Python to use.
0027 if "x%PYSPARK_DRIVER_PYTHON%"=="x" (
0028   set PYSPARK_DRIVER_PYTHON=python
0029   if not [%PYSPARK_PYTHON%] == [] set PYSPARK_DRIVER_PYTHON=%PYSPARK_PYTHON%
0030 )
0031 
0032 set PYTHONPATH=%SPARK_HOME%\python;%PYTHONPATH%
0033 set PYTHONPATH=%SPARK_HOME%\python\lib\py4j-0.10.9-src.zip;%PYTHONPATH%
0034 
0035 set OLD_PYTHONSTARTUP=%PYTHONSTARTUP%
0036 set PYTHONSTARTUP=%SPARK_HOME%\python\pyspark\shell.py
0037 
0038 call "%SPARK_HOME%\bin\spark-submit2.cmd" pyspark-shell-main --name "PySparkShell" %*