Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into SPARK-28461
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/sql-migration-guide-upgrade.md
#	sql/core/src/test/resources/sql-tests/results/pgSQL/numeric.sql.out
#	sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
  • Loading branch information
wangyum committed Aug 25, 2019
2 parents 141c3d4 + 02a0cde commit ab192f6
Show file tree
Hide file tree
Showing 652 changed files with 21,678 additions and 4,141 deletions.
44 changes: 38 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -1,10 +1,42 @@
## What changes were proposed in this pull request?
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes.
6. If possible, provide a concise example to reproduce the issue for a faster review.
-->

(Please fill in changes proposed in this fix)
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->

## How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->

Please review https://spark.apache.org/contributing.html before opening a pull request.

### Does this PR introduce any user-facing change?
<!--
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If no, write 'No'.
-->


### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
27 changes: 27 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: master

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
java: [ '1.8', '11' ]
name: Build Spark with JDK ${{ matrix.java }}

steps:
- uses: actions/checkout@master
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
version: ${{ matrix.java }}
- name: Build with Maven
run: |
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
export MAVEN_CLI_OPTS="--no-transfer-progress"
./build/mvn $MAVEN_CLI_OPTS -DskipTests package
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ project/plugins/project/build.properties
project/plugins/src_managed/
project/plugins/target/
python/lib/pyspark.zip
python/.eggs/
python/deps
python/test_coverage/coverage_data
python/test_coverage/htmlcov
Expand All @@ -70,6 +71,7 @@ scalastyle-on-compile.generated.xml
scalastyle-output.xml
scalastyle.txt
spark-*-bin-*.tgz
spark-resources/
spark-tests.log
src_managed/
streaming-tests.log
Expand Down
9 changes: 6 additions & 3 deletions LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ commons-codec:commons-codec
commons-collections:commons-collections
io.fabric8:kubernetes-client
io.fabric8:kubernetes-model
io.netty:netty
io.netty:netty-all
net.hydromatic:eigenbase-properties
net.sf.supercsv:super-csv
Expand Down Expand Up @@ -464,10 +463,8 @@ javax.xml.stream:stax-api https://jcp.org/en/jsr/detail?id=173
Common Development and Distribution License (CDDL) 1.1
------------------------------------------------------

javax.annotation:javax.annotation-api https://jcp.org/en/jsr/detail?id=250
javax.servlet:javax.servlet-api https://javaee.github.io/servlet-spec/
javax.transaction:jta http://www.oracle.com/technetwork/java/index.html
javax.ws.rs:javax.ws.rs-api https://github.com/jax-rs
javax.xml.bind:jaxb-api https://github.com/javaee/jaxb-v2
org.glassfish.hk2:hk2-api https://github.com/javaee/glassfish
org.glassfish.hk2:hk2-locator (same)
Expand All @@ -492,6 +489,12 @@ jakarta.xml.bind:jakarta.xml.bind-api
com.sun.istack:istack-commons-runtime


Eclipse Public License (EPL) 2.0
--------------------------------

jakarta.annotation:jakarta-annotation-api https://projects.eclipse.org/projects/ee4j.ca
jakarta.ws.rs:jakarta.ws.rs-api https://github.com/eclipse-ee4j/jaxrs-api

Mozilla Public License (MPL) 1.1
--------------------------------

Expand Down
74 changes: 16 additions & 58 deletions NOTICE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ The binary distribution of this product bundles binaries of
Gson 2.2.4,
which has the following notices:


The Netty Project
=================

Expand Down Expand Up @@ -154,29 +155,16 @@ facade for Java, which can be obtained at:
* HOMEPAGE:
* http://www.slf4j.org/

This product contains a modified portion of 'ArrayDeque', written by Josh
Bloch of Google, Inc:

* LICENSE:
* license/LICENSE.deque.txt (Public Domain)

This product contains a modified portion of 'Apache Harmony', an open source
Java SE, which can be obtained at:

* NOTICE:
* license/NOTICE.harmony.txt
* LICENSE:
* license/LICENSE.harmony.txt (Apache License 2.0)
* HOMEPAGE:
* http://archive.apache.org/dist/harmony/

This product contains a modified version of Roland Kuhn's ASL2
AbstractNodeQueue, which is based on Dmitriy Vyukov's non-intrusive MPSC queue.
It can be obtained at:

* LICENSE:
* license/LICENSE.abstractnodequeue.txt (Public Domain)
* HOMEPAGE:
* https://github.com/akka/akka/blob/wip-2.2.3-for-scala-2.11/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java

This product contains a modified portion of 'jbzip2', a Java bzip2 compression
and decompression library written by Matthew J. Francis. It can be obtained at:

Expand All @@ -192,7 +180,7 @@ a constant-size alphabet written by Yuta Mori. It can be obtained at:
* LICENSE:
* license/LICENSE.libdivsufsort.txt (MIT License)
* HOMEPAGE:
* https://code.google.com/p/libdivsufsort/
* https://github.com/y-256/libdivsufsort

