Skip to content

Commit 140f20e

Browse files
committed
Merge branch 'master' of github.com:apache/spark into SPARK-3974
2 parents 1694c9e + 9142674 commit 140f20e

File tree

1,113 files changed

+43518
-19242
lines changed

Some content is hidden

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

1,113 files changed

+43518
-19242
lines changed

.gitignore

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@
55
*.ipr
66
*.iml
77
*.iws
8+
*.pyc
89
.idea/
910
.idea_modules/
10-
sbt/*.jar
11+
build/*.jar
1112
.settings
1213
.cache
14+
cache
1315
.generated-mima*
14-
/build/
1516
work/
1617
out/
1718
.DS_Store
1819
third_party/libmesos.so
1920
third_party/libmesos.dylib
21+
build/apache-maven*
22+
build/zinc*
23+
build/scala*
2024
conf/java-opts
2125
conf/*.sh
2226
conf/*.cmd
@@ -49,9 +53,12 @@ dependency-reduced-pom.xml
4953
checkpoint
5054
derby.log
5155
dist/
52-
spark-*-bin.tar.gz
56+
dev/create-release/*txt
57+
dev/create-release/*final
58+
spark-*-bin-*.tgz
5359
unit-tests.log
5460
/lib/
61+
ec2/lib/
5562
rat-results.txt
5663
scalastyle.txt
5764
scalastyle-output.xml

.rat-excludes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ dist/*
6464
logs
6565
.*scalastyle-output.xml
6666
.*dependency-reduced-pom.xml
67+
known_translations

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,8 @@ THE SOFTWARE.
646646

647647
========================================================================
648648
For Scala Interpreter classes (all .scala files in repl/src/main/scala
649-
except for Main.Scala, SparkHelper.scala and ExecutorClassLoader.scala):
649+
except for Main.Scala, SparkHelper.scala and ExecutorClassLoader.scala),
650+
and for SerializableMapWrapper in JavaUtils.scala:
650651
========================================================================
651652

652653
Copyright (c) 2002-2013 EPFL

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-with-maven.html).
29+
["Building Spark with Maven"](http://spark.apache.org/docs/latest/building-spark.html).
3030

3131
## Interactive Scala Shell
3232

assembly/pom.xml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.apache.spark</groupId>
2323
<artifactId>spark-parent</artifactId>
24-
<version>1.2.0-SNAPSHOT</version>
24+
<version>1.3.0-SNAPSHOT</version>
2525
<relativePath>../pom.xml</relativePath>
2626
</parent>
2727

@@ -142,8 +142,10 @@
142142
</includes>
143143
<excludes>
144144
<exclude>com/google/common/base/Absent*</exclude>
145+
<exclude>com/google/common/base/Function</exclude>
145146
<exclude>com/google/common/base/Optional*</exclude>
146147
<exclude>com/google/common/base/Present*</exclude>
148+
<exclude>com/google/common/base/Supplier</exclude>
147149
</excludes>
148150
</relocation>
149151
</relocations>
@@ -169,16 +171,6 @@
169171
</build>
170172

171173
<profiles>
172-
<profile>
173-
<id>yarn-alpha</id>
174-
<dependencies>
175-
<dependency>
176-
<groupId>org.apache.spark</groupId>
177-
<artifactId>spark-yarn-alpha_${scala.binary.version}</artifactId>
178-
<version>${project.version}</version>
179-
</dependency>
180-
</dependencies>
181-
</profile>
182174
<profile>
183175
<id>yarn</id>
184176
<dependencies>
@@ -364,5 +356,25 @@
364356
</dependency>
365357
</dependencies>
366358
</profile>
359+
360+
<!-- Profiles that disable inclusion of certain dependencies. -->
361+
<profile>
362+
<id>hadoop-provided</id>
363+
<properties>
364+
<hadoop.deps.scope>provided</hadoop.deps.scope>
365+
</properties>
366+
</profile>
367+
<profile>
368+
<id>hive-provided</id>
369+
<properties>
370+
<hive.deps.scope>provided</hive.deps.scope>
371+
</properties>
372+
</profile>
373+
<profile>
374+
<id>parquet-provided</id>
375+
<properties>
376+
<parquet.deps.scope>provided</parquet.deps.scope>
377+
</properties>
378+
</profile>
367379
</profiles>
368380
</project>

bagel/pom.xml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.apache.spark</groupId>
2323
<artifactId>spark-parent</artifactId>
24-
<version>1.2.0-SNAPSHOT</version>
24+
<version>1.3.0-SNAPSHOT</version>
2525
<relativePath>../pom.xml</relativePath>
2626
</parent>
2727

@@ -40,15 +40,6 @@
4040
<artifactId>spark-core_${scala.binary.version}</artifactId>
4141
<version>${project.version}</version>
4242
</dependency>
43-
<dependency>
44-
<groupId>org.eclipse.jetty</groupId>
45-
<artifactId>jetty-server</artifactId>
46-
</dependency>
47-
<dependency>
48-
<groupId>org.scalatest</groupId>
49-
<artifactId>scalatest_${scala.binary.version}</artifactId>
50-
<scope>test</scope>
51-
</dependency>
5243
<dependency>
5344
<groupId>org.scalacheck</groupId>
5445
<artifactId>scalacheck_${scala.binary.version}</artifactId>
@@ -58,11 +49,5 @@
5849
<build>
5950
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
6051
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
61-
<plugins>
62-
<plugin>
63-
<groupId>org.scalatest</groupId>
64-
<artifactId>scalatest-maven-plugin</artifactId>
65-
</plugin>
66-
</plugins>
6752
</build>
6853
</project>

bagel/src/test/resources/log4j.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# limitations under the License.
1616
#
1717

18-
# Set everything to be logged to the file bagel/target/unit-tests.log
18+
# Set everything to be logged to the file target/unit-tests.log
1919
log4j.rootCategory=INFO, file
2020
log4j.appender.file=org.apache.log4j.FileAppender
21-
log4j.appender.file.append=false
21+
log4j.appender.file.append=true
2222
log4j.appender.file.file=target/unit-tests.log
2323
log4j.appender.file.layout=org.apache.log4j.PatternLayout
2424
log4j.appender.file.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n

bin/beeline.cmd

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@echo off
2+
3+
rem
4+
rem Licensed to the Apache Software Foundation (ASF) under one or more
5+
rem contributor license agreements. See the NOTICE file distributed with
6+
rem this work for additional information regarding copyright ownership.
7+
rem The ASF licenses this file to You under the Apache License, Version 2.0
8+
rem (the "License"); you may not use this file except in compliance with
9+
rem the License. You may obtain a copy of the License at
10+
rem
11+
rem http://www.apache.org/licenses/LICENSE-2.0
12+
rem
13+
rem Unless required by applicable law or agreed to in writing, software
14+
rem distributed under the License is distributed on an "AS IS" BASIS,
15+
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
rem See the License for the specific language governing permissions and
17+
rem limitations under the License.
18+
rem
19+
20+
set SPARK_HOME=%~dp0..
21+
cmd /V /E /C %SPARK_HOME%\bin\spark-class.cmd org.apache.hive.beeline.BeeLine %*

bin/compute-classpath.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ if "x%YARN_CONF_DIR%"=="x" goto no_yarn_conf_dir
109109
set CLASSPATH=%CLASSPATH%;%YARN_CONF_DIR%
110110
:no_yarn_conf_dir
111111

112+
rem To allow for distributions to append needed libraries to the classpath (e.g. when
113+
rem using the "hadoop-provided" profile to build Spark), check SPARK_DIST_CLASSPATH and
114+
rem append it to tbe final classpath.
115+
if not "x%$SPARK_DIST_CLASSPATH%"=="x" (
116+
set CLASSPATH=%CLASSPATH%;%SPARK_DIST_CLASSPATH%
117+
)
118+
112119
rem A bit of a hack to allow calling this script within run2.cmd without seeing output
113120
if "%DONT_PRINT_CLASSPATH%"=="1" goto exit
114121

bin/compute-classpath.sh

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
2525

2626
. "$FWDIR"/bin/load-spark-env.sh
2727

28-
CLASSPATH="$SPARK_CLASSPATH:$SPARK_SUBMIT_CLASSPATH"
28+
if [ -n "$SPARK_CLASSPATH" ]; then
29+
CLASSPATH="$SPARK_CLASSPATH:$SPARK_SUBMIT_CLASSPATH"
30+
else
31+
CLASSPATH="$SPARK_SUBMIT_CLASSPATH"
32+
fi
2933

3034
# Build up classpath
3135
if [ -n "$SPARK_CONF_DIR" ]; then
@@ -68,22 +72,25 @@ else
6872
assembly_folder="$ASSEMBLY_DIR"
6973
fi
7074

71-
num_jars="$(ls "$assembly_folder" | grep "spark-assembly.*hadoop.*\.jar" | wc -l)"
72-
if [ "$num_jars" -eq "0" ]; then
73-
echo "Failed to find Spark assembly in $assembly_folder"
74-
echo "You need to build Spark before running this program."
75-
exit 1
76-
fi
75+
num_jars=0
76+
77+
for f in ${assembly_folder}/spark-assembly*hadoop*.jar; do
78+
if [[ ! -e "$f" ]]; then
79+
echo "Failed to find Spark assembly in $assembly_folder" 1>&2
80+
echo "You need to build Spark before running this program." 1>&2
81+
exit 1
82+
fi
83+
ASSEMBLY_JAR="$f"
84+
num_jars=$((num_jars+1))
85+
done
86+
7787
if [ "$num_jars" -gt "1" ]; then
78-
jars_list=$(ls "$assembly_folder" | grep "spark-assembly.*hadoop.*.jar")
79-
echo "Found multiple Spark assembly jars in $assembly_folder:"
80-
echo "$jars_list"
81-
echo "Please remove all but one jar."
88+
echo "Found multiple Spark assembly jars in $assembly_folder:" 1>&2
89+
ls ${assembly_folder}/spark-assembly*hadoop*.jar 1>&2
90+
echo "Please remove all but one jar." 1>&2
8291
exit 1
8392
fi
8493

85-
ASSEMBLY_JAR="$(ls "$assembly_folder"/spark-assembly*hadoop*.jar 2>/dev/null)"
86-
8794
# Verify that versions of java used to build the jars and run Spark are compatible
8895
jar_error_check=$("$JAR_CMD" -tf "$ASSEMBLY_JAR" nonexistent/class/path 2>&1)
8996
if [[ "$jar_error_check" =~ "invalid CEN header" ]]; then
@@ -108,7 +115,7 @@ else
108115
datanucleus_dir="$FWDIR"/lib_managed/jars
109116
fi
110117

111-
datanucleus_jars="$(find "$datanucleus_dir" 2>/dev/null | grep "datanucleus-.*\\.jar")"
118+
datanucleus_jars="$(find "$datanucleus_dir" 2>/dev/null | grep "datanucleus-.*\\.jar$")"
112119
datanucleus_jars="$(echo "$datanucleus_jars" | tr "\n" : | sed s/:$//g)"
113120

114121
if [ -n "$datanucleus_jars" ]; then
@@ -142,4 +149,11 @@ if [ -n "$YARN_CONF_DIR" ]; then
142149
CLASSPATH="$CLASSPATH:$YARN_CONF_DIR"
143150
fi
144151

152+
# To allow for distributions to append needed libraries to the classpath (e.g. when
153+
# using the "hadoop-provided" profile to build Spark), check SPARK_DIST_CLASSPATH and
154+
# append it to tbe final classpath.
155+
if [ -n "$SPARK_DIST_CLASSPATH" ]; then
156+
CLASSPATH="$CLASSPATH:$SPARK_DIST_CLASSPATH"
157+
fi
158+
145159
echo "$CLASSPATH"

0 commit comments

Comments
 (0)