Skip to content

Commit 1e9fac8

Browse files
authored
Merge pull request #2 from apache/master
Merge master
2 parents 8c0e961 + 7a2ea58 commit 1e9fac8

File tree

316 files changed

+8281
-3744
lines changed

Some content is hidden

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

316 files changed

+8281
-3744
lines changed

.github/workflows/master.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,46 @@ jobs:
1515
strategy:
1616
matrix:
1717
java: [ '1.8', '11' ]
18-
name: Build Spark with JDK ${{ matrix.java }}
18+
hadoop: [ 'hadoop-2.7', 'hadoop-3.2' ]
19+
exclude:
20+
- java: '11'
21+
hadoop: 'hadoop-2.7'
22+
name: Build Spark with JDK ${{ matrix.java }} and ${{ matrix.hadoop }}
1923

2024
steps:
2125
- uses: actions/checkout@master
2226
- name: Set up JDK ${{ matrix.java }}
2327
uses: actions/setup-java@v1
2428
with:
25-
version: ${{ matrix.java }}
29+
java-version: ${{ matrix.java }}
2630
- name: Build with Maven
2731
run: |
28-
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
32+
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
2933
export MAVEN_CLI_OPTS="--no-transfer-progress"
30-
./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -Phadoop-3.2 -Phadoop-cloud -Djava.version=${{ matrix.java }} package
34+
./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -P${{ matrix.hadoop }} -Phadoop-cloud -Djava.version=${{ matrix.java }} package
35+
36+
37+
lint:
38+
runs-on: ubuntu-latest
39+
name: Linters
40+
steps:
41+
- uses: actions/checkout@master
42+
- uses: actions/setup-java@v1
43+
with:
44+
java-version: '11'
45+
- uses: actions/setup-python@v1
46+
with:
47+
python-version: '3.x'
48+
architecture: 'x64'
49+
- name: Scala
50+
run: ./dev/lint-scala
51+
- name: Java
52+
run: ./dev/lint-java
53+
- name: Python
54+
run: |
55+
pip install flake8 sphinx numpy
56+
./dev/lint-python
57+
- name: License
58+
run: ./dev/check-license
59+
- name: Dependencies
60+
run: ./dev/test-dependencies.sh

LICENSE-binary

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ org.codehaus.janino:commons-compiler
396396
org.codehaus.janino:janino
397397
jline:jline
398398
org.jodd:jodd-core
399+
com.github.wendykierp:JTransforms
400+
pl.edu.icm:JLargeArrays
399401

400402

401403
BSD 3-Clause
@@ -433,8 +435,12 @@ is distributed under the 3-Clause BSD license.
433435
MIT License
434436
-----------
435437

436-
org.spire-math:spire-macros_2.12
437-
org.spire-math:spire_2.12
438+
org.typelevel:spire_2.12
439+
org.typelevel:spire-macros_2.12
440+
org.typelevel:spire-platform_2.12
441+
org.typelevel:spire-util_2.12
442+
org.typelevel:algebra_2.12:jar
443+
org.typelevel:cats-kernel_2.12
438444
org.typelevel:machinist_2.12
439445
net.razorvine:pyrolite
440446
org.slf4j:jcl-over-slf4j
@@ -496,11 +502,6 @@ Eclipse Public License (EPL) 2.0
496502
jakarta.annotation:jakarta-annotation-api https://projects.eclipse.org/projects/ee4j.ca
497503
jakarta.ws.rs:jakarta.ws.rs-api https://github.com/eclipse-ee4j/jaxrs-api
498504

499-
Mozilla Public License (MPL) 1.1
500-
--------------------------------
501-
502-
com.github.rwl:jtransforms https://sourceforge.net/projects/jtransforms/
503-
504505

505506
Python Software Foundation License
506507
----------------------------------

