Skip to content

Commit a77ddd5

Browse files
author
Marcelo Vanzin
committed
Merge branch 'master' into SPARK-2669
Conflicts: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala
2 parents 79221c7 + bc36356 commit a77ddd5

File tree

614 files changed

+40578
-8541
lines changed

Some content is hidden

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

614 files changed

+40578
-8541
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To build Spark and its example programs, run:
2626

2727
(You do not need to do this if you downloaded a pre-built package.)
2828
More detailed documentation is available from the project site, at
29-
["Building Spark with Maven"](http://spark.apache.org/docs/latest/building-spark.html).
29+
["Building Spark"](http://spark.apache.org/docs/latest/building-spark.html).
3030

3131
## Interactive Scala Shell
3232

assembly/pom.xml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,10 @@
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>
42+
<deb.bin.filemode>755</deb.bin.filemode>
4343
</properties>
4444

4545
<dependencies>
46-
<!-- Promote Guava to compile scope in this module so it's included while shading. -->
47-
<dependency>
48-
<groupId>com.google.guava</groupId>
49-
<artifactId>guava</artifactId>
50-
<scope>compile</scope>
51-
</dependency>
5246
<dependency>
5347
<groupId>org.apache.spark</groupId>
5448
<artifactId>spark-core_${scala.binary.version}</artifactId>
@@ -133,20 +127,6 @@
133127
<goal>shade</goal>
134128
</goals>
135129
<configuration>
136-
<relocations>
137-
<relocation>
138-
<pattern>com.google</pattern>
139-
<shadedPattern>org.spark-project.guava</shadedPattern>
140-
<includes>
141-
<include>com.google.common.**</include>
142-
</includes>
143-
<excludes>
144-
<exclude>com/google/common/base/Absent*</exclude>
145-
<exclude>com/google/common/base/Optional*</exclude>
146-
<exclude>com/google/common/base/Present*</exclude>
147-
</excludes>
148-
</relocation>
149-
</relocations>
150130
<transformers>
151131
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
152132
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
@@ -300,7 +280,7 @@
300280
<user>${deb.user}</user>
301281
<group>${deb.user}</group>
302282
<prefix>${deb.install.path}/conf</prefix>
303-
<filemode>744</filemode>
283+
<filemode>${deb.bin.filemode}</filemode>
304284
</mapper>
305285
</data>
306286
<data>
@@ -322,7 +302,7 @@
322302
<user>${deb.user}</user>
323303
<group>${deb.user}</group>
324304
<prefix>${deb.install.path}/sbin</prefix>
325-
<filemode>744</filemode>
305+
<filemode>${deb.bin.filemode}</filemode>
326306
</mapper>
327307
</data>
328308
<data>
@@ -333,7 +313,7 @@
333313
<user>${deb.user}</user>
334314
<group>${deb.user}</group>
335315
<prefix>${deb.install.path}/python</prefix>
336-
<filemode>744</filemode>
316+
<filemode>${deb.bin.filemode}</filemode>
337317
</mapper>
338318
</data>
339319
</dataSet>

bin/compute-classpath.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ fi
5050
if [ -n "$SPARK_PREPEND_CLASSES" ]; then
5151
echo "NOTE: SPARK_PREPEND_CLASSES is set, placing locally compiled Spark"\
5252
"classes ahead of assembly." >&2
53+
# Spark classes
5354
CLASSPATH="$CLASSPATH:$FWDIR/core/target/scala-$SPARK_SCALA_VERSION/classes"
54-
CLASSPATH="$CLASSPATH:$FWDIR/core/target/jars/*"
5555
CLASSPATH="$CLASSPATH:$FWDIR/repl/target/scala-$SPARK_SCALA_VERSION/classes"
5656
CLASSPATH="$CLASSPATH:$FWDIR/mllib/target/scala-$SPARK_SCALA_VERSION/classes"
5757
CLASSPATH="$CLASSPATH:$FWDIR/bagel/target/scala-$SPARK_SCALA_VERSION/classes"
@@ -63,6 +63,8 @@ if [ -n "$SPARK_PREPEND_CLASSES" ]; then
6363
CLASSPATH="$CLASSPATH:$FWDIR/sql/hive/target/scala-$SPARK_SCALA_VERSION/classes"
6464
CLASSPATH="$CLASSPATH:$FWDIR/sql/hive-thriftserver/target/scala-$SPARK_SCALA_VERSION/classes"
6565
CLASSPATH="$CLASSPATH:$FWDIR/yarn/stable/target/scala-$SPARK_SCALA_VERSION/classes"
66+
# Jars for shaded deps in their original form (copied here during build)
67+
CLASSPATH="$CLASSPATH:$FWDIR/core/target/jars/*"
6668
fi
6769

6870
# Use spark-assembly jar from either RELEASE or assembly directory

bin/spark-class

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
2929

3030
# Export this as SPARK_HOME
3131
export SPARK_HOME="$FWDIR"
32+
export SPARK_CONF_DIR="${SPARK_CONF_DIR:-"$SPARK_HOME/conf"}"
3233

3334
. "$FWDIR"/bin/load-spark-env.sh
3435

@@ -120,8 +121,8 @@ fi
120121
JAVA_OPTS="$JAVA_OPTS -Xms$OUR_JAVA_MEM -Xmx$OUR_JAVA_MEM"
121122

122123
# Load extra JAVA_OPTS from conf/java-opts, if it exists
123-
if [ -e "$FWDIR/conf/java-opts" ] ; then
124-
JAVA_OPTS="$JAVA_OPTS `cat "$FWDIR"/conf/java-opts`"
124+
if [ -e "$SPARK_CONF_DIR/java-opts" ] ; then
125+
JAVA_OPTS="$JAVA_OPTS `cat "$SPARK_CONF_DIR"/java-opts`"
125126
fi
126127

127128
# Attention: when changing the way the JAVA_OPTS are assembled, the change must be reflected in CommandUtils.scala!

bin/spark-shell.cmd

100755100644
File mode changed.

bin/spark-submit2.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ set ORIG_ARGS=%*
2525
rem Reset the values of all variables used
2626
set SPARK_SUBMIT_DEPLOY_MODE=client
2727

28-
if not defined %SPARK_CONF_DIR% (
28+
if [%SPARK_CONF_DIR%] == [] (
2929
set SPARK_CONF_DIR=%SPARK_HOME%\conf
3030
)
3131
set SPARK_SUBMIT_PROPERTIES_FILE=%SPARK_CONF_DIR%\spark-defaults.conf

bin/utils.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ function gatherSparkSubmitOpts() {
2626
exit 1
2727
fi
2828

29-
# NOTE: If you add or remove spark-sumbmit options,
29+
# NOTE: If you add or remove spark-submit options,
3030
# modify NOT ONLY this script but also SparkSubmitArgument.scala
3131
SUBMISSION_OPTS=()
3232
APPLICATION_OPTS=()
3333
while (($#)); do
3434
case "$1" in
35-
--master | --deploy-mode | --class | --name | --jars | --py-files | --files | \
36-
--conf | --properties-file | --driver-memory | --driver-java-options | \
35+
--master | --deploy-mode | --class | --name | --jars | --packages | --py-files | --files | \
36+
--conf | --repositories | --properties-file | --driver-memory | --driver-java-options | \
3737
--driver-library-path | --driver-class-path | --executor-memory | --driver-cores | \
3838
--total-executor-cores | --executor-cores | --queue | --num-executors | --archives)
3939
if [[ $# -lt 2 ]]; then

bin/windows-utils.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SET opts="\<--master\> \<--deploy-mode\> \<--class\> \<--name\> \<--jars\> \<--p
3232
SET opts="%opts:~1,-1% \<--conf\> \<--properties-file\> \<--driver-memory\> \<--driver-java-options\>"
3333
SET opts="%opts:~1,-1% \<--driver-library-path\> \<--driver-class-path\> \<--executor-memory\>"
3434
SET opts="%opts:~1,-1% \<--driver-cores\> \<--total-executor-cores\> \<--executor-cores\> \<--queue\>"
35-
SET opts="%opts:~1,-1% \<--num-executors\> \<--archives\>"
35+
SET opts="%opts:~1,-1% \<--num-executors\> \<--archives\> \<--packages\> \<--repositories\>"
3636

3737
echo %1 | findstr %opts% >nul
3838
if %ERRORLEVEL% equ 0 (

build/mvn

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,25 @@ install_app() {
3434
local binary="${_DIR}/$3"
3535

3636
# setup `curl` and `wget` silent options if we're running on Jenkins
37-
local curl_opts=""
37+
local curl_opts="-L"
3838
local wget_opts=""
3939
if [ -n "$AMPLAB_JENKINS" ]; then
40-
curl_opts="-s"
41-
wget_opts="--quiet"
40+
curl_opts="-s ${curl_opts}"
41+
wget_opts="--quiet ${wget_opts}"
4242
else
43-
curl_opts="--progress-bar"
44-
wget_opts="--progress=bar:force"
43+
curl_opts="--progress-bar ${curl_opts}"
44+
wget_opts="--progress=bar:force ${wget_opts}"
4545
fi
4646

4747
if [ -z "$3" -o ! -f "$binary" ]; then
4848
# check if we already have the tarball
4949
# check if we have curl installed
5050
# download application
51-
[ ! -f "${local_tarball}" ] && [ -n "`which curl 2>/dev/null`" ] && \
51+
[ ! -f "${local_tarball}" ] && [ $(command -v curl) ] && \
5252
echo "exec: curl ${curl_opts} ${remote_tarball}" && \
5353
curl ${curl_opts} "${remote_tarball}" > "${local_tarball}"
5454
# if the file still doesn't exist, lets try `wget` and cross our fingers
55-
[ ! -f "${local_tarball}" ] && [ -n "`which wget 2>/dev/null`" ] && \
55+
[ ! -f "${local_tarball}" ] && [ $(command -v wget) ] && \
5656
echo "exec: wget ${wget_opts} ${remote_tarball}" && \
5757
wget ${wget_opts} -O "${local_tarball}" "${remote_tarball}"
5858
# if both were unsuccessful, exit
@@ -68,10 +68,10 @@ install_app() {
6868
# Install maven under the build/ folder
6969
install_mvn() {
7070
install_app \
71-
"http://apache.claz.org/maven/maven-3/3.2.3/binaries" \
72-
"apache-maven-3.2.3-bin.tar.gz" \
73-
"apache-maven-3.2.3/bin/mvn"
74-
MVN_BIN="${_DIR}/apache-maven-3.2.3/bin/mvn"
71+
"http://archive.apache.org/dist/maven/maven-3/3.2.5/binaries" \
72+
"apache-maven-3.2.5-bin.tar.gz" \
73+
"apache-maven-3.2.5/bin/mvn"
74+
MVN_BIN="${_DIR}/apache-maven-3.2.5/bin/mvn"
7575
}
7676

7777
# Install zinc under the build/ folder

build/sbt-launch-lib.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ acquire_sbt_jar () {
5050
# Download
5151
printf "Attempting to fetch sbt\n"
5252
JAR_DL="${JAR}.part"
53-
if hash curl 2>/dev/null; then
53+
if [ $(command -v curl) ]; then
5454
(curl --silent ${URL1} > "${JAR_DL}" || curl --silent ${URL2} > "${JAR_DL}") && mv "${JAR_DL}" "${JAR}"
55-
elif hash wget 2>/dev/null; then
55+
elif [ $(command -v wget) ]; then
5656
(wget --quiet ${URL1} -O "${JAR_DL}" || wget --quiet ${URL2} -O "${JAR_DL}") && mv "${JAR_DL}" "${JAR}"
5757
else
5858
printf "You do not have curl or wget installed, please install sbt manually from http://www.scala-sbt.org/\n"

0 commit comments

Comments
 (0)