Skip to content

Commit a8b3ec6

Browse files
committed
merge master branch
2 parents e0f4891 + a02b535 commit a8b3ec6

File tree

485 files changed

+14775
-3178
lines changed

Some content is hidden

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

485 files changed

+14775
-3178
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
sbt/*.jar
88
.settings
99
.cache
10+
.mima-excludes
1011
/build/
1112
work/
1213
out/
@@ -45,3 +46,5 @@ dist/
4546
spark-*-bin.tar.gz
4647
unit-tests.log
4748
/lib/
49+
rat-results.txt
50+
scalastyle.txt

.rat-excludes

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
target
2+
.gitignore
3+
.project
4+
.classpath
5+
.mima-excludes
6+
.rat-excludes
7+
.*md
8+
derby.log
9+
TAGS
10+
RELEASE
11+
control
12+
docs
13+
fairscheduler.xml.template
14+
log4j.properties
15+
log4j.properties.template
16+
metrics.properties.template
17+
slaves
18+
spark-env.sh
19+
spark-env.sh.template
20+
log4j-defaults.properties
21+
sorttable.js
22+
.*txt
23+
.*data
24+
.*log
25+
cloudpickle.py
26+
join.py
27+
SparkExprTyper.scala
28+
SparkILoop.scala
29+
SparkILoopInit.scala
30+
SparkIMain.scala
31+
SparkImports.scala
32+
SparkJLineCompletion.scala
33+
SparkJLineReader.scala
34+
SparkMemberHandlers.scala
35+
sbt
36+
sbt-launch-lib.bash
37+
plugins.sbt
38+
work
39+
.*\.q
40+
golden
41+
test.out/*

.travis.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
language: scala
17+
scala:
18+
- "2.10.3"
19+
jdk:
20+
- oraclejdk7
21+
env:
22+
matrix:
23+
- TEST="scalastyle assembly/assembly"
24+
- TEST="catalyst/test sql/test streaming/test mllib/test graphx/test bagel/test"
25+
- TEST=hive/test
26+
cache:
27+
directories:
28+
- $HOME/.m2
29+
- $HOME/.ivy2
30+
- $HOME/.sbt
31+
script:
32+
- "sbt ++$TRAVIS_SCALA_VERSION $TEST"

NOTICE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ Copyright 2014 The Apache Software Foundation.
33

44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).
6+
7+
In addition, this product includes:
8+
9+
- JUnit (http://www.junit.org) is a testing framework for Java. We included it
10+
under the terms of the Eclipse Public License v1.0.
11+
12+
- JTransforms (https://sites.google.com/site/piotrwendykier/software/jtransforms)
13+
provides fast transforms in Java. It is tri-licensed, and we included it under
14+
the terms of the Mozilla Public License v1.1.

bin/compute-classpath.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ SCALA_VERSION=2.10
2525
# Figure out where Spark is installed
2626
FWDIR="$(cd `dirname $0`/..; pwd)"
2727

28-
# Load environment variables from conf/spark-env.sh, if it exists
29-
if [ -e "$FWDIR/conf/spark-env.sh" ] ; then
30-
. $FWDIR/conf/spark-env.sh
31-
fi
28+
. $FWDIR/bin/load-spark-env.sh
3229

3330
# Build up classpath
3431
CLASSPATH="$SPARK_CLASSPATH:$FWDIR/conf"
@@ -39,7 +36,6 @@ CLASSPATH="$SPARK_CLASSPATH:$FWDIR/conf"
3936
# Hopefully we will find a way to avoid uber-jars entirely and deploy only the needed packages in
4037
# the future.
4138
if [ -f "$FWDIR"/sql/hive/target/scala-$SCALA_VERSION/spark-hive-assembly-*.jar ]; then
42-
echo "Hive assembly found, including hive support. If this isn't desired run sbt hive/clean."
4339

4440
# Datanucleus jars do not work if only included in the uberjar as plugin.xml metadata is lost.
4541
DATANUCLEUSJARS=$(JARS=("$FWDIR/lib_managed/jars"/datanucleus-*.jar); IFS=:; echo "${JARS[*]}")
@@ -58,6 +54,7 @@ if [ -f "$ASSEMBLY_DIR"/spark-assembly*hadoop*-deps.jar ]; then
5854
CLASSPATH="$CLASSPATH:$FWDIR/bagel/target/scala-$SCALA_VERSION/classes"
5955
CLASSPATH="$CLASSPATH:$FWDIR/graphx/target/scala-$SCALA_VERSION/classes"
6056
CLASSPATH="$CLASSPATH:$FWDIR/streaming/target/scala-$SCALA_VERSION/classes"
57+
CLASSPATH="$CLASSPATH:$FWDIR/tools/target/scala-$SCALA_VERSION/classes"
6158
CLASSPATH="$CLASSPATH:$FWDIR/sql/catalyst/target/scala-$SCALA_VERSION/classes"
6259
CLASSPATH="$CLASSPATH:$FWDIR/sql/core/target/scala-$SCALA_VERSION/classes"
6360
CLASSPATH="$CLASSPATH:$FWDIR/sql/hive/target/scala-$SCALA_VERSION/classes"

bin/load-spark-env.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership.
7+
# The ASF licenses this file to You under the Apache License, Version 2.0
8+
# (the "License"); you may not use this file except in compliance with
9+
# the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
# This script loads spark-env.sh if it exists, and ensures it is only loaded once.
21+
# spark-env.sh is loaded from SPARK_CONF_DIR if set, or within the current directory's
22+
# conf/ subdirectory.
23+
24+
if [ -z "$SPARK_ENV_LOADED" ]; then
25+
export SPARK_ENV_LOADED=1
26+
27+
# Returns the parent of the directory this script lives in.
28+
parent_dir="$(cd `dirname $0`/..; pwd)"
29+
30+
use_conf_dir=${SPARK_CONF_DIR:-"$parent_dir/conf"}
31+
32+
if [ -f "${use_conf_dir}/spark-env.sh" ]; then
33+
# Promote all variable declarations to environment (exported) variables
34+
set -a
35+
. "${use_conf_dir}/spark-env.sh"
36+
set +a
37+
fi
38+
fi

bin/pyspark

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ if [ ! -f "$FWDIR/RELEASE" ]; then
3636
fi
3737
fi
3838

39-
# Load environment variables from conf/spark-env.sh, if it exists
40-
if [ -e "$FWDIR/conf/spark-env.sh" ] ; then
41-
. $FWDIR/conf/spark-env.sh
42-
fi
39+
. $FWDIR/bin/load-spark-env.sh
4340

4441
# Figure out which Python executable to use
4542
if [ -z "$PYSPARK_PYTHON" ] ; then
@@ -58,7 +55,8 @@ if [ -n "$IPYTHON_OPTS" ]; then
5855
IPYTHON=1
5956
fi
6057

61-
if [[ "$IPYTHON" = "1" ]] ; then
58+
# Only use ipython if no command line arguments were provided [SPARK-1134]
59+
if [[ "$IPYTHON" = "1" && $# = 0 ]] ; then
6260
exec ipython $IPYTHON_OPTS
6361
else
6462
exec "$PYSPARK_PYTHON" "$@"

bin/run-example

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ FWDIR="$(cd `dirname $0`/..; pwd)"
3030
# Export this as SPARK_HOME
3131
export SPARK_HOME="$FWDIR"
3232

33-
# Load environment variables from conf/spark-env.sh, if it exists
34-
if [ -e "$FWDIR/conf/spark-env.sh" ] ; then
35-
. $FWDIR/conf/spark-env.sh
36-
fi
33+
. $FWDIR/bin/load-spark-env.sh
3734

3835
if [ -z "$1" ]; then
3936
echo "Usage: run-example <example-class> [<args>]" >&2

bin/spark-class

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ FWDIR="$(cd `dirname $0`/..; pwd)"
3030
# Export this as SPARK_HOME
3131
export SPARK_HOME="$FWDIR"
3232

33-
# Load environment variables from conf/spark-env.sh, if it exists
34-
if [ -e "$FWDIR/conf/spark-env.sh" ] ; then
35-
. $FWDIR/conf/spark-env.sh
36-
fi
33+
. $FWDIR/bin/load-spark-env.sh
3734

3835
if [ -z "$1" ]; then
3936
echo "Usage: spark-class <class> [<args>]" >&2
@@ -137,8 +134,7 @@ fi
137134

138135
# Compute classpath using external script
139136
CLASSPATH=`$FWDIR/bin/compute-classpath.sh`
140-
141-
if [ "$1" == "org.apache.spark.tools.JavaAPICompletenessChecker" ]; then
137+
if [[ "$1" =~ org.apache.spark.tools.* ]]; then
142138
CLASSPATH="$CLASSPATH:$SPARK_TOOLS_JAR"
143139
fi
144140

0 commit comments

Comments
 (0)