This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM,
which can be obtained at:
Expand Down Expand Up @@ -248,7 +236,7 @@ interchange format, which can be obtained at:
* LICENSE:
* license/LICENSE.protobuf.txt (New BSD License)
* HOMEPAGE:
* http://code.google.com/p/protobuf/
* https://github.com/google/protobuf

This product optionally depends on 'Bouncy Castle Crypto APIs' to generate
a temporary self-signed X.509 certificate when the JVM does not provide the
Expand All @@ -265,7 +253,7 @@ by Google Inc, which can be obtained at:
* LICENSE:
* license/LICENSE.snappy.txt (New BSD License)
* HOMEPAGE:
* http://code.google.com/p/snappy/
* https://github.com/google/snappy

This product optionally depends on 'JBoss Marshalling', an alternative Java
serialization API, which can be obtained at:
Expand All @@ -281,7 +269,7 @@ benchmarking framework, which can be obtained at:
* LICENSE:
* license/LICENSE.caliper.txt (Apache License 2.0)
* HOMEPAGE:
* http://code.google.com/p/caliper/
* https://github.com/google/caliper

This product optionally depends on 'Apache Commons Logging', a logging
framework, which can be obtained at:
Expand Down Expand Up @@ -323,6 +311,15 @@ provides utilities for the java.lang API, which can be obtained at:
* HOMEPAGE:
* https://commons.apache.org/proper/commons-lang/


This product contains the Maven wrapper scripts from 'Maven Wrapper', that provides an easy way to ensure a user has everything necessary to run the Maven build.

* LICENSE:
* license/LICENSE.mvn-wrapper.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/takari/maven-wrapper


The binary distribution of this product bundles binaries of
Commons Codec 1.4,
which has the following notices:
Expand Down Expand Up @@ -619,45 +616,6 @@ fixes; these can be found from file "VERSION.txt" in SCM.
Apache Commons Net
Copyright 2001-2012 The Apache Software Foundation

Copyright 2011 The Netty Project

http://www.apache.org/licenses/LICENSE-2.0

This product contains a modified version of 'JZlib', a re-implementation of
zlib in pure Java, which can be obtained at:

* LICENSE:
* license/LICENSE.jzlib.txt (BSD Style License)
* HOMEPAGE:
* http://www.jcraft.com/jzlib/

This product contains a modified version of 'Webbit', a Java event based
WebSocket and HTTP server:

This product optionally depends on 'Protocol Buffers', Google's data
interchange format, which can be obtained at:

This product optionally depends on 'SLF4J', a simple logging facade for Java,
which can be obtained at:

This product optionally depends on 'Apache Log4J', a logging framework,
which can be obtained at:

This product optionally depends on 'JBoss Logging', a logging framework,
which can be obtained at:

* LICENSE:
* license/LICENSE.jboss-logging.txt (GNU LGPL 2.1)
* HOMEPAGE:
* http://anonsvn.jboss.org/repos/common/common-logging-spi/

This product optionally depends on 'Apache Felix', an open source OSGi
framework implementation, which can be obtained at:

* LICENSE:
* license/LICENSE.felix.txt (Apache License 2.0)
* HOMEPAGE:
* http://felix.apache.org/

