Skip to content

Commit 98058f4

Browse files
committed
Merge branch 'master' of github.com:apache/spark into SPARK-7422
2 parents 5fd9380 + bb870e7 commit 98058f4

File tree

1,674 files changed

+78531
-32920
lines changed

Some content is hidden

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

1,674 files changed

+78531
-32920
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ scalastyle-output.xml
6666
R-unit-tests.log
6767
R/unit-tests.out
6868
python/lib/pyspark.zip
69+
lint-r-report.log
6970

7071
# For Hive
7172
metastore_db/

.rat-excludes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ spark-env.sh
2828
spark-env.cmd
2929
spark-env.sh.template
3030
log4j-defaults.properties
31+
log4j-defaults-repl.properties
3132
bootstrap-tooltip.js
3233
jquery-1.11.1.min.js
3334
d3.min.js
@@ -80,5 +81,15 @@ local-1425081759269/*
8081
local-1426533911241/*
8182
local-1426633911242/*
8283
local-1430917381534/*
84+
local-1430917381535_1
85+
local-1430917381535_2
8386
DESCRIPTION
8487
NAMESPACE
88+
test_support/*
89+
.*Rd
90+
help/*
91+
html/*
92+
INDEX
93+
.lintr
94+
gen-java.*
95+
.*avpr

LICENSE

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,52 @@ and
853853

854854
Vis.js may be distributed under either license.
855855

856+
========================================================================
857+
For dagre-d3 (core/src/main/resources/org/apache/spark/ui/static/dagre-d3.min.js):
858+
========================================================================
859+
Copyright (c) 2013 Chris Pettitt
860+
861+
Permission is hereby granted, free of charge, to any person obtaining a copy
862+
of this software and associated documentation files (the "Software"), to deal
863+
in the Software without restriction, including without limitation the rights
864+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
865+
copies of the Software, and to permit persons to whom the Software is
866+
furnished to do so, subject to the following conditions:
867+
868+
The above copyright notice and this permission notice shall be included in
869+
all copies or substantial portions of the Software.
870+
871+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
872+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
873+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
874+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
875+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
876+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
877+
THE SOFTWARE.
878+
879+
========================================================================
880+
For graphlib-dot (core/src/main/resources/org/apache/spark/ui/static/graphlib-dot.min.js):
881+
========================================================================
882+
Copyright (c) 2012-2013 Chris Pettitt
883+
884+
Permission is hereby granted, free of charge, to any person obtaining a copy
885+
of this software and associated documentation files (the "Software"), to deal
886+
in the Software without restriction, including without limitation the rights
887+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
888+
copies of the Software, and to permit persons to whom the Software is
889+
furnished to do so, subject to the following conditions:
890+
891+
The above copyright notice and this permission notice shall be included in
892+
all copies or substantial portions of the Software.
893+
894+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
895+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
896+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
897+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
898+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
899+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
900+
THE SOFTWARE.
901+
856902
========================================================================
857903
BSD-style licenses
858904
========================================================================
@@ -861,7 +907,7 @@ The following components are provided under a BSD-style license. See project lin
861907

862908
(BSD 3 Clause) core (com.github.fommil.netlib:core:1.1.2 - https://github.com/fommil/netlib-java/core)
863909
(BSD 3 Clause) JPMML-Model (org.jpmml:pmml-model:1.1.15 - https://github.com/jpmml/jpmml-model)
864-
(BSD 3-clause style license) jblas (org.jblas:jblas:1.2.3 - http://jblas.org/)
910+
(BSD 3-clause style license) jblas (org.jblas:jblas:1.2.4 - http://jblas.org/)
865911
(BSD License) AntLR Parser Generator (antlr:antlr:2.7.7 - http://www.antlr.org/)
866912
(BSD License) Javolution (javolution:javolution:5.5.1 - http://javolution.org)
867913
(BSD licence) ANTLR ST4 4.0.4 (org.antlr:ST4:4.0.4 - http://www.stringtemplate.org)
@@ -902,5 +948,6 @@ The following components are provided under the MIT License. See project link fo
902948
(MIT License) SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.5 - http://www.slf4j.org)
903949
(MIT License) pyrolite (org.spark-project:pyrolite:2.0.1 - http://pythonhosted.org/Pyro4/)
904950
(MIT License) scopt (com.github.scopt:scopt_2.10:3.2.0 - https://github.com/scopt/scopt)
905-
(The MIT License) Mockito (org.mockito:mockito-all:1.8.5 - http://www.mockito.org)
951+
(The MIT License) Mockito (org.mockito:mockito-core:1.9.5 - http://www.mockito.org)
906952
(MIT License) jquery (https://jquery.org/license/)
953+
(MIT License) AnchorJS (https://github.com/bryanbraun/anchorjs)

R/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SparkR is an R package that provides a light-weight frontend to use Spark from R
66

77
#### Build Spark
88

9-
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
9+
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
1010
```
1111
build/mvn -DskipTests -Psparkr package
1212
```
@@ -52,7 +52,7 @@ The SparkR documentation (Rd files and HTML files) are not a part of the source
5252
SparkR comes with several sample programs in the `examples/src/main/r` directory.
5353
To run one of them, use `./bin/sparkR <filename> <args>`. For example:
5454

55-
./bin/sparkR examples/src/main/r/pi.R local[2]
55+
./bin/sparkR examples/src/main/r/dataframe.R
5656

5757
You can also run the unit-tests for SparkR by running (you need to install the [testthat](http://cran.r-project.org/web/packages/testthat/index.html) package first):
5858

@@ -63,5 +63,5 @@ You can also run the unit-tests for SparkR by running (you need to install the [
6363
The `./bin/spark-submit` and `./bin/sparkR` can also be used to submit jobs to YARN clusters. You will need to set YARN conf dir before doing so. For example on CDH you can run
6464
```
6565
export YARN_CONF_DIR=/etc/hadoop/conf
66-
./bin/spark-submit --master yarn examples/src/main/r/pi.R 4
66+
./bin/spark-submit --master yarn examples/src/main/r/dataframe.R
6767
```

R/create-docs.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
# After running this script the html docs can be found in
2424
# $SPARK_HOME/R/pkg/html
2525

26+
set -o pipefail
27+
set -e
28+
2629
# Figure out where the script is
2730
export FWDIR="$(cd "`dirname "$0"`"; pwd)"
2831
pushd $FWDIR
2932

30-
# Generate Rd file
31-
Rscript -e 'library(devtools); devtools::document(pkg="./pkg", roclets=c("rd"))'
32-
33-
# Install the package
33+
# Install the package (this will also generate the Rd files)
3434
./install-dev.sh
3535

3636
# Now create HTML files

R/install-dev.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ set SPARK_HOME=%~dp0..
2525
MKDIR %SPARK_HOME%\R\lib
2626

2727
R.exe CMD INSTALL --library="%SPARK_HOME%\R\lib" %SPARK_HOME%\R\pkg\
28+
29+
rem Zip the SparkR package so that it can be distributed to worker nodes on YARN
30+
pushd %SPARK_HOME%\R\lib
31+
%JAVA_HOME%\bin\jar.exe cfM "%SPARK_HOME%\R\lib\sparkr.zip" SparkR
32+
popd

R/install-dev.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,24 @@
2626
# NOTE(shivaram): Right now we use $SPARK_HOME/R/lib to be the installation directory
2727
# to load the SparkR package on the worker nodes.
2828

29+
set -o pipefail
30+
set -e
2931

3032
FWDIR="$(cd `dirname $0`; pwd)"
3133
LIB_DIR="$FWDIR/lib"
3234

3335
mkdir -p $LIB_DIR
3436

35-
# Install R
37+
pushd $FWDIR > /dev/null
38+
39+
# Generate Rd files if devtools is installed
40+
Rscript -e ' if("devtools" %in% rownames(installed.packages())) { library(devtools); devtools::document(pkg="./pkg", roclets=c("rd")) }'
41+
42+
# Install SparkR to $LIB_DIR
3643
R CMD INSTALL --library=$LIB_DIR $FWDIR/pkg/
44+
45+
# Zip the SparkR package so that it can be distributed to worker nodes on YARN
46+
cd $LIB_DIR
47+
jar cfM "$LIB_DIR/sparkr.zip" SparkR
48+
49+
popd > /dev/null

R/log4j.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
log4j.rootCategory=INFO, file
2020
log4j.appender.file=org.apache.log4j.FileAppender
2121
log4j.appender.file.append=true
22-
log4j.appender.file.file=R-unit-tests.log
22+
log4j.appender.file.file=R/target/unit-tests.log
2323
log4j.appender.file.layout=org.apache.log4j.PatternLayout
2424
log4j.appender.file.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
2525

R/pkg/.lintr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
linters: with_defaults(line_length_linter(100), camel_case_linter = NULL, open_curly_linter(allow_single_line = TRUE), closed_curly_linter(allow_single_line = TRUE))
2+
exclusions: list("inst/profile/general.R" = 1, "inst/profile/shell.R")

R/pkg/DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ Collate:
3232
'serialize.R'
3333
'sparkR.R'
3434
'utils.R'
35-
'zzz.R'

0 commit comments

Comments
 (0)