aboutsummaryrefslogtreecommitdiff
path: root/spark-class
diff options
context:
space:
mode:
authorJosh Rosen <joshrosen@apache.org>2013-12-15 18:39:30 -0800
committerJosh Rosen <joshrosen@apache.org>2013-12-15 18:51:31 -0800
commitf8ba89da217a1f1fd5c856a95a27a3e535017643 (patch)
tree746c7e73e63aed04303a3c17da64ccde959b6366 /spark-class
parentd2ced6d58c5e8aea23f909c2fc4ac11aa1b55607 (diff)
downloadspark-f8ba89da217a1f1fd5c856a95a27a3e535017643.tar.gz
spark-f8ba89da217a1f1fd5c856a95a27a3e535017643.tar.bz2
spark-f8ba89da217a1f1fd5c856a95a27a3e535017643.zip
Fix Cygwin support in several scripts.
This allows the spark-shell, spark-class, run-example, make-distribution.sh, and ./bin/start-* scripts to work under Cygwin. Note that this doesn't support PySpark under Cygwin, since that requires many additional `cygpath` calls from within Python and will be non-trivial to implement. This PR was inspired by, and subsumes, #253 (so close #253 after this is merged).
Diffstat (limited to 'spark-class')
-rwxr-xr-xspark-class10
1 files changed, 10 insertions, 0 deletions
diff --git a/spark-class b/spark-class
index 4fa6fb864e..4eb95a9ba2 100755
--- a/spark-class
+++ b/spark-class
@@ -17,6 +17,11 @@
# limitations under the License.
#
+cygwin=false
+case "`uname`" in
+ CYGWIN*) cygwin=true;;
+esac
+
SCALA_VERSION=2.10
# Figure out where the Scala framework is installed
@@ -125,6 +130,11 @@ fi
# Compute classpath using external script
CLASSPATH=`$FWDIR/bin/compute-classpath.sh`
CLASSPATH="$SPARK_TOOLS_JAR:$CLASSPATH"
+
+if $cygwin; then
+ CLASSPATH=`cygpath -wp $CLASSPATH`
+ export SPARK_TOOLS_JAR=`cygpath -w $SPARK_TOOLS_JAR`
+fi
export CLASSPATH
if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then