Skip to content

Commit 21de67f

Browse files
committed
Merge remote-tracking branch 'upstream/master'
Incorporated feedback from TD. Renamed project to kinesis-asl, simplified examples, improved docs, fixed bug with AWS regions outside of us-east-1
2 parents 6c39561 + dc96536 commit 21de67f

File tree

356 files changed

+13099
-2805
lines changed

Some content is hidden

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

356 files changed

+13099
-2805
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ unit-tests.log
5151
rat-results.txt
5252
scalastyle.txt
5353
conf/*.conf
54+
scalastyle-output.xml
5455

5556
# For Hive
5657
metastore_db/
5758
metastore/
5859
warehouse/
5960
TempStatsStore/
61+
sql/hive-thriftserver/test_warehouses

LICENSE

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ Written by Pavel Binko, Dino Ferrero Merlino, Wolfgang Hoschek, Tony Johnson, An
442442

443443

444444
========================================================================
445-
Fo SnapTree:
445+
For SnapTree:
446446
========================================================================
447447

448448
SNAPTREE LICENSE
@@ -482,6 +482,24 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
482482
SUCH DAMAGE.
483483

484484

485+
========================================================================
486+
For Timsort (core/src/main/java/org/apache/spark/util/collection/Sorter.java):
487+
========================================================================
488+
Copyright (C) 2008 The Android Open Source Project
489+
490+
Licensed under the Apache License, Version 2.0 (the "License");
491+
you may not use this file except in compliance with the License.
492+
You may obtain a copy of the License at
493+
494+
http://www.apache.org/licenses/LICENSE-2.0
495+
496+
Unless required by applicable law or agreed to in writing, software
497+
distributed under the License is distributed on an "AS IS" BASIS,
498+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
499+
See the License for the specific language governing permissions and
500+
limitations under the License.
501+
502+
485503
========================================================================
486504
BSD-style licenses
487505
========================================================================

assembly/pom.xml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<deb.pkg.name>spark</deb.pkg.name>
4040
<deb.install.path>/usr/share/spark</deb.install.path>
4141
<deb.user>root</deb.user>
42+
<deb.bin.filemode>744</deb.bin.filemode>
4243
</properties>
4344

4445
<dependencies>
@@ -164,6 +165,16 @@
164165
</dependency>
165166
</dependencies>
166167
</profile>
168+
<profile>
169+
<id>hive-thriftserver</id>
170+
<dependencies>
171+
<dependency>
172+
<groupId>org.apache.spark</groupId>
173+
<artifactId>spark-hive-thriftserver_${scala.binary.version}</artifactId>
174+
<version>${project.version}</version>
175+
</dependency>
176+
</dependencies>
177+
</profile>
167178
<profile>
168179
<id>spark-ganglia-lgpl</id>
169180
<dependencies>
@@ -175,11 +186,11 @@
175186
</dependencies>
176187
</profile>
177188
<profile>
178-
<id>spark-kinesis-asl</id>
189+
<id>kinesis-asl</id>
179190
<dependencies>
180191
<dependency>
181192
<groupId>org.apache.spark</groupId>
182-
<artifactId>spark-kinesis-asl_${scala.binary.version}</artifactId>
193+
<artifactId>kinesis-asl_${scala.binary.version}</artifactId>
183194
<version>${project.version}</version>
184195
</dependency>
185196
</dependencies>
@@ -286,7 +297,7 @@
286297
<user>${deb.user}</user>
287298
<group>${deb.user}</group>
288299
<prefix>${deb.install.path}/bin</prefix>
289-
<filemode>744</filemode>
300+
<filemode>${deb.bin.filemode}</filemode>
290301
</mapper>
291302
</data>
292303
<data>

bagel/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<groupId>org.apache.spark</groupId>
2929
<artifactId>spark-bagel_2.10</artifactId>
3030
<properties>
31-
<sbt.project.name>bagel</sbt.project.name>
31+
<sbt.project.name>bagel</sbt.project.name>
3232
</properties>
3333
<packaging>jar</packaging>
3434
<name>Spark Project Bagel</name>

bagel/src/main/scala/org/apache/spark/bagel/Bagel.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ object Bagel extends Logging {
7272
var verts = vertices
7373
var msgs = messages
7474
var noActivity = false
75+
var lastRDD: RDD[(K, (V, Array[M]))] = null
7576
do {
7677
logInfo("Starting superstep " + superstep + ".")
7778
val startTime = System.currentTimeMillis
@@ -83,6 +84,10 @@ object Bagel extends Logging {
8384
val superstep_ = superstep // Create a read-only copy of superstep for capture in closure
8485
val (processed, numMsgs, numActiveVerts) =
8586
comp[K, V, M, C](sc, grouped, compute(_, _, aggregated, superstep_), storageLevel)
87+
if (lastRDD != null) {
88+
lastRDD.unpersist(false)
89+
}
90+
lastRDD = processed
8691

8792
val timeTaken = System.currentTimeMillis - startTime
8893
logInfo("Superstep %d took %d s".format(superstep, timeTaken / 1000))

bin/beeline

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
# Figure out where Spark is installed
21+
FWDIR="$(cd `dirname $0`/..; pwd)"
22+
23+
# Find the java binary
24+
if [ -n "${JAVA_HOME}" ]; then
25+
RUNNER="${JAVA_HOME}/bin/java"
26+
else
27+
if [ `command -v java` ]; then
28+
RUNNER="java"
29+
else
30+
echo "JAVA_HOME is not set" >&2
31+
exit 1
32+
fi
33+
fi
34+
35+
# Compute classpath using external script
36+
classpath_output=$($FWDIR/bin/compute-classpath.sh)
37+
if [[ "$?" != "0" ]]; then
38+
echo "$classpath_output"
39+
exit 1
40+
else
41+
CLASSPATH=$classpath_output
42+
fi
43+
44+
CLASS="org.apache.hive.beeline.BeeLine"
45+
exec "$RUNNER" -cp "$CLASSPATH" $CLASS "$@"

bin/compute-classpath.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if [ -n "$SPARK_PREPEND_CLASSES" ]; then
5252
CLASSPATH="$CLASSPATH:$FWDIR/sql/catalyst/target/scala-$SCALA_VERSION/classes"
5353
CLASSPATH="$CLASSPATH:$FWDIR/sql/core/target/scala-$SCALA_VERSION/classes"
5454
CLASSPATH="$CLASSPATH:$FWDIR/sql/hive/target/scala-$SCALA_VERSION/classes"
55+
CLASSPATH="$CLASSPATH:$FWDIR/sql/hive-thriftserver/target/scala-$SCALA_VERSION/classes"
5556
CLASSPATH="$CLASSPATH:$FWDIR/yarn/stable/target/scala-$SCALA_VERSION/classes"
5657
fi
5758

bin/spark-shell

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ function main(){
4646
# (see https://github.com/sbt/sbt/issues/562).
4747
stty -icanon min 1 -echo > /dev/null 2>&1
4848
export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djline.terminal=unix"
49-
$FWDIR/bin/spark-submit spark-shell "$@" --class org.apache.spark.repl.Main
49+
$FWDIR/bin/spark-submit --class org.apache.spark.repl.Main spark-shell "$@"
5050
stty icanon echo > /dev/null 2>&1
5151
else
5252
export SPARK_SUBMIT_OPTS
53-
$FWDIR/bin/spark-submit spark-shell "$@" --class org.apache.spark.repl.Main
53+
$FWDIR/bin/spark-submit --class org.apache.spark.repl.Main spark-shell "$@"
5454
fi
5555
}
5656

bin/spark-shell.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ rem
1919

2020
set SPARK_HOME=%~dp0..
2121

22-
cmd /V /E /C %SPARK_HOME%\bin\spark-submit.cmd spark-shell %* --class org.apache.spark.repl.Main
22+
cmd /V /E /C %SPARK_HOME%\bin\spark-submit.cmd spark-shell --class org.apache.spark.repl.Main %*

bin/spark-sql

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
#
21+
# Shell script for starting the Spark SQL CLI
22+
23+
# Enter posix mode for bash
24+
set -o posix
25+
26+
# Figure out where Spark is installed
27+
FWDIR="$(cd `dirname $0`/..; pwd)"
28+
29+
if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then
30+
echo "Usage: ./sbin/spark-sql [options]"
31+
$FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2
32+
exit 0
33+
fi
34+
35+
CLASS="org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver"
36+
exec "$FWDIR"/bin/spark-submit --class $CLASS spark-internal $@

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<groupId>org.apache.spark</groupId>
2929
<artifactId>spark-core_2.10</artifactId>
3030
<properties>
31-
<sbt.project.name>core</sbt.project.name>
31+
<sbt.project.name>core</sbt.project.name>
3232
</properties>
3333
<packaging>jar</packaging>
3434
<name>Spark Project Core</name>

0 commit comments

Comments
 (0)