Skip to content

Commit 1588e56

Browse files
committed
resolve conflict
2 parents 50eee83 + 0ce0163 commit 1588e56

File tree

2,876 files changed

+162693
-82907
lines changed

Some content is hidden

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

2,876 files changed

+162693
-82907
lines changed

.github/PULL_REQUEST_TEMPLATE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## What changes were proposed in this pull request?
2+
3+
(Please fill in changes proposed in this fix)
4+
5+
6+
## How was this patch tested?
7+
8+
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
9+
10+
11+
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
12+

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ cache
1717
work/
1818
out/
1919
.DS_Store
20-
third_party/libmesos.so
21-
third_party/libmesos.dylib
2220
build/apache-maven*
2321
build/zinc*
2422
build/scala*
@@ -50,6 +48,7 @@ spark-tests.log
5048
streaming-tests.log
5149
dependency-reduced-pom.xml
5250
.ensime
51+
.ensime_cache/
5352
.ensime_lucene
5453
checkpoint
5554
derby.log
@@ -59,8 +58,6 @@ dev/create-release/*final
5958
spark-*-bin-*.tgz
6059
unit-tests.log
6160
/lib/
62-
ec2/lib/
63-
rat-results.txt
6461
scalastyle.txt
6562
scalastyle-output.xml
6663
R-unit-tests.log
@@ -74,3 +71,7 @@ metastore/
7471
warehouse/
7572
TempStatsStore/
7673
sql/hive-thriftserver/test_warehouses
74+
75+
# For R session data
76+
.RHistory
77+
.RData

.rat-excludes

Lines changed: 0 additions & 85 deletions
This file was deleted.

LICENSE

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Apache License
32
Version 2.0, January 2004
43
http://www.apache.org/licenses/
@@ -237,8 +236,7 @@ The following components are provided under a BSD-style license. See project lin
237236
The text of each license is also included at licenses/LICENSE-[project].txt.
238237

239238
(BSD 3 Clause) netlib core (com.github.fommil.netlib:core:1.1.2 - https://github.com/fommil/netlib-java/core)
240-
(BSD 3 Clause) JPMML-Model (org.jpmml:pmml-model:1.1.15 - https://github.com/jpmml/jpmml-model)
241-
(BSD 3-clause style license) jblas (org.jblas:jblas:1.2.4 - http://jblas.org/)
239+
(BSD 3 Clause) JPMML-Model (org.jpmml:pmml-model:1.2.7 - https://github.com/jpmml/jpmml-model)
242240
(BSD License) AntLR Parser Generator (antlr:antlr:2.7.7 - http://www.antlr.org/)
243241
(BSD licence) ANTLR ST4 4.0.4 (org.antlr:ST4:4.0.4 - http://www.stringtemplate.org)
244242
(BSD licence) ANTLR StringTemplate (org.antlr:stringtemplate:3.2.1 - http://www.stringtemplate.org)
@@ -250,22 +248,22 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
250248
(Interpreter classes (all .scala files in repl/src/main/scala
251249
except for Main.Scala, SparkHelper.scala and ExecutorClassLoader.scala),
252250
and for SerializableMapWrapper in JavaUtils.scala)
253-
(BSD-like) Scala Actors library (org.scala-lang:scala-actors:2.10.5 - http://www.scala-lang.org/)
254-
(BSD-like) Scala Compiler (org.scala-lang:scala-compiler:2.10.5 - http://www.scala-lang.org/)
255-
(BSD-like) Scala Compiler (org.scala-lang:scala-reflect:2.10.5 - http://www.scala-lang.org/)
256-
(BSD-like) Scala Library (org.scala-lang:scala-library:2.10.5 - http://www.scala-lang.org/)
257-
(BSD-like) Scalap (org.scala-lang:scalap:2.10.5 - http://www.scala-lang.org/)
258-
(BSD-style) scalacheck (org.scalacheck:scalacheck_2.10:1.10.0 - http://www.scalacheck.org)
259-
(BSD-style) spire (org.spire-math:spire_2.10:0.7.1 - http://spire-math.org)
260-
(BSD-style) spire-macros (org.spire-math:spire-macros_2.10:0.7.1 - http://spire-math.org)
251+
(BSD-like) Scala Actors library (org.scala-lang:scala-actors:2.11.7 - http://www.scala-lang.org/)
252+
(BSD-like) Scala Compiler (org.scala-lang:scala-compiler:2.11.7 - http://www.scala-lang.org/)
253+
(BSD-like) Scala Compiler (org.scala-lang:scala-reflect:2.11.7 - http://www.scala-lang.org/)
254+
(BSD-like) Scala Library (org.scala-lang:scala-library:2.11.7 - http://www.scala-lang.org/)
255+
(BSD-like) Scalap (org.scala-lang:scalap:2.11.7 - http://www.scala-lang.org/)
256+
(BSD-style) scalacheck (org.scalacheck:scalacheck_2.11:1.10.0 - http://www.scalacheck.org)
257+
(BSD-style) spire (org.spire-math:spire_2.11:0.7.1 - http://spire-math.org)
258+
(BSD-style) spire-macros (org.spire-math:spire-macros_2.11:0.7.1 - http://spire-math.org)
261259
(New BSD License) Kryo (com.esotericsoftware.kryo:kryo:2.21 - http://code.google.com/p/kryo/)
262260
(New BSD License) MinLog (com.esotericsoftware.minlog:minlog:1.2 - http://code.google.com/p/minlog/)
263261
(New BSD License) ReflectASM (com.esotericsoftware.reflectasm:reflectasm:1.07 - http://code.google.com/p/reflectasm/)
264262
(New BSD license) Protocol Buffer Java API (com.google.protobuf:protobuf-java:2.5.0 - http://code.google.com/p/protobuf)
265263
(New BSD license) Protocol Buffer Java API (org.spark-project.protobuf:protobuf-java:2.4.1-shaded - http://code.google.com/p/protobuf)
266264
(The BSD License) Fortran to Java ARPACK (net.sourceforge.f2j:arpack_combined_all:0.1 - http://f2j.sourceforge.net)
267265
(The BSD License) xmlenc Library (xmlenc:xmlenc:0.52 - http://xmlenc.sourceforge.net)
268-
(The New BSD License) Py4J (net.sf.py4j:py4j:0.9 - http://py4j.sourceforge.net/)
266+
(The New BSD License) Py4J (net.sf.py4j:py4j:0.9.2 - http://py4j.sourceforge.net/)
269267
(Two-clause BSD-style license) JUnit-Interface (com.novocode:junit-interface:0.10 - http://github.com/szeiger/junit-interface/)
270268
(BSD licence) sbt and sbt-launch-lib.bash
271269
(BSD 3 Clause) d3.min.js (https://github.com/mbostock/d3/blob/master/LICENSE)
@@ -284,11 +282,17 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
284282
(MIT License) SLF4J API Module (org.slf4j:slf4j-api:1.7.5 - http://www.slf4j.org)
285283
(MIT License) SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.5 - http://www.slf4j.org)
286284
(MIT License) pyrolite (org.spark-project:pyrolite:2.0.1 - http://pythonhosted.org/Pyro4/)
287-
(MIT License) scopt (com.github.scopt:scopt_2.10:3.2.0 - https://github.com/scopt/scopt)
285+
(MIT License) scopt (com.github.scopt:scopt_2.11:3.2.0 - https://github.com/scopt/scopt)
288286
(The MIT License) Mockito (org.mockito:mockito-core:1.9.5 - http://www.mockito.org)
289287
(MIT License) jquery (https://jquery.org/license/)
290288
(MIT License) AnchorJS (https://github.com/bryanbraun/anchorjs)
291289
(MIT License) graphlib-dot (https://github.com/cpettitt/graphlib-dot)
292290
(MIT License) dagre-d3 (https://github.com/cpettitt/dagre-d3)
293291
(MIT License) sorttable (https://github.com/stuartlangridge/sorttable)
294292
(MIT License) boto (https://github.com/boto/boto/blob/develop/LICENSE)
293+
(MIT License) datatables (http://datatables.net/license)
294+
(MIT License) mustache (https://github.com/mustache/mustache/blob/master/LICENSE)
295+
(MIT License) cookies (http://code.google.com/p/cookies/wiki/License)
296+
(MIT License) blockUI (http://jquery.malsup.com/block/)
297+
(MIT License) RowsGroup (http://datatables.net/license/mit)
298+
(MIT License) jsonFormatter (http://www.jqueryscript.net/other/jQuery-Plugin-For-Pretty-JSON-Formatting-jsonFormatter.html)

NOTICE

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,4 +606,63 @@ Vis.js uses and redistributes the following third-party libraries:
606606

607607
- keycharm
608608
https://github.com/AlexDM0/keycharm
609-
The MIT License
609+
The MIT License
610+
611+
===============================================================================
612+
613+
The CSS style for the navigation sidebar of the documentation was originally
614+
submitted by Óscar Nájera for the scikit-learn project. The scikit-learn project
615+
is distributed under the 3-Clause BSD license.
616+
===============================================================================
617+
618+
For CSV functionality:
619+
620+
/*
621+
* Copyright 2014 Databricks
622+
*
623+
* Licensed under the Apache License, Version 2.0 (the "License");
624+
* you may not use this file except in compliance with the License.
625+
* You may obtain a copy of the License at
626+
*
627+
* http://www.apache.org/licenses/LICENSE-2.0
628+
*
629+
* Unless required by applicable law or agreed to in writing, software
630+
* distributed under the License is distributed on an "AS IS" BASIS,
631+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
632+
* See the License for the specific language governing permissions and
633+
* limitations under the License.
634+
*/
635+
636+
/*
637+
* Copyright 2015 Ayasdi Inc
638+
*
639+
* Licensed under the Apache License, Version 2.0 (the "License");
640+
* you may not use this file except in compliance with the License.
641+
* You may obtain a copy of the License at
642+
*
643+
* http://www.apache.org/licenses/LICENSE-2.0
644+
*
645+
* Unless required by applicable law or agreed to in writing, software
646+
* distributed under the License is distributed on an "AS IS" BASIS,
647+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
648+
* See the License for the specific language governing permissions and
649+
* limitations under the License.
650+
*/
651+
652+
653+
===============================================================================
654+
For dev/sparktestsupport/toposort.py:
655+
656+
Copyright 2014 True Blade Systems, Inc.
657+
658+
Licensed under the Apache License, Version 2.0 (the "License");
659+
you may not use this file except in compliance with the License.
660+
You may obtain a copy of the License at
661+
662+
http://www.apache.org/licenses/LICENSE-2.0
663+
664+
Unless required by applicable law or agreed to in writing, software
665+
distributed under the License is distributed on an "AS IS" BASIS,
666+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
667+
See the License for the specific language governing permissions and
668+
limitations under the License.