R/pkg/R/mllib_recommendation.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ setClass("ALSModel", representation(jobj = "jobj"))
8282
#' statsS <- summary(modelS)
8383
#' }
8484
#' @note spark.als since 2.1.0
85+
#' @note the input rating dataframe to the ALS implementation should be deterministic.
86+
#' Nondeterministic data can cause failure during fitting ALS model. For example,
87+
#' an order-sensitive operation like sampling after a repartition makes dataframe output
88+
#' nondeterministic, like \code{sample(repartition(df, 2L), FALSE, 0.5, 1618L)}.
89+
#' Checkpointing sampled dataframe or adding a sort before sampling can help make the
90+
#' dataframe deterministic.
8591
setMethod("spark.als", signature(data = "SparkDataFrame"),
8692
function(data, ratingCol = "rating", userCol = "user", itemCol = "item",
8793
rank = 10, regParam = 0.1, maxIter = 10, nonnegative = FALSE,

build/mvn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2222
# Preserve the calling directory
2323
_CALLING_DIR="$(pwd)"
2424
# Options used during compilation
25-
_COMPILE_JVM_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m"
25+
_COMPILE_JVM_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g"
2626

2727
# Installs any application tarball given a URL, the expected tarball name,
2828
# and, optionally, a checkable binary path to determine if the binary has

common/kvstore/src/main/java/org/apache/spark/util/kvstore/InMemoryStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private static <T> Predicate<? super T> getPredicate(
252252

253253
return (value) -> set.contains(indexValueForEntity(getter, value));
254254
} else {
255-
HashSet<Comparable> set = new HashSet<>(values.size());
255+
HashSet<Comparable<?>> set = new HashSet<>(values.size());
256256
for (Object key : values) {
257257
set.add(asKey(key));
258258
}

common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ interface Accessor {
124124

125125
Object get(Object instance) throws ReflectiveOperationException;
126126

127-
Class getType();
127+
Class<?> getType();
128128
}
129129

130130
private class FieldAccessor implements Accessor {
@@ -141,7 +141,7 @@ public Object get(Object instance) throws ReflectiveOperationException {
141141
}
142142

143143
@Override
144-
public Class getType() {
144+
public Class<?> getType() {
145145
return field.getType();
146146
}
147147
}
@@ -160,7 +160,7 @@ public Object get(Object instance) throws ReflectiveOperationException {
160160
}
161161

162162
@Override
163-
public Class getType() {
163+
public Class<?> getType() {
164164
return method.getReturnType();
165165
}
166166
}

common/network-common/pom.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
</properties>
3636

3737
<dependencies>
38+
<!-- SPARK-28932 This is required in JDK11 -->
39+
<dependency>
40+
<groupId>org.scala-lang</groupId>
41+
<artifactId>scala-library</artifactId>
42+
</dependency>
43+
3844
<!-- Core dependencies -->
3945
<dependency>
4046
<groupId>io.netty</groupId>
@@ -87,13 +93,6 @@
8793
</dependency>
8894

8995
<!-- Test dependencies -->
90-
<!-- SPARK-28932 This is required in JDK11 -->
91-
<dependency>
92-
<groupId>org.scala-lang</groupId>
93-
<artifactId>scala-library</artifactId>
94-
<version>${scala.version}</version>
95-
<scope>test</scope>
96-
</dependency>
9796
<dependency>
9897
<groupId>log4j</groupId>
9998
<artifactId>log4j</artifactId>

common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,8 @@ public void close() {
293293
}
294294
connectionPool.clear();
295295

296-
if (workerGroup != null) {
296+
if (workerGroup != null && !workerGroup.isShuttingDown()) {
297297
workerGroup.shutdownGracefully();
298-
workerGroup = null;
299298
}
300299
}
301300
}

common/network-common/src/test/java/org/apache/spark/network/TransportClientFactorySuite.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,11 @@ public Iterable<Map.Entry<String, String>> getAll() {
217217
assertFalse(c1.isActive());
218218
}
219219
}
220+
221+
@Test(expected = IOException.class)
222+
public void closeFactoryBeforeCreateClient() throws IOException, InterruptedException {
223+
TransportClientFactory factory = context.createClientFactory();
224+
factory.close();
225+
factory.createClient(TestUtils.getLocalHost(), server1.getPort());
226+
}
220227
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.spark.tags;
19+
20+
import org.scalatest.TagAnnotation;
21+
22+
import java.lang.annotation.ElementType;
23+
import java.lang.annotation.Retention;
24+
import java.lang.annotation.RetentionPolicy;
25+
import java.lang.annotation.Target;
26+
27+
@TagAnnotation
28+
@Retention(RetentionPolicy.RUNTIME)
29+
@Target({ElementType.METHOD, ElementType.TYPE})
30+
public @interface ExtendedSQLTest { }

0 commit comments

Comments
 (0)