Jackson core and extension components may be licensed under different licenses.
To find the details that apply to this artifact see the accompanying LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion R/pkg/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Authors@R: c(person("Shivaram", "Venkataraman", role = c("aut", "cre"),
License: Apache License (== 2.0)
URL: https://www.apache.org/ https://spark.apache.org/
BugReports: https://spark.apache.org/contributing.html
SystemRequirements: Java (== 8)
SystemRequirements: Java (>= 8, < 12)
Depends:
R (>= 3.1),
methods
Expand Down
23 changes: 16 additions & 7 deletions R/pkg/R/client.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ checkJavaVersion <- function() {
javaBin <- "java"
javaHome <- Sys.getenv("JAVA_HOME")
javaReqs <- utils::packageDescription(utils::packageName(), fields = c("SystemRequirements"))
sparkJavaVersion <- as.numeric(tail(strsplit(javaReqs, "[(=)]")[[1]], n = 1L))
sparkJavaVersions <- strsplit(javaReqs, "[(,)]")[[1]]
minJavaVersion <- as.numeric(strsplit(sparkJavaVersions[[2]], ">= ")[[1]][[2]])
maxJavaVersion <- as.numeric(strsplit(sparkJavaVersions[[3]], "< ")[[1]][[2]])
if (javaHome != "") {
javaBin <- file.path(javaHome, "bin", javaBin)
}
Expand All @@ -91,12 +93,19 @@ checkJavaVersion <- function() {
}, javaVersionOut)

javaVersionStr <- strsplit(javaVersionFilter[[1]], "[\"]")[[1L]][2]
# javaVersionStr is of the form 1.8.0_92.
# Extract 8 from it to compare to sparkJavaVersion
javaVersionNum <- as.integer(strsplit(javaVersionStr, "[.]")[[1L]][2])
if (javaVersionNum != sparkJavaVersion) {
stop(paste("Java version", sparkJavaVersion, "is required for this package; found version:",
javaVersionStr))
# javaVersionStr is of the form 1.8.0_92/9.0.x/11.0.x.
# We are using 8, 9, 10, 11 for sparkJavaVersion.
versions <- strsplit(javaVersionStr, "[.]")[[1L]]
if ("1" == versions[1]) {
javaVersionNum <- as.integer(versions[2])
} else {
javaVersionNum <- as.integer(versions[1])
}
if (javaVersionNum < minJavaVersion || javaVersionNum >= maxJavaVersion) {
stop(paste0("Java version, greater than or equal to ", minJavaVersion,
" and less than ", maxJavaVersion,
", is required for this package; found version: ",
javaVersionStr))
}
return(javaVersionNum)
}
Expand Down
3 changes: 2 additions & 1 deletion R/pkg/R/context.R
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ setCheckpointDirSC <- function(sc, dirName) {
#'
#' A directory can be given if the recursive option is set to true.
#' Currently directories are only supported for Hadoop-supported filesystems.
#' Refer Hadoop-supported filesystems at \url{https://wiki.apache.org/hadoop/HCFS}.
#' Refer Hadoop-supported filesystems at
#' \url{https://cwiki.apache.org/confluence/display/HADOOP2/HCFS}.
#'
#' Note: A path can be added only once. Subsequent additions of the same path are ignored.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/pkg/tests/fulltests/test_mllib_classification.R
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ test_that("spark.mlp", {
expect_equal(summary$layers, c(4, 5, 4, 3))
expect_equal(length(summary$weights), 64)
expect_equal(head(summary$weights, 5), list(-24.28415, 107.8701, 16.86376, 1.103736, 9.244488),
tolerance = 1e-6)
tolerance = 1e-1)

# Test predict method
mlpTestDF <- df
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ build_script:

environment:
NOT_CRAN: true
# See SPARK-27848. Currently installing some dependent packagess causes
# See SPARK-27848. Currently installing some dependent packages causes
# "(converted from warning) unable to identify current timezone 'C':" for an unknown reason.
# This environment variable works around to test SparkR against a higher version.
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ private FetchResult fetchChunks(List<Integer> chunkIndices) throws Exception {
clientFactory.createClient(TestUtils.getLocalHost(), server.getPort())) {
final Semaphore sem = new Semaphore(0);

res.successChunks = Collections.synchronizedSet(new HashSet<Integer>());
res.failedChunks = Collections.synchronizedSet(new HashSet<Integer>());
res.buffers = Collections.synchronizedList(new LinkedList<ManagedBuffer>());
res.successChunks = Collections.synchronizedSet(new HashSet<>());
res.failedChunks = Collections.synchronizedSet(new HashSet<>());
res.buffers = Collections.synchronizedList(new LinkedList<>());

ChunkReceivedCallback callback = new ChunkReceivedCallback() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ private RpcResult sendRPC(String ... commands) throws Exception {
final Semaphore sem = new Semaphore(0);

final RpcResult res = new RpcResult();
res.successMessages = Collections.synchronizedSet(new HashSet<String>());
res.errorMessages = Collections.synchronizedSet(new HashSet<String>());
res.successMessages = Collections.synchronizedSet(new HashSet<>());
res.errorMessages = Collections.synchronizedSet(new HashSet<>());

RpcResponseCallback callback = new RpcResponseCallback() {
@Override
Expand Down Expand Up @@ -208,8 +208,8 @@ private RpcResult sendRpcWithStream(String... streams) throws Exception {
TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());
final Semaphore sem = new Semaphore(0);
RpcResult res = new RpcResult();
res.successMessages = Collections.synchronizedSet(new HashSet<String>());
res.errorMessages = Collections.synchronizedSet(new HashSet<String>());
res.successMessages = Collections.synchronizedSet(new HashSet<>());
res.errorMessages = Collections.synchronizedSet(new HashSet<>());

for (String stream : streams) {
int idx = stream.lastIndexOf('/');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void testClientReuse(int maxConnections, boolean concurrent)
try (TransportContext context = new TransportContext(conf, rpcHandler)) {
TransportClientFactory factory = context.createClientFactory();
Set<TransportClient> clients = Collections.synchronizedSet(
new HashSet<TransportClient>());
new HashSet<>());

AtomicInteger failed = new AtomicInteger();
Thread[] attempts = new Thread[maxConnections * 10];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ private FetchResult fetchBlocks(
TransportConf clientConf,
int port) throws Exception {
final FetchResult res = new FetchResult();
res.successBlocks = Collections.synchronizedSet(new HashSet<String>());
res.failedBlocks = Collections.synchronizedSet(new HashSet<String>());
res.buffers = Collections.synchronizedList(new LinkedList<ManagedBuffer>());
res.successBlocks = Collections.synchronizedSet(new HashSet<>());
res.failedBlocks = Collections.synchronizedSet(new HashSet<>());
res.buffers = Collections.synchronizedList(new LinkedList<>());

final Semaphore requestsRemaining = new Semaphore(0);

Expand Down
Loading

0 comments on commit ab192f6

Please sign in to comment.