Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/819#discussion_r12778951
  
    --- Diff: bin/run-example2.cmd ---
    @@ -47,15 +55,34 @@ if "x%SPARK_EXAMPLES_JAR%"=="x" (
       goto exit
     )
     
    -rem Compute Spark classpath using external script
    -set DONT_PRINT_CLASSPATH=1
    -call "%FWDIR%bin\compute-classpath.cmd"
    -set DONT_PRINT_CLASSPATH=0
    -set CLASSPATH=%SPARK_EXAMPLES_JAR%;%CLASSPATH%
    +rem Set master from MASTER environment variable if given
    +if "x%MASTER%"=="x" (
    +  set EXAMPLE_MASTER=local[*]
    +) else (
    +  set EXAMPLE_MASTER=%MASTER%
    +)
    +
    +rem If the EXAMPLE_CLASS does not start with org.apache.spark.examples, 
add that
    +set EXAMPLE_CLASS=%1
    +set PREFIX=%EXAMPLE_CLASS:~0,25%
    +if not %PREFIX%==org.apache.spark.examples (
    +  set EXAMPLE_CLASS=org.apache.spark.examples.%EXAMPLE_CLASS%
    +)
    +
    +rem Get the tail of the argument list, to skip the first one. This is 
surprisingly
    +rem complicated on Windows.
    +set "ARGS="
    +:top
    +shift
    +if "%~1" neq "" (
    +  set ARGS=%ARGS% "%~1"
    +  goto :top
    +)
    +if defined ARGS set ARGS=%ARGS:~1%
     
    -rem Figure out where java is.
    -set RUNNER=java
    -if not "x%JAVA_HOME%"=="x" set RUNNER=%JAVA_HOME%\bin\java
    +call "%FWDIR%bin\spark-submit.cmd" ^
    +  --master %EXAMPLE_MASTER% ^
    --- End diff --
    
    Same here


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