Skip to content

Commit d4d6f76

Browse files
committed
fix conflicts
2 parents 5a9ea8e + 9ac68db commit d4d6f76

File tree

800 files changed

+26521
-9062
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

800 files changed

+26521
-9062
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
/lib/
2424
R-unit-tests.log
2525
R/unit-tests.out
26+
R/cran-check.out
2627
build/*.jar
2728
build/apache-maven*
2829
build/scala*
@@ -82,3 +83,4 @@ spark-warehouse/
8283
*.Rproj
8384
*.Rproj.*
8485

86+
.Rproj.user

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ notifications:
4444
# 5. Run maven install before running lint-java.
4545
install:
4646
- export MAVEN_SKIP_RC=1
47-
- build/mvn -T 4 -q -DskipTests -Pyarn -Phadoop-2.3 -Pkinesis-asl -Phive -Phive-thriftserver install
47+
- build/mvn -T 4 -q -DskipTests -Pmesos -Pyarn -Phadoop-2.3 -Pkinesis-asl -Phive -Phive-thriftserver install
4848

4949
# 6. Run lint-java.
5050
script:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It lists steps that are required before creating a PR. In particular, consider:
66

77
- Is the change important and ready enough to ask the community to spend time reviewing?
88
- Have you searched for existing, related JIRAs and pull requests?
9-
- Is this a new feature that can stand alone as a package on http://spark-packages.org ?
9+
- Is this a new feature that can stand alone as a [third party project](https://cwiki.apache.org/confluence/display/SPARK/Third+Party+Projects) ?
1010
- Is the change being proposed clearly explained and motivated?
1111

1212
When you contribute code, you affirm that the contribution is your original work and that you

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
263263
(New BSD license) Protocol Buffer Java API (org.spark-project.protobuf:protobuf-java:2.4.1-shaded - http://code.google.com/p/protobuf)
264264
(The BSD License) Fortran to Java ARPACK (net.sourceforge.f2j:arpack_combined_all:0.1 - http://f2j.sourceforge.net)
265265
(The BSD License) xmlenc Library (xmlenc:xmlenc:0.52 - http://xmlenc.sourceforge.net)
266-
(The New BSD License) Py4J (net.sf.py4j:py4j:0.10.1 - http://py4j.sourceforge.net/)
266+
(The New BSD License) Py4J (net.sf.py4j:py4j:0.10.3 - http://py4j.sourceforge.net/)
267267
(Two-clause BSD-style license) JUnit-Interface (com.novocode:junit-interface:0.10 - http://github.com/szeiger/junit-interface/)
268268
(BSD licence) sbt and sbt-launch-lib.bash
269269
(BSD 3 Clause) d3.min.js (https://github.com/mbostock/d3/blob/master/LICENSE)

R/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
lib
55
pkg/man
66
pkg/html
7+
SparkR.Rcheck/
8+
SparkR_*.tar.gz

R/WINDOWS.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@ To build SparkR on Windows, the following steps are required
44

55
1. Install R (>= 3.1) and [Rtools](http://cran.r-project.org/bin/windows/Rtools/). Make sure to
66
include Rtools and R in `PATH`.
7+
78
2. Install
89
[JDK7](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) and set
910
`JAVA_HOME` in the system environment variables.
11+
1012
3. Download and install [Maven](http://maven.apache.org/download.html). Also include the `bin`
1113
directory in Maven in `PATH`.
14+
1215
4. Set `MAVEN_OPTS` as described in [Building Spark](http://spark.apache.org/docs/latest/building-spark.html).
13-
5. Open a command shell (`cmd`) in the Spark directory and run `mvn -DskipTests -Psparkr package`
16+
17+
5. Open a command shell (`cmd`) in the Spark directory and build Spark with [Maven](http://spark.apache.org/docs/latest/building-spark.html#building-with-buildmvn) and include the `-Psparkr` profile to build the R package. For example to use the default Hadoop versions you can run
18+
19+
```bash
20+
mvn.cmd -DskipTests -Psparkr package
21+
```
22+
23+
`.\build\mvn` is a shell script so `mvn.cmd` should be used directly on Windows.
1424

1525
## Unit tests
1626

R/check-cran.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,22 @@ $FWDIR/create-docs.sh
4343
"$R_SCRIPT_PATH/"R CMD build $FWDIR/pkg
4444

4545
# Run check as-cran.
46-
# TODO(shivaram): Remove the skip tests once we figure out the install mechanism
47-
4846
VERSION=`grep Version $FWDIR/pkg/DESCRIPTION | awk '{print $NF}'`
4947

50-
"$R_SCRIPT_PATH/"R CMD check --as-cran SparkR_"$VERSION".tar.gz
48+
CRAN_CHECK_OPTIONS="--as-cran"
49+
50+
if [ -n "$NO_TESTS" ]
51+
then
52+
CRAN_CHECK_OPTIONS=$CRAN_CHECK_OPTIONS" --no-tests"
53+
fi
54+
55+
if [ -n "$NO_MANUAL" ]
56+
then
57+
CRAN_CHECK_OPTIONS=$CRAN_CHECK_OPTIONS" --no-manual"
58+
fi
59+
60+
echo "Running CRAN check with $CRAN_CHECK_OPTIONS options"
61+
62+
"$R_SCRIPT_PATH/"R CMD check $CRAN_CHECK_OPTIONS SparkR_"$VERSION".tar.gz
5163

5264
popd > /dev/null

R/create-docs.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
# limitations under the License.
1818
#
1919

20-
# Script to create API docs for SparkR
21-
# This requires `devtools` and `knitr` to be installed on the machine.
20+
# Script to create API docs and vignettes for SparkR
21+
# This requires `devtools`, `knitr` and `rmarkdown` to be installed on the machine.
2222

2323
# After running this script the html docs can be found in
2424
# $SPARK_HOME/R/pkg/html
25+
# The vignettes can be found in
26+
# $SPARK_HOME/R/pkg/vignettes/sparkr_vignettes.html
2527

2628
set -o pipefail
2729
set -e
@@ -43,4 +45,9 @@ Rscript -e 'libDir <- "../../lib"; library(SparkR, lib.loc=libDir); library(knit
4345

4446
popd
4547

48+
# render creates SparkR vignettes
49+
Rscript -e 'library(rmarkdown); paths <- .libPaths(); .libPaths(c("lib", paths)); Sys.setenv(SPARK_HOME=tools::file_path_as_absolute("..")); render("pkg/vignettes/sparkr-vignettes.Rmd"); .libPaths(paths)'
50+
51+
find pkg/vignettes/. -not -name '.' -not -name '*.Rmd' -not -name '*.md' -not -name '*.pdf' -not -name '*.html' -delete
52+
4653
popd

R/pkg/DESCRIPTION

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ Package: SparkR
22
Type: Package
33
Title: R Frontend for Apache Spark
44
Version: 2.0.0
5-
Date: 2016-07-07
6-
Author: The Apache Software Foundation
7-
Maintainer: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
5+
Date: 2016-08-27
6+
Authors@R: c(person("Shivaram", "Venkataraman", role = c("aut", "cre"),
7+
email = "shivaram@cs.berkeley.edu"),
8+
person("Xiangrui", "Meng", role = "aut",
9+
email = "meng@databricks.com"),
10+
person("Felix", "Cheung", role = "aut",
11+
email = "felixcheung@apache.org"),
12+
person(family = "The Apache Software Foundation", role = c("aut", "cph")))
13+
URL: http://www.apache.org/ http://spark.apache.org/
14+
BugReports: https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark#ContributingtoSpark-ContributingBugReports
815
Depends:
916
R (>= 3.0),
1017
methods
@@ -32,6 +39,7 @@ Collate:
3239
'deserialize.R'
3340
'functions.R'
3441
'install.R'
42+
'jvm.R'
3543
'mllib.R'
3644
'serialize.R'
3745
'sparkR.R'

R/pkg/NAMESPACE

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Imports from base R
2-
importFrom(methods, setGeneric, setMethod, setOldClass)
2+
# Do not include stats:: "rpois", "runif" - causes error at runtime
3+
importFrom("methods", "setGeneric", "setMethod", "setOldClass")
4+
importFrom("methods", "is", "new", "signature", "show")
5+
importFrom("stats", "gaussian", "setNames")
6+
importFrom("utils", "download.file", "packageVersion", "untar")
37

48
# Disable native libraries till we figure out how to package it
59
# See SPARKR-7839
@@ -11,8 +15,15 @@ export("sparkR.init")
1115
export("sparkR.stop")
1216
export("sparkR.session.stop")
1317
export("sparkR.conf")
18+
export("sparkR.version")
1419
export("print.jobj")
1520

21+
export("sparkR.newJObject")
22+
export("sparkR.callJMethod")
23+
export("sparkR.callJStatic")
24+
25+
export("install.spark")
26+
1627
export("sparkRSQL.init",
1728
"sparkRHive.init")
1829

@@ -23,8 +34,16 @@ exportMethods("glm",
2334
"summary",
2435
"spark.kmeans",
2536
"fitted",
37+
"spark.mlp",
2638
"spark.naiveBayes",
27-
"spark.survreg")
39+
"spark.survreg",
40+
"spark.lda",
41+
"spark.posterior",
42+
"spark.perplexity",
43+
"spark.isoreg",
44+
"spark.gaussianMixture",
45+
"spark.als",
46+
"spark.kstest")
2847

2948
# Job group lifecycle management methods
3049
export("setJobGroup",
@@ -324,7 +343,8 @@ export("as.DataFrame",
324343
"tables",
325344
"uncacheTable",
326345
"print.summary.GeneralizedLinearRegressionModel",
327-
"read.ml")
346+
"read.ml",
347+
"print.summary.KSTest")
328348

329349
export("structField",
330350
"structField.jobj",
@@ -348,9 +368,8 @@ S3method(print, jobj)
348368
S3method(print, structField)
349369
S3method(print, structType)
350370
S3method(print, summary.GeneralizedLinearRegressionModel)
371+
S3method(print, summary.KSTest)
351372
S3method(structField, character)
352373
S3method(structField, jobj)
353374
S3method(structType, jobj)
354375
S3method(structType, structField)
355-
356-
export("install.spark")

0 commit comments

Comments
 (0)