Skip to content

Commit 86aa274

Browse files
Merge remote-tracking branch 'asf/master'
Conflicts: external/flume/src/main/scala/org/apache/spark/streaming/flume/FlumeInputDStream.scala project/SparkBuild.scala
2 parents 205034d + 40a8fef commit 86aa274

File tree

311 files changed

+9482
-3577
lines changed

Some content is hidden

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

311 files changed

+9482
-3577
lines changed

.rat-excludes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ target
44
.classpath
55
.mima-excludes
66
.generated-mima-excludes
7+
.generated-mima-class-excludes
8+
.generated-mima-member-excludes
79
.rat-excludes
810
.*md
911
derby.log
@@ -20,6 +22,8 @@ slaves
2022
spark-env.sh
2123
spark-env.sh.template
2224
log4j-defaults.properties
25+
bootstrap-tooltip.js
26+
jquery-1.11.1.min.js
2327
sorttable.js
2428
.*txt
2529
.*json

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,29 +69,28 @@ can be run using:
6969
Spark uses the Hadoop core library to talk to HDFS and other Hadoop-supported
7070
storage systems. Because the protocols have changed in different versions of
7171
Hadoop, you must build Spark against the same version that your cluster runs.
72-
You can change the version by setting the `SPARK_HADOOP_VERSION` environment
73-
when building Spark.
72+
You can change the version by setting `-Dhadoop.version` when building Spark.
7473

7574
For Apache Hadoop versions 1.x, Cloudera CDH MRv1, and other Hadoop
7675
versions without YARN, use:
7776

7877
# Apache Hadoop 1.2.1
79-
$ SPARK_HADOOP_VERSION=1.2.1 sbt/sbt assembly
78+
$ sbt/sbt -Dhadoop.version=1.2.1 assembly
8079

8180
# Cloudera CDH 4.2.0 with MapReduce v1
82-
$ SPARK_HADOOP_VERSION=2.0.0-mr1-cdh4.2.0 sbt/sbt assembly
81+
$ sbt/sbt -Dhadoop.version=2.0.0-mr1-cdh4.2.0 assembly
8382

8483
For Apache Hadoop 2.2.X, 2.1.X, 2.0.X, 0.23.x, Cloudera CDH MRv2, and other Hadoop versions
8584
with YARN, also set `SPARK_YARN=true`:
8685

8786
# Apache Hadoop 2.0.5-alpha
88-
$ SPARK_HADOOP_VERSION=2.0.5-alpha SPARK_YARN=true sbt/sbt assembly
87+
$ sbt/sbt -Dhadoop.version=2.0.5-alpha -Pyarn assembly
8988

9089
# Cloudera CDH 4.2.0 with MapReduce v2
91-
$ SPARK_HADOOP_VERSION=2.0.0-cdh4.2.0 SPARK_YARN=true sbt/sbt assembly
90+
$ sbt/sbt -Dhadoop.version=2.0.0-cdh4.2.0 -Pyarn assembly
9291

9392
# Apache Hadoop 2.2.X and newer
94-
$ SPARK_HADOOP_VERSION=2.2.0 SPARK_YARN=true sbt/sbt assembly
93+
$ sbt/sbt -Dhadoop.version=2.2.0 -Pyarn assembly
9594

9695
When developing a Spark application, specify the Hadoop version by adding the
9796
"hadoop-client" artifact to your project's dependencies. For example, if you're

assembly/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<packaging>pom</packaging>
3333

3434
<properties>
35+
<sbt.project.name>assembly</sbt.project.name>
3536
<spark.jar.dir>scala-${scala.binary.version}</spark.jar.dir>
3637
<spark.jar.basename>spark-assembly-${project.version}-hadoop${hadoop.version}.jar</spark.jar.basename>
3738
<spark.jar>${project.build.directory}/${spark.jar.dir}/${spark.jar.basename}</spark.jar>

bagel/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727

2828
<groupId>org.apache.spark</groupId>
2929
<artifactId>spark-bagel_2.10</artifactId>
30+
<properties>
31+
<sbt.project.name>bagel</sbt.project.name>
32+
</properties>
3033
<packaging>jar</packaging>
3134
<name>Spark Project Bagel</name>
3235
<url>http://spark.apache.org/</url>

