This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 9e8b59caa131ec3d5f6443665801aa0d3030e093 Author: Christopher Tubbs <[email protected]> AuthorDate: Wed Jun 28 15:21:50 2023 -0400 Update parent POM to 30 and remove contrib dir (#3550) Remove `contrib/` directory: * Force use of JDK 17 for building aggregate javadocs for website, to avoid needing to patch buggy JDK 11 javadocs before publishing * Relocate contrib/ci scripts to more Maven-like location, src/build/ci * Remove redundant copy of contrib/accumulo-logo.png; use identical copy from monitor module for the README.md * Remove unmaintained contrib/scripts/check-tservers.py (has not received any substantive updates since initial publication, and does not work with current versions of Python, and is not documented (if updated, this can be restored to a blog on the website, or added elsewhere as a maintenance tool, but there are probably better ways of checking a cluster's health using non-python command-line utilities) * Relocate license template and formatter config file to src/build, and fix license-header.txt references using build-helper's rootlocation rather than session.executionRootDirectory Bump ASF parent POM to version 30 and related POM improvements: * Remove useless comment about `<url>`, regarding plugin not built in this repo * Ensure `maven.site.skip` is true, since we don't use that to build our website, and don't want that plugin running at all, and remove the outdated and unused src/site/site.xml site descriptor * Stop overriding plugin versions that are the same as in the parent POM (or in the case of maven-site-plugin, doesn't matter because we don't use that plugin) * Remove extraneous maven-clean-plugin configuration that isn't needed since those files don't appear in our source tree and are cleaned up already from the target directory * Bump minimum Maven version to build, because apilyzer requires 3.6 * Adopt version property naming convention ASF parent POM Other fixes: * Bump some build plugins * Bump errorprone and fix newly detected illogical check if int is greater than `Integer.MAX_VALUE` * Bump some dependency versions --- .github/ISSUE_TEMPLATE/post_vote_checklist.md | 3 +- .github/workflows/maven-full-its.yaml | 2 +- .github/workflows/maven.yaml | 6 +- .github/workflows/scripts.yaml | 12 +- README.md | 2 +- contrib/accumulo-logo.png | Bin 11427 -> 0 bytes contrib/javadoc11.patch | 91 ---------- contrib/scripts/check-tservers.py | 202 --------------------- core/pom.xml | 2 +- pom.xml | 175 +++++++----------- .../accumulo/server/fs/VolumeManagerImpl.java | 17 +- server/monitor/pom.xml | 2 +- server/tserver/pom.xml | 2 +- {contrib => src/build}/ci/find-unapproved-chars.sh | 0 {contrib => src/build}/ci/find-unapproved-junit.sh | 0 {contrib => src/build}/ci/install-shfmt.sh | 0 {contrib => src/build}/ci/install-thrift.sh | 2 +- {contrib => src/build}/ci/it-matrix.sh | 0 {contrib => src/build}/ci/run-shellcheck.sh | 0 {contrib => src/build}/ci/run-shfmt.sh | 0 {contrib => src/build}/ci/run-thrift.sh | 0 .../build/eclipse-codestyle.xml | 0 {contrib => src/build}/license-header.txt | 0 src/site/site.xml | 44 ----- 24 files changed, 92 insertions(+), 470 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/post_vote_checklist.md b/.github/ISSUE_TEMPLATE/post_vote_checklist.md index 9b504afb04..59bfc3efe2 100644 --- a/.github/ISSUE_TEMPLATE/post_vote_checklist.md +++ b/.github/ISSUE_TEMPLATE/post_vote_checklist.md @@ -32,8 +32,7 @@ assignees: '' - [ ] Downloads page - [ ] If LTM release, update previous LTM release entry on downloads page and release notes with an EOL date 1 year from the current release date - [ ] DOAP file - - [ ] Add manual/examples/javadoc (build javadoc from tag with `mvn clean package -DskipTests javadoc:aggregate -Paggregate-javadocs`) - - [ ] If javadoc is built with Java 11, [patch it](https://github.com/apache/accumulo/blob/main/contrib/javadoc11.patch) + - [ ] Add manual/examples/javadoc (build javadoc from tag with `mvn clean package -DskipTests javadoc:aggregate -Paggregate-javadocs` using at least JDK 17) - [ ] Jekyll config - [ ] Grep for, and update any links to previous version to now point to the new version - [ ] Update any older release notes front-matter to indicate they are either `archived: true` or `archived_critical: true` diff --git a/.github/workflows/maven-full-its.yaml b/.github/workflows/maven-full-its.yaml index a70eea19a7..ec97512e20 100644 --- a/.github/workflows/maven-full-its.yaml +++ b/.github/workflows/maven-full-its.yaml @@ -80,7 +80,7 @@ jobs: ref: ${{ github.event.inputs.buildRef }} - id: set-matrix name: Create the IT build matrix - run: contrib/ci/it-matrix.sh ${{ github.event.inputs.numITsPerTask }} + run: src/build/ci/it-matrix.sh ${{ github.event.inputs.numITsPerTask }} # targeted builds that tests groups of ITs mvn: needs: creatematrix diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 54368e245a..3c56ae9f64 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -54,9 +54,9 @@ jobs: - name: Show the first log message run: git log -n1 - name: Check for unapproved characters - run: contrib/ci/find-unapproved-chars.sh + run: src/build/ci/find-unapproved-chars.sh - name: Check for unapproved JUnit API usage - run: contrib/ci/find-unapproved-junit.sh + run: src/build/ci/find-unapproved-junit.sh - name: Build with Maven (Fast Build) timeout-minutes: 20 run: mvn -B -V -e -ntp "-Dstyle.color=always" clean package dependency:resolve -DskipTests -DskipFormat -DverifyFormat @@ -70,7 +70,7 @@ jobs: profile: - {name: 'unit-tests', javaver: 11, args: 'verify -PskipQA -DskipTests=false'} - {name: 'qa-checks', javaver: 11, args: 'verify javadoc:jar -Psec-bugs -DskipTests -Dspotbugs.timeout=3600000'} - - {name: 'compat', javaver: 11, args: 'package -DskipTests -Dhadoop.version=3.0.3 -Dzookeeper.version=3.5.10'} + - {name: 'compat', javaver: 11, args: 'package -DskipTests -Dversion.hadoop=3.0.3 -Dversion.zookeeper=3.5.10'} - {name: 'errorprone', javaver: 11, args: 'verify -Perrorprone,skipQA'} - {name: 'jdk17', javaver: 17, args: 'verify -DskipITs'} fail-fast: false diff --git a/.github/workflows/scripts.yaml b/.github/workflows/scripts.yaml index 2189d9c868..ff2deaf96f 100644 --- a/.github/workflows/scripts.yaml +++ b/.github/workflows/scripts.yaml @@ -42,9 +42,9 @@ jobs: - name: Show the first log message run: git log -n1 - name: Install shfmt - run: contrib/ci/install-shfmt.sh + run: src/build/ci/install-shfmt.sh - name: Checking formatting of all scripts - run: contrib/ci/run-shfmt.sh + run: src/build/ci/run-shfmt.sh shellcheck: name: ShellCheck @@ -55,9 +55,9 @@ jobs: - name: Show the first log message run: git log -n1 - name: Install shfmt - run: contrib/ci/install-shfmt.sh + run: src/build/ci/install-shfmt.sh - name: Running shellcheck on all scripts - run: contrib/ci/run-shellcheck.sh + run: src/build/ci/run-shellcheck.sh thrift: name: Thrift @@ -72,6 +72,6 @@ jobs: - name: Install xmllint run: sudo apt-get install libxml2-utils - name: Install thrift - run: contrib/ci/install-thrift.sh + run: src/build/ci/install-thrift.sh - name: Running thrift to check for changes - run: contrib/ci/run-thrift.sh + run: src/build/ci/run-thrift.sh diff --git a/README.md b/README.md index 0de1f9366c..fd30b18977 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ more details on bouncycastle's cryptography features. [api]: https://accumulo.apache.org/api [accumulo]: https://accumulo.apache.org -[logo]: contrib/accumulo-logo.png +[logo]: server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/images/accumulo-logo.png [quick start]: https://accumulo.apache.org/docs/2.x/getting-started/quickstart [test]: TESTING.md [Apache Hadoop]: https://hadoop.apache.org diff --git a/contrib/accumulo-logo.png b/contrib/accumulo-logo.png deleted file mode 100644 index 5b0f6b4345..0000000000 Binary files a/contrib/accumulo-logo.png and /dev/null differ diff --git a/contrib/javadoc11.patch b/contrib/javadoc11.patch deleted file mode 100644 index 028716b842..0000000000 --- a/contrib/javadoc11.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- a/target/site/apidocs/script.js -+++ b/target/site/apidocs/script.js -@@ -40,41 +40,51 @@ function loadScripts(doc, tag) { - $.get(pathtoroot + "module-search-index.zip") - .done(function() { - JSZipUtils.getBinaryContent(pathtoroot + "module-search-index.zip", function(e, data) { -- var zip = new JSZip(data); -- zip.load(data); -- moduleSearchIndex = JSON.parse(zip.file("module-search-index.json").asText()); -+ JSZip.loadAsync(data).then(function(zip){ -+ zip.file("module-search-index.json").async("text").then(function(content){ -+ moduleSearchIndex = JSON.parse(content); -+ }); -+ }); - }); - }); - $.get(pathtoroot + "package-search-index.zip") - .done(function() { - JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) { -- var zip = new JSZip(data); -- zip.load(data); -- packageSearchIndex = JSON.parse(zip.file("package-search-index.json").asText()); -+ JSZip.loadAsync(data).then(function(zip){ -+ zip.file("package-search-index.json").async("text").then(function(content){ -+ packageSearchIndex = JSON.parse(content); -+ }); -+ }); - }); - }); - $.get(pathtoroot + "type-search-index.zip") - .done(function() { - JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) { -- var zip = new JSZip(data); -- zip.load(data); -- typeSearchIndex = JSON.parse(zip.file("type-search-index.json").asText()); -+ JSZip.loadAsync(data).then(function(zip){ -+ zip.file("type-search-index.json").async("text").then(function(content){ -+ typeSearchIndex = JSON.parse(content); -+ }); -+ }); - }); - }); - $.get(pathtoroot + "member-search-index.zip") - .done(function() { - JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) { -- var zip = new JSZip(data); -- zip.load(data); -- memberSearchIndex = JSON.parse(zip.file("member-search-index.json").asText()); -+ JSZip.loadAsync(data).then(function(zip){ -+ zip.file("member-search-index.json").async("text").then(function(content){ -+ memberSearchIndex = JSON.parse(content); -+ }); -+ }); - }); - }); - $.get(pathtoroot + "tag-search-index.zip") - .done(function() { - JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) { -- var zip = new JSZip(data); -- zip.load(data); -- tagSearchIndex = JSON.parse(zip.file("tag-search-index.json").asText()); -+ JSZip.loadAsync(data).then(function(zip){ -+ zip.file("tag-search-index.json").async("text").then(function(content){ -+ tagSearchIndex = JSON.parse(content); -+ }); -+ }); - }); - }); - if (!moduleSearchIndex) { ---- a/target/site/apidocs/search.js -+++ b/target/site/apidocs/search.js -@@ -50,7 +50,7 @@ function getURLPrefix(ui) { - return ui.item.m + slash; - } else if ((ui.item.category === catTypes && ui.item.p) || ui.item.category === catMembers) { - $.each(packageSearchIndex, function(index, item) { -- if (ui.item.p == item.l) { -+ if (item.m && ui.item.p == item.l) { - urlPrefix = item.m + slash; - } - }); ---- a/target/site/apidocs/stylesheet.css -+++ b/target/site/apidocs/stylesheet.css -@@ -2,8 +2,6 @@ - * Javadoc style sheet - */ - --@import url('resources/fonts/dejavu.css'); -- - /* - * Styles for individual HTML elements. - * diff --git a/contrib/scripts/check-tservers.py b/contrib/scripts/check-tservers.py deleted file mode 100755 index be1b9f650c..0000000000 --- a/contrib/scripts/check-tservers.py +++ /dev/null @@ -1,202 +0,0 @@ -#! /usr/bin/env python -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This script will check the configuration and uniformity of all the nodes in a cluster. -# Checks -# each node is reachable via ssh -# login identity is the same -# the physical memory is the same -# the mounts are the same on each machine -# a set of writable locations (typically different disks) are in fact writable -# -# In order to check for writable partitions, you must configure the WRITABLE variable below. -# - -import subprocess -import time -import select -import os -import sys -import fcntl -import signal -if not sys.platform.startswith('linux'): - sys.stderr.write('This script only works on linux, sorry.\n') - sys.exit(1) - -TIMEOUT = 5 -WRITABLE = [] -#WRITABLE = ['/srv/hdfs1', '/srv/hdfs2', '/srv/hdfs3'] - -def ssh(tserver, *args): - 'execute a command on a remote tserver and return the Popen handle' - handle = subprocess.Popen( ('ssh', '-o', 'StrictHostKeyChecking=no', '-q', '-A', '-n', tserver) + args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - handle.tserver = tserver - handle.finished = False - handle.out = '' - return handle - -def wait(handles, seconds): - 'wait for lots of handles simultaneously, and kill anything that doesn\'t return in seconds time\n' - 'Note that stdout will be stored on the handle as the "out" field and "finished" will be set to True' - handles = handles[:] - stop = time.time() + seconds - for h in handles: - fcntl.fcntl(h.stdout, fcntl.F_SETFL, os.O_NONBLOCK) - while handles and time.time() < stop: - wait = min(0, stop - time.time()) - handleMap = dict( [(h.stdout, h) for h in handles] ) - rd, wr, err = select.select(handleMap.keys(), [], [], wait) - for r in rd: - handle = handleMap[r] - while 1: - more = handle.stdout.read(1024) - if more == '': - handles.remove(handle) - handle.poll() - handle.wait() - handle.finished = True - handle.out += more - if len(more) < 1024: - break - for handle in handles: - os.kill(handle.pid, signal.SIGKILL) - handle.poll() - -def runAll(tservers, *cmd): - 'Run the given command on all the tservers, returns Popen handles' - handles = [] - for tserver in tservers: - handles.append(ssh(tserver, *cmd)) - wait(handles, TIMEOUT) - return handles - -def checkIdentity(tservers): - 'Ensure the login identity is consistent across the tservers' - handles = runAll(tservers, 'id', '-u', '-n') - bad = set() - myIdentity = os.popen('id -u -n').read().strip() - for h in handles: - if not h.finished or h.returncode != 0: - print '#', 'cannot look at identity on', h.tserver - bad.add(h.tserver) - else: - identity = h.out.strip() - if identity != myIdentity: - print '#', h.tserver, 'inconsistent identity', identity - bad.add(h.tserver) - return bad - -def checkMemory(tservers): - 'Run free on all tservers and look for weird results' - handles = runAll(tservers, 'free') - bad = set() - mem = {} - swap = {} - for h in handles: - if not h.finished or h.returncode != 0: - print '#', 'cannot look at memory on', h.tserver - bad.add(h.tserver) - else: - if h.out.find('Swap:') < 0: - print '#',h.tserver,'has no swap' - bad.add(h.tserver) - continue - lines = h.out.split('\n') - for line in lines: - if line.startswith('Mem:'): - mem.setdefault(line.split()[1],set()).add(h.tserver) - if line.startswith('Swap:'): - swap.setdefault(line.split()[1],set()).add(h.tserver) - # order memory sizes by most common - mems = sorted([(len(v), k, v) for k, v in mem.items()], reverse=True) - mostCommon = float(mems[0][1]) - for _, size, tservers in mems[1:]: - fract = abs(mostCommon - float(size)) / mostCommon - if fract > 0.05: - print '#',', '.join(tservers), ': unusual memory size', size - bad.update(tservers) - swaps = sorted([(len(v), k, v) for k, v in swap.items()], reverse=True) - mostCommon = float(mems[0][1]) - for _, size, tservers in swaps[1:]: - fract = abs(mostCommon - float(size) / mostCommon) - if fract > 0.05: - print '#',', '.join(tservers), ': unusual swap size', size - bad.update(tservers) - return bad - -def checkWritable(tservers): - 'Touch all the directories that should be writable by this user return any nodes that fail' - if not WRITABLE: - print '# WRITABLE value not configured, not checking partitions' - return [] - handles = runAll(tservers, 'touch', *WRITABLE) - bad = set() - for h in handles: - if not h.finished or h.returncode != 0: - bad.add(h.tserver) - print '#', h.tserver, 'some drives are not writable' - return bad - -def checkMounts(tservers): - 'Check the file systems that are mounted and report any that are unusual' - handles = runAll(tservers, 'mount') - mounts = {} - finished = set() - bad = set() - for handle in handles: - if handle.finished and handle.returncode == 0: - for line in handle.out.split('\n'): - words = line.split() - if len(words) < 5: continue - if words[4] == 'nfs': continue - if words[0].find(':/') >= 0: continue - mount = words[2] - mounts.setdefault(mount, set()).add(handle.tserver) - finished.add(handle.tserver) - else: - bad.add(handle.tserver) - print '#', handle.tserver, 'did not finish' - for m in sorted(mounts.keys()): - diff = finished - mounts[m] - if diff: - bad.update(diff) - print '#', m, 'not mounted on', ', '.join(diff) - return bad - -def main(argv): - if len(argv) < 1: - sys.stderr.write('Usage: check_tservers tservers\n') - sys.exit(1) - sys.stdin.close() - tservers = set() - for tserver in open(argv[0]): - hashPos = tserver.find('#') - if hashPos >= 0: - tserver = tserver[:hashPos] - tserver = tserver.strip() - if not tserver: continue - tservers.add(tserver) - bad = set() - for test in checkIdentity, checkMemory, checkMounts, checkWritable: - bad.update(test(tservers - bad)) - for tserver in sorted(tservers - bad): - print tserver - -main(sys.argv[1:]) diff --git a/core/pom.xml b/core/pom.xml index 984726fb88..b8e93e48cd 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -188,7 +188,7 @@ <configuration> <licenseSets> <licenseSet> - <header>${session.executionRootDirectory}/contrib/license-header.txt</header> + <header>${rootlocation}/src/build/license-header.txt</header> <excludes> <exclude>src/main/java/org/apache/accumulo/core/bloomfilter/*.java</exclude> <exclude>src/main/java/org/apache/accumulo/core/util/HostAndPort.java</exclude> diff --git a/pom.xml b/pom.xml index 194dba82ed..6cbabcb1df 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.apache</groupId> <artifactId>apache</artifactId> - <version>29</version> + <version>30</version> </parent> <groupId>org.apache.accumulo</groupId> <artifactId>accumulo-project</artifactId> @@ -37,8 +37,6 @@ design in the form of cell-level access labels and a server-side programming mechanism that can modify key/value pairs at various points in the data management process.</description> - <!-- this URL is where the site derived via the maven-site-plugin ends up, - not the generic site; currently not used --> <url>https://accumulo.apache.org</url> <!-- this is the year of inception at ASF --> <inceptionYear>2011</inceptionYear> @@ -116,12 +114,6 @@ <properties> <!-- used for filtering the java source with the current version --> <accumulo.release.version>${project.version}</accumulo.release.version> - <auto-service.version>1.0.1</auto-service.version> - <!-- bouncycastle version for test dependencies --> - <bouncycastle.version>1.70</bouncycastle.version> - <!-- Curator version --> - <curator.version>5.5.0</curator.version> - <errorprone.version>2.18.0</errorprone.version> <!-- avoid error shutting down built-in ForkJoinPool.commonPool() during exec:java tasks --> <exec.cleanupDaemonThreads>false</exec.cleanupDaemonThreads> <extraTestArgs /> @@ -130,7 +122,6 @@ <failsafe.forkCount>1</failsafe.forkCount> <failsafe.groups /> <failsafe.reuseForks>false</failsafe.reuseForks> - <hadoop.version>3.3.5</hadoop.version> <!-- prevent introduction of new compiler warnings --> <maven.compiler.failOnWarning>true</maven.compiler.failOnWarning> <maven.compiler.release>11</maven.compiler.release> @@ -138,41 +129,48 @@ <maven.compiler.target>11</maven.compiler.target> <maven.javadoc.failOnWarnings>true</maven.javadoc.failOnWarnings> <maven.site.deploy.skip>true</maven.site.deploy.skip> + <maven.site.skip>true</maven.site.skip> <!-- surefire/failsafe plugin option --> <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile> + <!-- versions-maven-plugin ignore patterns for snapshots, alpha, beta, milestones, and release candidates --> + <maven.version.ignore>.+-SNAPSHOT,(?i).*(alpha|beta)[0-9]*,(?i).*[.-](m|rc)[0-9]+</maven.version.ignore> <minimalJavaBuildVersion>11</minimalJavaBuildVersion> - <minimalMavenBuildVersion>3.5.0</minimalMavenBuildVersion> - <powermock.version>2.0.9</powermock.version> + <minimalMavenBuildVersion>3.6.0</minimalMavenBuildVersion> <!-- timestamp for reproducible outputs, updated on release by the release plugin --> <project.build.outputTimestamp>2023-06-14T05:41:08Z</project.build.outputTimestamp> <rat.consoleOutput>true</rat.consoleOutput> - <slf4j.version>2.0.7</slf4j.version> <sourceReleaseAssemblyDescriptor>source-release-tar</sourceReleaseAssemblyDescriptor> <surefire.excludedGroups /> <surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests> <surefire.forkCount>1C</surefire.forkCount> <surefire.groups /> <surefire.reuseForks>true</surefire.reuseForks> - <surefire.version>3.1.0</surefire.version> - <!-- Thrift version --> - <thrift.version>0.17.0</thrift.version> <unitTestMemSize>-Xmx1G</unitTestMemSize> - <!-- ZooKeeper version --> - <zookeeper.version>3.8.1</zookeeper.version> + <!-- dependency and plugin versions managed with properties --> + <version.auto-service>1.1.1</version.auto-service> + <version.bouncycastle>1.70</version.bouncycastle> + <version.curator>5.5.0</version.curator> + <version.errorprone>2.20.0</version.errorprone> + <version.hadoop>3.3.6</version.hadoop> + <version.opentelemetry>1.27.0</version.opentelemetry> + <version.powermock>2.0.9</version.powermock> + <version.slf4j>2.0.7</version.slf4j> + <version.thrift>0.17.0</version.thrift> + <version.zookeeper>3.8.1</version.zookeeper> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>com.fasterxml.jackson</groupId> <artifactId>jackson-bom</artifactId> - <version>2.15.1</version> + <version>2.15.2</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-bom</artifactId> - <version>1.11.0</version> + <version>1.11.1</version> <type>pom</type> <scope>import</scope> </dependency> @@ -180,21 +178,21 @@ <!-- for dependency convergence between Micrometer and ZooKeeper --> <groupId>io.netty</groupId> <artifactId>netty-bom</artifactId> - <version>4.1.92.Final</version> + <version>4.1.94.Final</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.opentelemetry</groupId> <artifactId>opentelemetry-bom</artifactId> - <version>1.26.0</version> + <version>${version.opentelemetry}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.opentelemetry</groupId> <artifactId>opentelemetry-bom-alpha</artifactId> - <version>1.26.0-alpha</version> + <version>${version.opentelemetry}-alpha</version> <type>pom</type> <scope>import</scope> </dependency> @@ -229,7 +227,7 @@ <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-bom</artifactId> - <version>4.0.2</version> + <version>4.0.3</version> <type>pom</type> <scope>import</scope> </dependency> @@ -244,7 +242,7 @@ <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> - <version>5.10.0-M1</version> + <version>5.9.3</version> <type>pom</type> <scope>import</scope> </dependency> @@ -271,7 +269,7 @@ <dependency> <groupId>com.google.auto.service</groupId> <artifactId>auto-service</artifactId> - <version>${auto-service.version}</version> + <version>${version.auto-service}</version> </dependency> <dependency> <groupId>com.google.code.findbugs</groupId> @@ -287,7 +285,7 @@ <!-- converge transitive dependency version between guava and caffeine --> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_annotations</artifactId> - <version>${errorprone.version}</version> + <version>${version.errorprone}</version> </dependency> <dependency> <!-- this is a runtime dependency of guava, no longer included with guava as of 27.1 --> @@ -298,7 +296,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>32.0.0-jre</version> + <version>32.0.1-jre</version> </dependency> <dependency> <groupId>com.google.protobuf</groupId> @@ -318,12 +316,12 @@ <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> - <version>1.15</version> + <version>1.16.0</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.12.0</version> + <version>2.13.0</version> </dependency> <dependency> <groupId>commons-logging</groupId> @@ -466,22 +464,22 @@ <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-framework</artifactId> - <version>${curator.version}</version> + <version>${version.curator}</version> </dependency> <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-test</artifactId> - <version>${curator.version}</version> + <version>${version.curator}</version> </dependency> <dependency> <groupId>org.apache.datasketches</groupId> <artifactId>datasketches-java</artifactId> - <version>4.0.0</version> + <version>4.1.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> - <version>${hadoop.version}</version> + <version>${version.hadoop}</version> <exclusions> <exclusion> <groupId>xerces</groupId> @@ -492,27 +490,27 @@ <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client-api</artifactId> - <version>${hadoop.version}</version> + <version>${version.hadoop}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client-minicluster</artifactId> - <version>${hadoop.version}</version> + <version>${version.hadoop}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client-runtime</artifactId> - <version>${hadoop.version}</version> + <version>${version.hadoop}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-distcp</artifactId> - <version>${hadoop.version}</version> + <version>${version.hadoop}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-minicluster</artifactId> - <version>${hadoop.version}</version> + <version>${version.hadoop}</version> <exclusions> <exclusion> <groupId>xerces</groupId> @@ -523,7 +521,7 @@ <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-minikdc</artifactId> - <version>${hadoop.version}</version> + <version>${version.hadoop}</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> @@ -534,12 +532,12 @@ <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-tools</artifactId> - <version>${hadoop.version}</version> + <version>${version.hadoop}</version> </dependency> <dependency> <groupId>org.apache.thrift</groupId> <artifactId>libthrift</artifactId> - <version>${thrift.version}</version> + <version>${version.thrift}</version> <!-- exclude vulnerable lib see https://issues.apache.org/jira/browse/HTTPCLIENT-1803 --> <exclusions> <exclusion> @@ -551,7 +549,7 @@ <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> - <version>${zookeeper.version}</version> + <version>${version.zookeeper}</version> <exclusions> <exclusion> <groupId>ch.qos.logback</groupId> @@ -566,22 +564,22 @@ <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper-jute</artifactId> - <version>${zookeeper.version}</version> + <version>${version.zookeeper}</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcpkix-jdk15on</artifactId> - <version>${bouncycastle.version}</version> + <version>${version.bouncycastle}</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15on</artifactId> - <version>${bouncycastle.version}</version> + <version>${version.bouncycastle}</version> </dependency> <dependency> <groupId>org.checkerframework</groupId> <artifactId>checker-qual</artifactId> - <version>3.34.0</version> + <version>3.35.0</version> </dependency> <dependency> <groupId>org.easymock</groupId> @@ -606,7 +604,7 @@ <dependency> <groupId>org.hibernate.validator</groupId> <artifactId>hibernate-validator</artifactId> - <version>8.0.0.Final</version> + <version>8.0.1.Final</version> </dependency> <dependency> <groupId>org.javassist</groupId> @@ -616,7 +614,7 @@ <dependency> <groupId>org.jboss.logging</groupId> <artifactId>jboss-logging</artifactId> - <version>3.5.0.Final</version> + <version>3.5.1.Final</version> </dependency> <dependency> <!-- force convergence of transitive dependency of hibernate-validator --> @@ -656,27 +654,27 @@ <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-api-easymock</artifactId> - <version>${powermock.version}</version> + <version>${version.powermock}</version> </dependency> <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-core</artifactId> - <version>${powermock.version}</version> + <version>${version.powermock}</version> </dependency> <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-module-junit4</artifactId> - <version>${powermock.version}</version> + <version>${version.powermock}</version> </dependency> <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-reflect</artifactId> - <version>${powermock.version}</version> + <version>${version.powermock}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> - <version>${slf4j.version}</version> + <version>${version.slf4j}</version> </dependency> <dependency> <!-- version specified to converge transitive dependency of hadoop and curator --> @@ -705,7 +703,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> - <version>2.15.0</version> + <version>2.16.0</version> </plugin> <plugin> <groupId>com.mycila</groupId> @@ -714,13 +712,12 @@ <configuration> <licenseSets> <licenseSet> - <header>${rootlocation}/contrib/license-header.txt</header> + <header>${rootlocation}/src/build/license-header.txt</header> <excludes combine.children="append"> <exclude>**/DEPENDENCIES</exclude> <exclude>**/LICENSE</exclude> <exclude>**/NOTICE</exclude> <exclude>**/target/**</exclude> - <exclude>contrib/javadoc11.patch</exclude> </excludes> </licenseSet> </licenseSets> @@ -748,7 +745,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.7.3.4</version> + <version>4.7.3.5</version> <configuration> <xmlOutput>true</xmlOutput> <effort>Max</effort> @@ -765,30 +762,10 @@ </plugins> </configuration> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>3.3.1</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-remote-resources-plugin</artifactId> - <version>3.1.0</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-site-plugin</artifactId> - <version>4.0.0-M8</version> - </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>3.2.2</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.6.0</version> + <version>3.3.0</version> </plugin> <plugin> <groupId>com.github.ekryd.sortpom</groupId> @@ -815,25 +792,9 @@ <skipNoGit>true</skipNoGit> </configuration> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-clean-plugin</artifactId> - <configuration> - <filesets> - <fileset> - <directory>./</directory> - <includes> - <include>**/*.pyc</include> - <include>**/*.so</include> - </includes> - </fileset> - </filesets> - </configuration> - </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.11.0</version> <configuration> <showDeprecation>true</showDeprecation> <showWarnings>true</showWarnings> @@ -849,7 +810,7 @@ <path> <groupId>com.google.auto.service</groupId> <artifactId>auto-service</artifactId> - <version>${auto-service.version}</version> + <version>${version.auto-service}</version> </path> </annotationProcessorPaths> </configuration> @@ -942,9 +903,9 @@ <plugin> <groupId>net.revelc.code.formatter</groupId> <artifactId>formatter-maven-plugin</artifactId> - <version>2.22.0</version> + <version>2.23.0</version> <configuration> - <configFile>${rootlocation}/contrib/Eclipse-Accumulo-Codestyle.xml</configFile> + <configFile>${rootlocation}/src/build/eclipse-codestyle.xml</configFile> <excludes> <exclude>**/thrift/*.java</exclude> <exclude>**/proto/*.java</exclude> @@ -989,16 +950,6 @@ </excludes> </configuration> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>3.6.0</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-enforcer-plugin</artifactId> - <version>3.3.0</version> - </plugin> </plugins> </pluginManagement> <plugins> @@ -1229,7 +1180,7 @@ <dependency> <groupId>com.puppycrawl.tools</groupId> <artifactId>checkstyle</artifactId> - <version>10.11.0</version> + <version>10.12.1</version> </dependency> </dependencies> <executions> @@ -1599,6 +1550,10 @@ <profile> <!-- mvn clean package javadoc:aggregate -DskipTests -Paggregate-javadocs --> <id>aggregate-javadocs</id> + <properties> + <!-- use at least 17 to avoid patching for JDK-8227487 JDK-8214856 and JDK-8215291 --> + <minimalJavaBuildVersion>17</minimalJavaBuildVersion> + </properties> <build> <pluginManagement> <plugins> @@ -1753,7 +1708,7 @@ <path> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_core</artifactId> - <version>${errorprone.version}</version> + <version>${version.errorprone}</version> </path> </annotationProcessorPaths> </configuration> diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java index 755b1e4be9..29e1f03d44 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java +++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java @@ -441,16 +441,21 @@ public class VolumeManagerImpl implements VolumeManager { return new VolumeManagerImpl(volumes, conf, hadoopConf); } + @SuppressWarnings("deprecation") + private static boolean inSafeMode(DistributedFileSystem dfs) throws IOException { + // Returns true when safemode is on; this version of setSafeMode was deprecated in Hadoop 3.3.6, + // because SafeModeAction enum was moved to a new package, and this deprecated method was + // overloaded with a version of the method that accepts the new enum. However, we can't use that + // replacement method if we want to continue working with versions less than 3.3.6, so we just + // suppress the deprecation warning. + return dfs.setSafeMode(SafeModeAction.SAFEMODE_GET); + } + @Override public boolean isReady() throws IOException { for (Volume volume : volumesByName.values()) { final FileSystem fs = volume.getFileSystem(); - if (!(fs instanceof DistributedFileSystem)) { - continue; - } - final DistributedFileSystem dfs = (DistributedFileSystem) fs; - // Returns true when safemode is on - if (dfs.setSafeMode(SafeModeAction.SAFEMODE_GET)) { + if (fs instanceof DistributedFileSystem && inSafeMode((DistributedFileSystem) fs)) { return false; } } diff --git a/server/monitor/pom.xml b/server/monitor/pom.xml index c1d78e8bf3..d3ab47d2dd 100644 --- a/server/monitor/pom.xml +++ b/server/monitor/pom.xml @@ -204,7 +204,7 @@ <configuration> <licenseSets> <licenseSet> - <header>${session.executionRootDirectory}/contrib/license-header.txt</header> + <header>${rootlocation}/src/build/license-header.txt</header> <excludes> <exclude>src/main/resources/org/apache/accumulo/monitor/resources/external/**/*</exclude> </excludes> diff --git a/server/tserver/pom.xml b/server/tserver/pom.xml index 15f79ee3d6..a8f559bbda 100644 --- a/server/tserver/pom.xml +++ b/server/tserver/pom.xml @@ -154,7 +154,7 @@ <configuration> <licenseSets> <licenseSet> - <header>${session.executionRootDirectory}/contrib/license-header.txt</header> + <header>${rootlocation}/src/build/license-header.txt</header> <excludes> <exclude>src/test/resources/*.walog</exclude> <exclude>src/test/resources/walog-from-14/*</exclude> diff --git a/contrib/ci/find-unapproved-chars.sh b/src/build/ci/find-unapproved-chars.sh similarity index 100% rename from contrib/ci/find-unapproved-chars.sh rename to src/build/ci/find-unapproved-chars.sh diff --git a/contrib/ci/find-unapproved-junit.sh b/src/build/ci/find-unapproved-junit.sh similarity index 100% rename from contrib/ci/find-unapproved-junit.sh rename to src/build/ci/find-unapproved-junit.sh diff --git a/contrib/ci/install-shfmt.sh b/src/build/ci/install-shfmt.sh similarity index 100% rename from contrib/ci/install-shfmt.sh rename to src/build/ci/install-shfmt.sh diff --git a/contrib/ci/install-thrift.sh b/src/build/ci/install-thrift.sh similarity index 90% rename from contrib/ci/install-thrift.sh rename to src/build/ci/install-thrift.sh index a46e7c694f..e861798408 100755 --- a/contrib/ci/install-thrift.sh +++ b/src/build/ci/install-thrift.sh @@ -24,7 +24,7 @@ set -e thriftdefault="0.16.0" rootDir=$(git rev-parse --show-toplevel 2>/dev/null) || ver=$thriftdefault -ver=$({ xmllint --shell "$rootDir/pom.xml" <<<'xpath /*[local-name()="project"]/*[local-name()="properties"]/*[local-name()="thrift.version"]/text()' | grep content= | cut -f2 -d=; } 2>/dev/null || echo "$thriftdefault") +ver=$({ xmllint --shell "$rootDir/pom.xml" <<<'xpath /*[local-name()="project"]/*[local-name()="properties"]/*[local-name()="version.thrift"]/text()' | grep content= | cut -f2 -d=; } 2>/dev/null || echo "$thriftdefault") ver=${ver%%-*} sudo wget "https://dist.apache.org/repos/dist/dev/accumulo/devtools/thrift-$ver/thrift" -O /usr/local/bin/thrift && diff --git a/contrib/ci/it-matrix.sh b/src/build/ci/it-matrix.sh similarity index 100% rename from contrib/ci/it-matrix.sh rename to src/build/ci/it-matrix.sh diff --git a/contrib/ci/run-shellcheck.sh b/src/build/ci/run-shellcheck.sh similarity index 100% rename from contrib/ci/run-shellcheck.sh rename to src/build/ci/run-shellcheck.sh diff --git a/contrib/ci/run-shfmt.sh b/src/build/ci/run-shfmt.sh similarity index 100% rename from contrib/ci/run-shfmt.sh rename to src/build/ci/run-shfmt.sh diff --git a/contrib/ci/run-thrift.sh b/src/build/ci/run-thrift.sh similarity index 100% rename from contrib/ci/run-thrift.sh rename to src/build/ci/run-thrift.sh diff --git a/contrib/Eclipse-Accumulo-Codestyle.xml b/src/build/eclipse-codestyle.xml similarity index 100% rename from contrib/Eclipse-Accumulo-Codestyle.xml rename to src/build/eclipse-codestyle.xml diff --git a/contrib/license-header.txt b/src/build/license-header.txt similarity index 100% rename from contrib/license-header.txt rename to src/build/license-header.txt diff --git a/src/site/site.xml b/src/site/site.xml deleted file mode 100644 index 9bcd2fdfd5..0000000000 --- a/src/site/site.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - ---> -<project xmlns="http://maven.apache.org/DECORATION/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 https://maven.apache.org/xsd/decoration-1.0.0.xsd" - name="Maven"> - <bannerLeft> - <name>Apache Accumulo</name> - <src>https://www.apache.org/images/asf-logo.gif</src> - <href>https://accumulo.apache.org/</href> - </bannerLeft> - <version position="right" /> - <skin> - <groupId>org.apache.maven.skins</groupId> - <artifactId>maven-fluido-skin</artifactId> - <version>1.1</version> - </skin> - <body> - <breadcrumbs> - <item name="Accumulo" href="https://accumulo.apache.org/" /> - </breadcrumbs> - <menu ref="reports" inherit="top" /> - <menu ref="modules" inherit="top" /> - </body> -</project>
