Skip to content

Commit b403f01

Browse files
committed
Merge branch 'apache:trunk' into HADOOP-17715
2 parents 0dfa5f3 + 6bb0892 commit b403f01

File tree

965 files changed

+25167
-42008
lines changed

Some content is hidden

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

965 files changed

+25167
-42008
lines changed

BUILDING.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@ Known issues:
5151
and run your IDE and Docker etc inside that VM.
5252

5353
----------------------------------------------------------------------------------
54-
Installing required packages for clean install of Ubuntu 14.04 LTS Desktop:
54+
Installing required packages for clean install of Ubuntu 18.04 LTS Desktop.
55+
(For Ubuntu 20.04, gcc/g++ and cmake bundled with Ubuntu can be used.
56+
Refer to dev-support/docker/Dockerfile):
5557

56-
* Oracle JDK 1.8 (preferred)
57-
$ sudo apt-get purge openjdk*
58-
$ sudo apt-get install software-properties-common
59-
$ sudo add-apt-repository ppa:webupd8team/java
58+
* Open JDK 1.8
6059
$ sudo apt-get update
61-
$ sudo apt-get install oracle-java8-installer
60+
$ sudo apt-get -y install java-8-openjdk
6261
* Maven
6362
$ sudo apt-get -y install maven
6463
* Native libraries
@@ -86,12 +85,13 @@ Installing required packages for clean install of Ubuntu 14.04 LTS Desktop:
8685
$ curl -L https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download > boost_1_72_0.tar.bz2
8786
$ tar --bzip2 -xf boost_1_72_0.tar.bz2 && cd boost_1_72_0
8887
$ ./bootstrap.sh --prefix=/usr/
89-
$ ./b2 --without-python install
88+
$ ./b2 --without-python
89+
$ sudo ./b2 --without-python install
9090

9191
Optional packages:
9292