bin/compute-classpath.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ ASSEMBLY_JAR=$(ls "$assembly_folder"/spark-assembly*hadoop*.jar 2>/dev/null)
8181
# Verify that versions of java used to build the jars and run Spark are compatible
8282
jar_error_check=$("$JAR_CMD" -tf "$ASSEMBLY_JAR" nonexistent/class/path 2>&1)
8383
if [[ "$jar_error_check" =~ "invalid CEN header" ]]; then
84-
echo "Loading Spark jar with '$JAR_CMD' failed. "
85-
echo "This is likely because Spark was compiled with Java 7 and run "
86-
echo "with Java 6. (see SPARK-1703). Please use Java 7 to run Spark "
87-
echo "or build Spark with Java 6."
84+
echo "Loading Spark jar with '$JAR_CMD' failed. " 1>&2
85+
echo "This is likely because Spark was compiled with Java 7 and run " 1>&2
86+
echo "with Java 6. (see SPARK-1703). Please use Java 7 to run Spark " 1>&2
87+
echo "or build Spark with Java 6." 1>&2
8888
exit 1
8989
fi
9090

bin/pyspark

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export SPARK_HOME="$FWDIR"
2626
SCALA_VERSION=2.10
2727

2828
if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then
29-
echo "Usage: ./bin/pyspark [options]"
29+
echo "Usage: ./bin/pyspark [options]" 1>&2
3030
$FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2
3131
exit 0
3232
fi
@@ -36,8 +36,8 @@ if [ ! -f "$FWDIR/RELEASE" ]; then
3636
# Exit if the user hasn't compiled Spark
3737
ls "$FWDIR"/assembly/target/scala-$SCALA_VERSION/spark-assembly*hadoop*.jar >& /dev/null
3838
if [[ $? != 0 ]]; then
39-
echo "Failed to find Spark assembly in $FWDIR/assembly/target" >&2
40-
echo "You need to build Spark before running this program" >&2
39+
echo "Failed to find Spark assembly in $FWDIR/assembly/target" 1>&2
40+
echo "You need to build Spark before running this program" 1>&2
4141
exit 1
4242
fi
4343
fi

bin/run-example

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ if [ -n "$1" ]; then
2727
EXAMPLE_CLASS="$1"
2828
shift
2929
else
30-
echo "Usage: ./bin/run-example <example-class> [example-args]"
31-
echo " - set MASTER=XX to use a specific master"
32-
echo " - can use abbreviated example class name (e.g. SparkPi, mllib.LinearRegression)"
30+
echo "Usage: ./bin/run-example <example-class> [example-args]" 1>&2
31+
echo " - set MASTER=XX to use a specific master" 1>&2
32+
echo " - can use abbreviated example class name (e.g. SparkPi, mllib.LinearRegression)" 1>&2
3333
exit 1
3434
fi
3535

