Currently, SparkR on Windows is being tested with AppVeyor. This page describes how to set up AppVeyor with Spark, how to run the build, check the status and stop the build via this tool. There is the documenation for AppVeyor here. Please refer this for full details.
-
Go to https://ci.appveyor.com, and then click "SIGN UP FOR FREE".
-
As Apache Spark is one of open source projects, click "FREE - for open-source projects".
-
Click "Github".
-
Click your account and then click "Profile".
-
Enable the link with GitHub via clicking "Link Github account".
-
Click "Authorize application" in Github site.
-
Go to the PROJECTS menu.
-
Click "NEW PROJECT" to add Spark.
-
Since we will use Github here, click the "GITHUB" button and then click "Authorize Github" so that AppVeyor can access to the Github logs (e.g. commits).
-
Click "Authorize application" from Github (the above step will pop up this page).
-
Come back to https://ci.appveyor.com/projects/new and then adds "spark".
-
Click "PROJECTS" menu.
-
Locate "spark" and click it.
-
Here, we can check the status of current build. Also, "HISTORY" shows the past build history.
-
If the build is stopped, "RE-BUILD COMMIT" button appears. Click this button to restart the build.
-
If the build is running, "CANCEL BUILD" buttom appears. Click this button top cancel the current build.
Note: It seems the configurations in UI and appveyor.yml
are mutually exclusive according to the documentation.
-
Click the settings button on the right.
-
Set the default branch to build as above.
-
Specify the branch in order to exclude the builds in other branches.
-
Set the Crontab expression to regularly start the build. AppVeyor uses Crontab expression, atifaziz/NCrontab. Please refer the examples here.
Currently, AppVeyor is only used for SparkR. So, the build is only triggered when R codes are changed.
This is specified in .appveyor.yml
as below:
only_commits:
files:
- R/
Please refer https://www.appveyor.com/docs/how-to/filtering-commits for more details.
Currently, the console in AppVeyor does not print full details. This can be manually checked. For example, AppVeyor shows the failed tests as below in console
Failed -------------------------------------------------------------------------
1. Error: union on two RDDs (@test_binary_function.R#38) -----------------------
1: textFile(sc, fileName) at C:/projects/spark/R/lib/SparkR/tests/testthat/test_binary_function.R:38
2: callJMethod(sc, "textFile", path, getMinPartitions(sc, minPartitions))
3: invokeJava(isStatic = FALSE, objId$id, methodName, ...)
4: stop(readString(conn))
After downloading the log by clicking the log button as below:
the details can be checked as below (e.g. exceptions)
Failed -------------------------------------------------------------------------
1. Error: spark.lda with text input (@test_mllib.R#655) ------------------------
org.apache.spark.sql.AnalysisException: Path does not exist: file:/C:/projects/spark/R/lib/SparkR/tests/testthat/data/mllib/sample_lda_data.txt;
at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$12.apply(DataSource.scala:376)
at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$12.apply(DataSource.scala:365)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
...
1: read.text("data/mllib/sample_lda_data.txt") at C:/projects/spark/R/lib/SparkR/tests/testthat/test_mllib.R:655
2: dispatchFunc("read.text(path)", x, ...)
3: f(x, ...)
4: callJMethod(read, "text", paths)
5: invokeJava(isStatic = FALSE, objId$id, methodName, ...)
6: stop(readString(conn))