R/README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# R on Spark
22

33
SparkR is an R package that provides a light-weight frontend to use Spark from R.
4+
### Installing sparkR
5+
6+
Libraries of sparkR need to be created in `$SPARK_HOME/R/lib`. This can be done by running the script `$SPARK_HOME/R/install-dev.sh`.
7+
By default the above script uses the system wide installation of R. However, this can be changed to any user installed location of R by setting the environment variable `R_HOME` the full path of the base directory where R is installed, before running install-dev.sh script.
8+
Example:
9+
```
10+
# where /home/username/R is where R is installed and /home/username/R/bin contains the files R and RScript
11+
export R_HOME=/home/username/R
12+
./install-dev.sh
13+
```
414

515
### SparkR development
616

@@ -30,7 +40,7 @@ To set other options like driver memory, executor memory etc. you can pass in th
3040
If you wish to use SparkR from RStudio or other R frontends you will need to set some environment variables which point SparkR to your Spark installation. For example
3141
```
3242
# Set this to where Spark is installed
33-
Sys.setenv(SPARK_HOME="/Users/shivaram/spark")
43+
Sys.setenv(SPARK_HOME="/Users/username/spark")
3444
# This line loads SparkR from the installed directory
3545
.libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"), .libPaths()))
3646
library(SparkR)
@@ -41,7 +51,7 @@ sc <- sparkR.init(master="local")
4151

4252
The [instructions](https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark) for making contributions to Spark also apply to SparkR.
4353
If you only make R file changes (i.e. no Scala changes) then you can just re-install the R package using `R/install-dev.sh` and test your changes.
44-
Once you have made your changes, please include unit tests for them and run existing unit tests using the `run-tests.sh` script as described below.
54+
Once you have made your changes, please include unit tests for them and run existing unit tests using the `R/run-tests.sh` script as described below.
4555

4656
#### Generating documentation
4757

@@ -50,17 +60,17 @@ The SparkR documentation (Rd files and HTML files) are not a part of the source
5060
### Examples, Unit tests
5161

5262
SparkR comes with several sample programs in the `examples/src/main/r` directory.
53-
To run one of them, use `./bin/sparkR <filename> <args>`. For example:
63+
To run one of them, use `./bin/spark-submit <filename> <args>`. For example:
5464

55-
./bin/sparkR examples/src/main/r/dataframe.R
65+
./bin/spark-submit examples/src/main/r/dataframe.R
5666

5767
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):
5868

5969
R -e 'install.packages("testthat", repos="http://cran.us.r-project.org")'
6070
./R/run-tests.sh
6171

6272
### Running on YARN
63-
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
73+
The `./bin/spark-submit` 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
6474
```
6575
export YARN_CONF_DIR=/etc/hadoop/conf
6676
./bin/spark-submit --master yarn examples/src/main/r/dataframe.R