@@ -40,8 +40,8 @@ elif [ -e "$EXAMPLES_DIR"/target/scala-$SCALA_VERSION/spark-examples-*hadoop*.ja
4040
fi
4141

4242
if [[ -z $SPARK_EXAMPLES_JAR ]]; then
43-
echo "Failed to find Spark examples assembly in $FWDIR/lib or $FWDIR/examples/target" >&2
44-
echo "You need to build Spark before running this program" >&2
43+
echo "Failed to find Spark examples assembly in $FWDIR/lib or $FWDIR/examples/target" 1>&2
44+
echo "You need to build Spark before running this program" 1>&2
4545
exit 1
4646
fi
4747

bin/spark-class

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ export SPARK_HOME="$FWDIR"
3333
. $FWDIR/bin/load-spark-env.sh
3434

3535
if [ -z "$1" ]; then
36-
echo "Usage: spark-class <class> [<args>]" >&2
36+
echo "Usage: spark-class <class> [<args>]" 1>&2
3737
exit 1
3838
fi
3939

4040
if [ -n "$SPARK_MEM" ]; then
41-
echo "Warning: SPARK_MEM is deprecated, please use a more specific config option"
42-
echo "(e.g., spark.executor.memory or SPARK_DRIVER_MEMORY)."
41+
echo -e "Warning: SPARK_MEM is deprecated, please use a more specific config option" 1>&2
42+
echo -e "(e.g., spark.executor.memory or SPARK_DRIVER_MEMORY)." 1>&2
4343
fi
4444

4545
# Use SPARK_MEM or 512m as the default memory, to be overridden by specific options
@@ -110,9 +110,9 @@ export JAVA_OPTS
110110

111111
TOOLS_DIR="$FWDIR"/tools
112112
SPARK_TOOLS_JAR=""
113-
if [ -e "$TOOLS_DIR"/target/scala-$SCALA_VERSION/*assembly*[0-9Tg].jar ]; then
113+
if [ -e "$TOOLS_DIR"/target/scala-$SCALA_VERSION/spark-tools*[0-9Tg].jar ]; then
114114
# Use the JAR from the SBT build
115-
export SPARK_TOOLS_JAR=`ls "$TOOLS_DIR"/target/scala-$SCALA_VERSION/*assembly*[0-9Tg].jar`
115+
export SPARK_TOOLS_JAR=`ls "$TOOLS_DIR"/target/scala-$SCALA_VERSION/spark-tools*[0-9Tg].jar`
116116
fi
117117
if [ -e "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar ]; then
118118
# Use the JAR from the Maven build
@@ -130,6 +130,11 @@ else
130130
fi
131131

132132
if [[ "$1" =~ org.apache.spark.tools.* ]]; then
133+
if test -z "$SPARK_TOOLS_JAR"; then
134+
echo "Failed to find Spark Tools Jar in $FWDIR/tools/target/scala-$SCALA_VERSION/" 1>&2
135+
echo "You need to build spark before running $1." 1>&2
136+
exit 1
137+
fi
133138
CLASSPATH="$CLASSPATH:$SPARK_TOOLS_JAR"
134139
fi
135140

@@ -142,10 +147,9 @@ fi
142147
export CLASSPATH
143148

144149
if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then
145-
echo -n "Spark Command: "
146-
echo "$RUNNER" -cp "$CLASSPATH" $JAVA_OPTS "$@"
147-
echo "========================================"
148-
echo
150+
echo -n "Spark Command: " 1>&2
151+
echo "$RUNNER" -cp "$CLASSPATH" $JAVA_OPTS "$@" 1>&2
152+
echo -e "========================================\n" 1>&2
149153
fi
150154

151155
exec "$RUNNER" -cp "$CLASSPATH" $JAVA_OPTS "$@"

conf/log4j.properties.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}:
77

88
# Settings to quiet third party logs that are too verbose
99
log4j.logger.org.eclipse.jetty=WARN
10+
log4j.logger.org.eclipse.jetty.util.component.AbstractLifeCycle=ERROR
1011
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=INFO
1112
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=INFO

core/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,22 @@
2727

2828
<groupId>org.apache.spark</groupId>
2929
<artifactId>spark-core_2.10</artifactId>
30+
<properties>
31+
<sbt.project.name>core</sbt.project.name>
32+
</properties>
3033
<packaging>jar</packaging>
3134
<name>Spark Project Core</name>
3235
<url>http://spark.apache.org/</url>
3336
<dependencies>
3437
<dependency>
3538
<groupId>org.apache.hadoop</groupId>
3639
<artifactId>hadoop-client</artifactId>
40+
<exclusions>
41+
<exclusion>
42+
<groupId>javax.servlet</groupId>
43+
<artifactId>servlet-api</artifactId>
44+
</exclusion>
45+
</exclusions>
3746
</dependency>
3847
<dependency>
3948
<groupId>net.java.dev.jets3t</groupId>
@@ -244,6 +253,11 @@
244253
<artifactId>easymockclassextension</artifactId>
245254
<scope>test</scope>
246255
</dependency>
256+
<dependency>
257+
<groupId>asm</groupId>
258+
<artifactId>asm</artifactId>
259+
<scope>test</scope>
260+
</dependency>
247261
<dependency>
248262
<groupId>com.novocode</groupId>
249263
<artifactId>junit-interface</artifactId>

core/src/main/resources/org/apache/spark/log4j-defaults.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}:
77

88
# Settings to quiet third party logs that are too verbose
99
log4j.logger.org.eclipse.jetty=WARN
10+
log4j.logger.org.eclipse.jetty.util.component.AbstractLifeCycle=ERROR
1011
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=INFO
1112
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=INFO

0 commit comments

Comments
 (0)