9393
* Snappy compression (only used for hadoop-mapreduce-client-nativetask)
94-
$ sudo apt-get install snappy libsnappy-dev
94+
$ sudo apt-get install libsnappy-dev
9595
* Intel ISA-L library for erasure coding
9696
Please refer to https://01.org/intel%C2%AE-storage-acceleration-library-open-source-version
9797
(OR https://github.com/01org/isa-l)
@@ -139,7 +139,7 @@ Maven build goals:
139139
* Compile : mvn compile [-Pnative]
140140
* Run tests : mvn test [-Pnative] [-Pshelltest]
141141
* Create JAR : mvn package
142-
* Run findbugs : mvn compile findbugs:findbugs
142+
* Run spotbugs : mvn compile spotbugs:spotbugs
143143
* Run checkstyle : mvn compile checkstyle:checkstyle
144144
* Install JAR in M2 cache : mvn install
145145
* Deploy JAR to Maven repo : mvn deploy

LICENSE-binary

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.9.9
225225
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.9
226226
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.9
227227
com.fasterxml.uuid:java-uuid-generator:3.1.4
228-
com.fasterxml.woodstox:woodstox-core:5.0.3
228+
com.fasterxml.woodstox:woodstox-core:5.3.0
229229
com.github.davidmoten:rxjava-extras:0.8.0.17
230230
com.github.stephenc.jcip:jcip-annotations:1.0-1
231231
com.google:guice:4.0
@@ -240,7 +240,7 @@ com.google.guava:guava:20.0
240240
com.google.guava:guava:27.0-jre
241241
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
242242
com.microsoft.azure:azure-storage:7.0.0
243-
com.nimbusds:nimbus-jose-jwt:4.41.1
243+
com.nimbusds:nimbus-jose-jwt:9.8.1
244244
com.squareup.okhttp:okhttp:2.7.5
245245
com.squareup.okio:okio:1.6.0
246246
com.zaxxer:HikariCP-java7:2.4.12
@@ -249,7 +249,7 @@ commons-cli:commons-cli:1.2
249249
commons-codec:commons-codec:1.11
250250
commons-collections:commons-collections:3.2.2
251251
commons-daemon:commons-daemon:1.0.13
252-
commons-io:commons-io:2.5
252+
commons-io:commons-io:2.8.0
253253
commons-lang:commons-lang:2.6
254254
commons-logging:commons-logging:1.1.3
255255
commons-net:commons-net:3.6
@@ -283,7 +283,7 @@ javax.inject:javax.inject:1
283283
log4j:log4j:1.2.17
284284
net.java.dev.jna:jna:5.2.0
285285
net.minidev:accessors-smart:1.2
286-
net.minidev:json-smart:2.3
286+
net.minidev:json-smart:2.4.2
287287
org.apache.avro:avro:1.7.7
288288
org.apache.commons:commons-collections4:4.2
289289
org.apache.commons:commons-compress:1.19
@@ -366,7 +366,7 @@ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanage
366366

367367
com.github.luben:zstd-jni:1.4.3-1
368368
dnsjava:dnsjava:2.1.7
369-
org.codehaus.woodstox:stax2-api:3.1.4
369+
org.codehaus.woodstox:stax2-api:4.2.1
370370

371371

372372
BSD 3-Clause
@@ -468,8 +468,8 @@ com.microsoft.azure:azure-cosmosdb-gateway:2.4.5
468468
com.microsoft.azure:azure-data-lake-store-sdk:2.3.3
469469
com.microsoft.azure:azure-keyvault-core:1.0.0
470470
com.microsoft.sqlserver:mssql-jdbc:6.2.1.jre7
471-
org.bouncycastle:bcpkix-jdk15on:1.60
472-
org.bouncycastle:bcprov-jdk15on:1.60
471+
org.bouncycastle:bcpkix-jdk15on:1.68
472+
org.bouncycastle:bcprov-jdk15on:1.68
473473
org.checkerframework:checker-qual:2.5.2
474474
org.codehaus.mojo:animal-sniffer-annotations:1.17
475475
org.jruby.jcodings:jcodings:1.0.13

dev-support/Jenkinsfile

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pipeline {
3535
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile"
3636
YETUS='yetus'
3737
// Branch or tag name. Yetus release tags are 'rel/X.Y.Z'
38-
YETUS_VERSION='6ab19e71eaf3234863424c6f684b34c1d3dcc0ce'
38+
YETUS_VERSION='f9ba0170a5787a5f4662d3769804fef0226a182f'
3939
}
4040

4141
parameters {
@@ -120,11 +120,11 @@ pipeline {
120120
YETUS_ARGS+=("--proclimit=5500")
121121
YETUS_ARGS+=("--dockermemlimit=22g")
122122
123-
# -1 findbugs issues that show up prior to the patch being applied
124-
YETUS_ARGS+=("--findbugs-strict-precheck")
123+
# -1 spotbugs issues that show up prior to the patch being applied
124+
YETUS_ARGS+=("--spotbugs-strict-precheck")
125125
126126
# rsync these files back into the archive dir
127-
YETUS_ARGS+=("--archive-list=checkstyle-errors.xml,findbugsXml.xml")
127+
YETUS_ARGS+=("--archive-list=checkstyle-errors.xml,spotbugsXml.xml")
128128
129129
# URL for user-side presentation in reports and such to our artifacts
130130
# (needs to match the archive bits below)
@@ -133,9 +133,6 @@ pipeline {
133133
# plugins to enable
134134
YETUS_ARGS+=("--plugins=all")
135135
136-
# use Hadoop's bundled shelldocs
137-
YETUS_ARGS+=("--shelldocs=${WORKSPACE}/${SOURCEDIR}/dev-support/bin/shelldocs")
138-
139136
# don't let these tests cause -1s because we aren't really paying that
140137
# much attention to them
141138
YETUS_ARGS+=("--tests-filter=checkstyle")
@@ -152,9 +149,6 @@ pipeline {
152149
# help keep the ASF boxes clean
153150
YETUS_ARGS+=("--sentinel")
154151
155-
# use emoji vote so it is easier to find the broken line
156-
YETUS_ARGS+=("--github-use-emoji-vote")
157-
158152
# test with Java 8 and 11
159153
YETUS_ARGS+=("--java-home=/usr/lib/jvm/java-8-openjdk-amd64")
160154
YETUS_ARGS+=("--multijdkdirs=/usr/lib/jvm/java-11-openjdk-amd64")
@@ -163,6 +157,10 @@ pipeline {
163157
# custom javadoc goals
164158
YETUS_ARGS+=("--mvn-javadoc-goals=process-sources,javadoc:javadoc-no-fork")
165159
160+
# write Yetus report as GitHub comment (YETUS-1102)
161+
YETUS_ARGS+=("--github-write-comment")
162+
YETUS_ARGS+=("--github-use-emoji-vote")
163+
166164
"${TESTPATCHBIN}" "${YETUS_ARGS[@]}"
167165
'''
168166
}
@@ -174,6 +172,19 @@ pipeline {
174172
post {
175173
always {
176174
script {
175+
// Publish status if it was missed (YETUS-1059)
176+
withCredentials(
177+
[usernamePassword(credentialsId: '683f5dcf-5552-4b28-9fb1-6a6b77cf53dd',
178+
passwordVariable: 'GITHUB_TOKEN',
179+
usernameVariable: 'GITHUB_USER')]) {
180+
sh '''#!/usr/bin/env bash
181+
YETUS_ARGS+=("--github-token=${GITHUB_TOKEN}")
182+
YETUS_ARGS+=("--patch-dir=${WORKSPACE}/${PATCHDIR}")
183+
TESTPATCHBIN="${WORKSPACE}/${YETUS}/precommit/src/main/shell/github-status-recovery.sh"
184+
/usr/bin/env bash "${TESTPATCHBIN}" "${YETUS_ARGS[@]}" ${EXTRA_ARGS} || true
185+
'''
186+
}
187+
177188
// Yetus output
178189
archiveArtifacts "${env.PATCHDIR}/**"
179190
// Publish the HTML report so that it can be looked at

dev-support/bin/checkcompatibility.py

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Licensed to the Apache Software Foundation (ASF) under one
44
# or more contributor license agreements. See the NOTICE file
@@ -30,33 +30,16 @@
3030
import shutil
3131
import subprocess
3232
import sys
33-
import urllib2
34-
try:
35-
import argparse
36-
except ImportError:
37-
sys.stderr.write("Please install argparse, e.g. via `pip install argparse`.")
38-
sys.exit(2)
33+
import urllib.request
34+
import argparse
3935

4036
# Various relative paths
4137
REPO_DIR = os.getcwd()
4238

4339
def check_output(*popenargs, **kwargs):
44-
r"""Run command with arguments and return its output as a byte string.
45-
Backported from Python 2.7 as it's implemented as pure python on stdlib.
46-
>>> check_output(['/usr/bin/python', '--version'])
47-
Python 2.6.2
48-
"""
49-
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
50-
output, _ = process.communicate()
51-
retcode = process.poll()
52-
if retcode:
53-
cmd = kwargs.get("args")
54-
if cmd is None:
55-
cmd = popenargs[0]
56-
error = subprocess.CalledProcessError(retcode, cmd)
57-
error.output = output
58-
raise error
59-
return output
40+
""" Run command with arguments and return its output as a string. """
41+
return subprocess.check_output(*popenargs, **kwargs, encoding='utf-8')
42+
6043

6144
def get_repo_dir():
6245
""" Return the path to the top of the repo. """
@@ -139,7 +122,7 @@ def checkout_java_acc(force):
139122
url = "https://github.com/lvc/japi-compliance-checker/archive/1.8.tar.gz"
140123
scratch_dir = get_scratch_dir()
141124
path = os.path.join(scratch_dir, os.path.basename(url))
142-
jacc = urllib2.urlopen(url)
125+
jacc = urllib.request.urlopen(url)
143126
with open(path, 'wb') as w:
144127
w.write(jacc.read())
145128

@@ -192,9 +175,9 @@ def run_java_acc(src_name, src_jars, dst_name, dst_jars, annotations):
192175

193176
if annotations is not None:
194177
annotations_path = os.path.join(get_scratch_dir(), "annotations.txt")
195-
with file(annotations_path, "w") as f:
178+
with open(annotations_path, "w") as f:
196179
for ann in annotations:
197-
print >>f, ann
180+
print(ann, file=f)
198181
args += ["-annotations-list", annotations_path]
199182

200183
subprocess.check_call(args)
@@ -264,8 +247,8 @@ def main():
264247
parser.add_argument("--skip-build",
265248
action="store_true",
266249
help="Skip building the projects.")
267-
parser.add_argument("src_rev", nargs=1, help="Source revision.")
268-
parser.add_argument("dst_rev", nargs="?", default="HEAD",
250+
parser.add_argument("src_rev", nargs=1, type=str, help="Source revision.")
251+
parser.add_argument("dst_rev", nargs="?", type=str, default="HEAD",
269252
help="Destination revision. " +
270253
"If not specified, will use HEAD.")
271254

dev-support/bin/hadoop.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ function personality_modules
355355
fi
356356
;;
357357
unit)
358+
extra="-Dsurefire.rerunFailingTestsCount=2"
358359
if [[ "${BUILDMODE}" = full ]]; then
359360
ordering=mvnsrc
360361
elif [[ "${CHANGED_MODULES[*]}" =~ \. ]]; then
@@ -363,7 +364,7 @@ function personality_modules
363364

364365
if [[ ${TEST_PARALLEL} = "true" ]] ; then
365366
if hadoop_test_parallel; then
366-
extra="-Pparallel-tests"
367+
extra="${extra} -Pparallel-tests"
367368
if [[ -n ${TEST_THREADS:-} ]]; then
368369
extra="${extra} -DtestsThreadCount=${TEST_THREADS}"
369370
fi
@@ -482,7 +483,7 @@ function personality_file_tests
482483
fi
483484

484485
if [[ ${filename} =~ \.java$ ]]; then
485-
add_test findbugs
486+
add_test spotbugs
486487
fi
487488
}
488489

@@ -550,7 +551,7 @@ function shadedclient_rebuild
550551
echo_and_redirect "${logfile}" \
551552
"${MAVEN}" "${MAVEN_ARGS[@]}" verify -fae --batch-mode -am \
552553
"${modules[@]}" \
553-
-Dtest=NoUnitTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true
554+
-Dtest=NoUnitTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true
554555

555556
count=$("${GREP}" -c '\[ERROR\]' "${logfile}")
556557
if [[ ${count} -gt 0 ]]; then

dev-support/bin/test-patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# limitations under the License.
1616

1717
BINDIR=$(cd -P -- "$(dirname -- "${BASH_SOURCE-0}")" >/dev/null && pwd -P)
18-
exec "${BINDIR}/yetus-wrapper" test-patch --project=hadoop --skip-dir=dev-support "$@"
18+
exec "${BINDIR}/yetus-wrapper" test-patch --project=hadoop --skip-dirs=dev-support "$@"

dev-support/bin/yetus-wrapper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ WANTED="$1"
7777
shift
7878
ARGV=("$@")
7979

80-
HADOOP_YETUS_VERSION=${HADOOP_YETUS_VERSION:-0.10.0}
80+
HADOOP_YETUS_VERSION=${HADOOP_YETUS_VERSION:-0.13.0}
8181
BIN=$(yetus_abs "${BASH_SOURCE-$0}")
8282
BINDIR=$(dirname "${BIN}")
8383

0 commit comments

Comments
 (0)