R/install-dev.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ 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
33+

R/install-dev.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,22 @@ LIB_DIR="$FWDIR/lib"
3535
mkdir -p $LIB_DIR
3636

3737
pushd $FWDIR > /dev/null
38+
if [ ! -z "$R_HOME" ]
39+
then
40+
R_SCRIPT_PATH="$R_HOME/bin"
41+
else
42+
R_SCRIPT_PATH="$(dirname $(which R))"
43+
fi
44+
echo "USING R_HOME = $R_HOME"
3845

3946
# 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")) }'
47+
"$R_SCRIPT_PATH/"Rscript -e ' if("devtools" %in% rownames(installed.packages())) { library(devtools); devtools::document(pkg="./pkg", roclets=c("rd")) }'
4148

4249
# Install SparkR to $LIB_DIR
43-
R CMD INSTALL --library=$LIB_DIR $FWDIR/pkg/
50+
"$R_SCRIPT_PATH/"R CMD INSTALL --library=$LIB_DIR $FWDIR/pkg/
51+
52+
# Zip the SparkR package so that it can be distributed to worker nodes on YARN
53+
cd $LIB_DIR
54+
jar cfM "$LIB_DIR/sparkr.zip" SparkR
4455

4556
popd > /dev/null

R/pkg/DESCRIPTION

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: SparkR
22
Type: Package
33
Title: R frontend for Spark
4-
Version: 1.6.0
4+
Version: 2.0.0
55
Date: 2013-09-09
66
Author: The Apache Software Foundation
77
Maintainer: Shivaram Venkataraman <[email protected]>
@@ -18,10 +18,10 @@ Collate:
1818
'schema.R'
1919
'generics.R'
2020
'jobj.R'
21-
'RDD.R'
22-
'pairRDD.R'
2321
'column.R'
2422
'group.R'
23+
'RDD.R'
24+
'pairRDD.R'
2525
'DataFrame.R'
2626
'SQLContext.R'
2727
'backend.R'
@@ -34,4 +34,6 @@ Collate:
3434
'serialize.R'
3535
'sparkR.R'
3636
'stats.R'
37+
'types.R'
3738
'utils.R'
39+
RoxygenNote: 5.0.1

0 commit comments

Comments
 (0)