This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push: new c1fa24df99 Bump versions (#2758) c1fa24df99 is described below commit c1fa24df9963cd877be23852ded637705b3bf7d6 Author: Christopher Tubbs <ctubb...@apache.org> AuthorDate: Wed Jun 8 00:59:20 2022 -0400 Bump versions (#2758) * Bump versions of plugins and dependencies * Update CI config to use ZooKeeper 3.5.10 with reload4j * Keep jersey back at 3.0.4 to avoid breaking WebViews IT, since jakartaee-bom is not yet available for jakartaee 10, and I don't want to manage individual versions for jakarta.ws.rs-api outside the bom * Exclude slf4j transitive deps from minikdc, regardless of whether it's reload4j or log4j, depending on the hadoop.version * Fix TransformTokenIT breakage by ensuring auths are set for recursive delete Also try to fix some flaky tests: * Update verifyUp to check for instanceId in the retry loop, but don't iterate over the instance names, since that's pointless; also update exceptions to be more specific than basic RuntimeException (newer versions of spotbugs will complain about this) * Also avoid printing a NullPointerException in LogSorter when the input stream is closed (seen turning testing these changes) --- .github/workflows/maven.yaml | 2 +- .../clientImpl/mapreduce/lib/ConfiguratorBase.java | 2 +- .../miniclusterImpl/MiniAccumuloClusterImpl.java | 52 +++++++-------- pom.xml | 73 ++++++++++------------ .../apache/accumulo/server/init/Initialize.java | 2 +- .../server/conf/store/impl/ZooPropLoaderTest.java | 18 +++--- .../server/problems/ProblemReportTest.java | 2 +- .../ZooAuthenticationKeyDistributorTest.java | 2 +- .../replication/SequentialWorkAssignerTest.java | 5 +- .../org/apache/accumulo/tserver/log/LogSorter.java | 4 +- .../accumulo/test/conf/util/TransformTokenIT.java | 10 +-- 11 files changed, 81 insertions(+), 91 deletions(-) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index c1f0bcfa61..7500efbcab 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -67,7 +67,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.9'} + - {name: 'compat', javaver: 11, args: 'package -DskipTests -Dhadoop.version=3.0.3 -Dzookeeper.version=3.5.10'} - {name: 'errorprone', javaver: 11, args: 'verify -Perrorprone,skipQA'} - {name: 'jdk17', javaver: 17, args: 'verify -DskipITs'} fail-fast: false diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/mapreduce/lib/ConfiguratorBase.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/mapreduce/lib/ConfiguratorBase.java index 95f45434f2..6f73dcb25f 100644 --- a/core/src/main/java/org/apache/accumulo/core/clientImpl/mapreduce/lib/ConfiguratorBase.java +++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/mapreduce/lib/ConfiguratorBase.java @@ -511,7 +511,7 @@ public class ConfiguratorBase { throws AccumuloException, AccumuloSecurityException { return ((org.apache.accumulo.core.clientImpl.ConnectorImpl) getInstance(CLASS, conf) .getConnector(getPrincipal(CLASS, conf), getAuthenticationToken(CLASS, conf))) - .getAccumuloClient(); + .getAccumuloClient(); } public static ClientContext client(Class<?> CLASS, diff --git a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java index 1c1dc25ebe..d116fc1221 100644 --- a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java +++ b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java @@ -33,6 +33,7 @@ import java.io.UncheckedIOException; import java.net.InetSocketAddress; import java.net.Socket; import java.net.URI; +import java.net.URISyntaxException; import java.nio.file.Files; import java.util.ArrayList; import java.util.Collection; @@ -162,7 +163,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { if (Boolean.valueOf(config.getSiteConfig().get(Property.TSERV_NATIVEMAP_ENABLED.getKey())) && config.getNativeLibPaths().length == 0 && !config.getSystemProperties().containsKey("accumulo.native.lib.path")) { - throw new RuntimeException( + throw new IllegalStateException( "MAC configured to use native maps, but native library path was not provided."); } @@ -485,7 +486,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { try (var fs = getServerContext().getVolumeManager()) { instanceIdPath = serverDirs.getInstanceIdLocation(fs.getFirst()); } catch (IOException e) { - throw new RuntimeException(e); + throw new UncheckedIOException(e); } InstanceId instanceIdFromFile = @@ -505,15 +506,15 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { } } } catch (KeeperException e) { - throw new RuntimeException("Unable to read instance name from zookeeper.", e); + throw new IllegalStateException("Unable to read instance name from zookeeper.", e); } if (instanceName == null) { - throw new RuntimeException("Unable to read instance name from zookeeper."); + throw new IllegalStateException("Unable to read instance name from zookeeper."); } config.setInstanceName(instanceName); if (!AccumuloStatus.isAccumuloOffline(zrw, rootPath)) { - throw new RuntimeException( + throw new IllegalStateException( "The Accumulo instance being used is already running. Aborting."); } } else { @@ -547,7 +548,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { if (n >= 4 && new String(buffer, 0, 4).equals("imok")) { break; } - } catch (Exception e) { + } catch (IOException | RuntimeException e) { if (System.currentTimeMillis() - startTime >= config.getZooKeeperStartupTime()) { throw new ZooKeeperBindException("Zookeeper did not start within " + (config.getZooKeeperStartupTime() / 1000) + " seconds. Check the logs in " @@ -577,8 +578,8 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { Process initProcess = exec(Initialize.class, args.toArray(new String[0])).getProcess(); int ret = initProcess.waitFor(); if (ret != 0) { - throw new RuntimeException("Initialize process returned " + ret + ". Check the logs in " - + config.getLogDir() + " for errors."); + throw new IllegalStateException("Initialize process returned " + ret + + ". Check the logs in " + config.getLogDir() + " for errors."); } initialized = true; } @@ -599,7 +600,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { sleepUninterruptibly(1, TimeUnit.SECONDS); } if (ret != 0) { - throw new RuntimeException("Could not set manager goal state, process returned " + ret + throw new IllegalStateException("Could not set manager goal state, process returned " + ret + ". Check the logs in " + config.getLogDir() + " for errors."); } @@ -647,31 +648,26 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { String secret = getSiteConfiguration().get(Property.INSTANCE_SECRET); + String instanceId = null; for (int i = 0; i < numTries; i++) { if (zk.getState().equals(States.CONNECTED)) { ZooUtil.digestAuth(zk, secret); - break; - } else { - Thread.sleep(1000); - } - } - - String instanceId = null; - try { - for (String name : zk.getChildren(Constants.ZROOT + Constants.ZINSTANCES, null)) { - if (name.equals(config.getInstanceName())) { - String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name; + try { + zk.sync("/", null, null); + String instanceNamePath = + Constants.ZROOT + Constants.ZINSTANCES + "/" + config.getInstanceName(); byte[] bytes = zk.getData(instanceNamePath, null, null); instanceId = new String(bytes, UTF_8); break; + } catch (KeeperException e) { + log.debug("Unable to read instance id from zookeeper.", e); } } - } catch (KeeperException e) { - throw new RuntimeException("Unable to read instance id from zookeeper.", e); + Thread.sleep(1000); } if (instanceId == null) { - throw new RuntimeException("Unable to find instance id from zookeeper."); + throw new IllegalStateException("Unable to find instance id from zookeeper."); } String rootPath = Constants.ZROOT + "/" + instanceId; @@ -690,7 +686,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { Thread.sleep(500); } } catch (KeeperException e) { - throw new RuntimeException("Unable to read TServer information from zookeeper.", e); + throw new IllegalStateException("Unable to read TServer information from zookeeper.", e); } try { @@ -699,7 +695,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { Thread.sleep(500); } } catch (KeeperException e) { - throw new RuntimeException("Unable to read Manager information from zookeeper.", e); + throw new IllegalStateException("Unable to read Manager information from zookeeper.", e); } try { @@ -708,7 +704,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { Thread.sleep(500); } } catch (KeeperException e) { - throw new RuntimeException("Unable to read GC information from zookeeper.", e); + throw new IllegalStateException("Unable to read GC information from zookeeper.", e); } } @@ -841,8 +837,8 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { public FileSystem getFileSystem() { try { return FileSystem.get(new URI(dfsUri), new Configuration()); - } catch (Exception e) { - throw new RuntimeException(e); + } catch (IOException | URISyntaxException e) { + throw new IllegalStateException(e); } } diff --git a/pom.xml b/pom.xml index 45cd2ca500..78722b0dee 100644 --- a/pom.xml +++ b/pom.xml @@ -120,7 +120,7 @@ <!-- bouncycastle version for test dependencies --> <bouncycastle.version>1.70</bouncycastle.version> <!-- Curator version --> - <curator.version>5.2.0</curator.version> + <curator.version>5.2.1</curator.version> <!-- relative path for Eclipse format; should override in child modules if necessary --> <eclipseFormatterStyle>${project.parent.basedir}/contrib/Eclipse-Accumulo-Codestyle.xml</eclipseFormatterStyle> <errorprone.version>2.11.0</errorprone.version> @@ -131,8 +131,7 @@ <failsafe.forkCount>1</failsafe.forkCount> <failsafe.groups /> <failsafe.reuseForks>false</failsafe.reuseForks> - <!-- Version 3.3.1 seems to have issues especially with CountNameNodeOptsBulkIT --> - <hadoop.version>3.3.0</hadoop.version> + <hadoop.version>3.3.3</hadoop.version> <htrace.hadoop.version>4.1.0-incubating</htrace.hadoop.version> <it.failIfNoSpecifiedTests>false</it.failIfNoSpecifiedTests> <!-- prevent introduction of new compiler warnings --> @@ -149,7 +148,7 @@ <!-- timestamp for reproducible outputs, updated on release by the release plugin --> <project.build.outputTimestamp>2022-02-08T14:59:16Z</project.build.outputTimestamp> <rat.consoleOutput>true</rat.consoleOutput> - <slf4j.version>1.7.35</slf4j.version> + <slf4j.version>1.7.36</slf4j.version> <sourceReleaseAssemblyDescriptor>source-release-tar</sourceReleaseAssemblyDescriptor> <surefire.excludedGroups /> <surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests> @@ -161,35 +160,35 @@ <thrift.version>0.16.0</thrift.version> <unitTestMemSize>-Xmx1G</unitTestMemSize> <!-- ZooKeeper version --> - <zookeeper.version>3.7.0</zookeeper.version> + <zookeeper.version>3.7.1</zookeeper.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>com.fasterxml.jackson</groupId> <artifactId>jackson-bom</artifactId> - <version>2.13.1</version> + <version>2.13.3</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-bom</artifactId> - <version>1.8.4</version> + <version>1.9.0</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.opentelemetry</groupId> <artifactId>opentelemetry-bom</artifactId> - <version>1.12.0</version> + <version>1.14.0</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.opentelemetry</groupId> <artifactId>opentelemetry-bom-alpha</artifactId> - <version>1.12.0-alpha</version> + <version>1.14.0-alpha</version> <type>pom</type> <scope>import</scope> </dependency> @@ -210,27 +209,28 @@ <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-bom</artifactId> - <version>11.0.8</version> + <version>11.0.9</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.glassfish.hk2</groupId> <artifactId>hk2-bom</artifactId> - <version>3.0.2</version> + <version>3.0.3</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-bom</artifactId> - <version>3.0.2</version> + <version>4.0.0</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.glassfish.jersey</groupId> <artifactId>jersey-bom</artifactId> + <!-- 3.1.0 would require jakarta.ws.rs-api 3.1.0, jakartaee 9 uses 3.0.0 --> <version>3.0.4</version> <type>pom</type> <scope>import</scope> @@ -238,7 +238,7 @@ <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> - <version>5.8.2</version> + <version>5.9.0-M1</version> <type>pom</type> <scope>import</scope> </dependency> @@ -255,12 +255,12 @@ <dependency> <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> - <version>3.1.0</version> + <version>3.1.1</version> </dependency> <dependency> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-annotations</artifactId> - <version>4.5.3</version> + <version>4.7.0</version> </dependency> <dependency> <groupId>com.google.auto.service</groupId> @@ -281,7 +281,7 @@ <!-- converge transitive dependency version between guava and caffeine --> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_annotations</artifactId> - <version>2.11.0</version> + <version>2.14.0</version> </dependency> <dependency> <!-- this is a runtime dependency of guava, no longer included with guava as of 27.1 --> @@ -307,7 +307,7 @@ <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> - <version>1.4</version> + <version>1.5.0</version> </dependency> <dependency> <groupId>commons-codec</groupId> @@ -317,7 +317,7 @@ <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.8.0</version> + <version>2.11.0</version> </dependency> <dependency> <groupId>commons-logging</groupId> @@ -470,7 +470,7 @@ <dependency> <groupId>org.apache.datasketches</groupId> <artifactId>datasketches-java</artifactId> - <version>3.1.0</version> + <version>3.3.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> @@ -521,7 +521,7 @@ <exclusions> <exclusion> <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> @@ -551,16 +551,6 @@ <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>${zookeeper.version}</version> - <exclusions> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.zookeeper</groupId> @@ -580,7 +570,7 @@ <dependency> <groupId>org.checkerframework</groupId> <artifactId>checker-qual</artifactId> - <version>3.21.2</version> + <version>3.22.1</version> </dependency> <dependency> <groupId>org.easymock</groupId> @@ -605,17 +595,17 @@ <dependency> <groupId>org.hibernate.validator</groupId> <artifactId>hibernate-validator</artifactId> - <version>7.0.2.Final</version> + <version>7.0.4.Final</version> </dependency> <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> - <version>3.28.0-GA</version> + <version>3.29.0-GA</version> </dependency> <dependency> <groupId>org.jboss.logging</groupId> <artifactId>jboss-logging</artifactId> - <version>3.4.3.Final</version> + <version>3.5.0.Final</version> </dependency> <dependency> <groupId>org.jline</groupId> @@ -664,6 +654,12 @@ <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> + <dependency> + <!-- version specified to converge transitive dependency of hadoop and curator --> + <groupId>org.xerial.snappy</groupId> + <artifactId>snappy-java</artifactId> + <version>1.1.8.4</version> + </dependency> <dependency> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> @@ -685,7 +681,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> - <version>2.10.0</version> + <version>2.11.0</version> </plugin> <plugin> <groupId>com.mycila</groupId> @@ -904,7 +900,7 @@ <plugin> <groupId>net.revelc.code.formatter</groupId> <artifactId>formatter-maven-plugin</artifactId> - <version>2.18.0</version> + <version>2.19.0</version> <configuration> <configFile>${eclipseFormatterStyle}</configFile> <excludes> @@ -912,7 +908,6 @@ <exclude>**/proto/*.java</exclude> </excludes> <lineEnding>LF</lineEnding> - <overrideConfigCompilerVersion>true</overrideConfigCompilerVersion> <skipCssFormatting>true</skipCssFormatting> <skipHtmlFormatting>true</skipHtmlFormatting> <skipJsFormatting>true</skipJsFormatting> @@ -943,7 +938,7 @@ <plugin> <groupId>net.revelc.code</groupId> <artifactId>impsort-maven-plugin</artifactId> - <version>1.6.2</version> + <version>1.7.0</version> <configuration> <removeUnused>true</removeUnused> <groups>java.,javax.,jakarta.,org.,com.</groups> @@ -1177,7 +1172,7 @@ <dependency> <groupId>com.puppycrawl.tools</groupId> <artifactId>checkstyle</artifactId> - <version>9.3</version> + <version>10.3</version> </dependency> </dependencies> <executions> diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java index 0692a5fe71..d0282b2e83 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java +++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java @@ -170,7 +170,7 @@ public class Initialize implements KeywordExecutable { String rootTabletFileUri = new Path( fs.choose(chooserEnv, initConfig.getVolumeUris()) + SEPARATOR + TABLE_DIR + SEPARATOR + RootTable.ID + SEPARATOR + rootTabletDirName + SEPARATOR + "00000_00000." + ext) - .toString(); + .toString(); zki.initialize(context, opts.clearInstanceName, instanceNamePath, rootTabletDirName, rootTabletFileUri); diff --git a/server/base/src/test/java/org/apache/accumulo/server/conf/store/impl/ZooPropLoaderTest.java b/server/base/src/test/java/org/apache/accumulo/server/conf/store/impl/ZooPropLoaderTest.java index 2487513c13..8e3b9b8a44 100644 --- a/server/base/src/test/java/org/apache/accumulo/server/conf/store/impl/ZooPropLoaderTest.java +++ b/server/base/src/test/java/org/apache/accumulo/server/conf/store/impl/ZooPropLoaderTest.java @@ -453,15 +453,15 @@ public class ZooPropLoaderTest { expect( zrw.getData(eq(propStoreKey.getPath()), capture(propStoreWatcherCapture), capture(stat3))) - .andAnswer(() -> { - Stat s = stat3.getValue(); - s.setCtime(System.currentTimeMillis()); - s.setMtime(System.currentTimeMillis()); - s.setVersion(initialVersion + 4); - stat3.setValue(s); - return propCodec.toBytes(new VersionedProperties(initialVersion + 3, Instant.now(), - Map.of(Property.TABLE_SPLIT_THRESHOLD.getKey(), "12G"))); - }).once(); + .andAnswer(() -> { + Stat s = stat3.getValue(); + s.setCtime(System.currentTimeMillis()); + s.setMtime(System.currentTimeMillis()); + s.setVersion(initialVersion + 4); + stat3.setValue(s); + return propCodec.toBytes(new VersionedProperties(initialVersion + 3, Instant.now(), + Map.of(Property.TABLE_SPLIT_THRESHOLD.getKey(), "12G"))); + }).once(); propStoreWatcher.signalCacheChangeEvent(eq(propStoreKey)); expectLastCall(); diff --git a/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java b/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java index 46c680b2f9..5c0c410f56 100644 --- a/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java +++ b/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java @@ -192,7 +192,7 @@ public class ProblemReportTest { expect(zoorw .getData(ZooUtil.getRoot(InstanceId.of("instance")) + Constants.ZPROBLEMS + "/" + node)) - .andReturn(encoded); + .andReturn(encoded); replay(zoorw); r = ProblemReport.decodeZooKeeperEntry(context, node); diff --git a/server/base/src/test/java/org/apache/accumulo/server/security/delegation/ZooAuthenticationKeyDistributorTest.java b/server/base/src/test/java/org/apache/accumulo/server/security/delegation/ZooAuthenticationKeyDistributorTest.java index e0b00c26b2..40d34c692e 100644 --- a/server/base/src/test/java/org/apache/accumulo/server/security/delegation/ZooAuthenticationKeyDistributorTest.java +++ b/server/base/src/test/java/org/apache/accumulo/server/security/delegation/ZooAuthenticationKeyDistributorTest.java @@ -79,7 +79,7 @@ public class ZooAuthenticationKeyDistributorTest { expect(zrw.exists(baseNode)).andReturn(false); expect( zrw.putPrivatePersistentData(eq(baseNode), aryEq(new byte[0]), eq(NodeExistsPolicy.FAIL))) - .andThrow(new AuthFailedException()); + .andThrow(new AuthFailedException()); replay(zrw); diff --git a/server/manager/src/test/java/org/apache/accumulo/manager/replication/SequentialWorkAssignerTest.java b/server/manager/src/test/java/org/apache/accumulo/manager/replication/SequentialWorkAssignerTest.java index 1c3c238416..97f1261072 100644 --- a/server/manager/src/test/java/org/apache/accumulo/manager/replication/SequentialWorkAssignerTest.java +++ b/server/manager/src/test/java/org/apache/accumulo/manager/replication/SequentialWorkAssignerTest.java @@ -84,14 +84,15 @@ public class SequentialWorkAssignerTest { // file1 replicated expect(zooCache.get(ZooUtil.getRoot(iid) + ReplicationConstants.ZOO_WORK_QUEUE + "/" + DistributedWorkQueueWorkAssignerHelper.getQueueKey("file1", - new ReplicationTarget("cluster1", "1", TableId.of("1"))))).andReturn(null); + new ReplicationTarget("cluster1", "1", TableId.of("1"))))) + .andReturn(null); // file2 still needs to replicate expect( zooCache .get(ZooUtil.getRoot(iid) + ReplicationConstants.ZOO_WORK_QUEUE + "/" + DistributedWorkQueueWorkAssignerHelper.getQueueKey("file2", new ReplicationTarget("cluster1", "2", TableId.of("2"))))) - .andReturn(new byte[0]); + .andReturn(new byte[0]); replay(workQueue, zooCache, opts, client); diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java index 63eb769bae..56a82b748e 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java @@ -185,7 +185,9 @@ public class LogSorter { if (input != null) { bytesCopied = input.getPos(); input.close(); - decryptingInput.close(); + if (decryptingInput != null) { + decryptingInput.close(); + } input = null; } } diff --git a/test/src/main/java/org/apache/accumulo/test/conf/util/TransformTokenIT.java b/test/src/main/java/org/apache/accumulo/test/conf/util/TransformTokenIT.java index d97dd9a911..b1f8e90b92 100644 --- a/test/src/main/java/org/apache/accumulo/test/conf/util/TransformTokenIT.java +++ b/test/src/main/java/org/apache/accumulo/test/conf/util/TransformTokenIT.java @@ -42,7 +42,6 @@ import org.apache.accumulo.server.conf.store.impl.PropStoreWatcher; import org.apache.accumulo.server.conf.store.impl.ZooPropStore; import org.apache.accumulo.server.conf.util.TransformToken; import org.apache.accumulo.test.zookeeper.ZooKeeperTestingServer; -import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.ZKUtil; import org.apache.zookeeper.ZooKeeper; import org.junit.jupiter.api.AfterAll; @@ -101,12 +100,9 @@ public class TransformTokenIT { } @AfterEach - public void cleanupZnodes() { - try { - ZKUtil.deleteRecursive(zooKeeper, Constants.ZROOT); - } catch (KeeperException | InterruptedException ex) { - throw new IllegalStateException("Failed to clean-up test zooKeeper nodes.", ex); - } + public void cleanupZnodes() throws Exception { + ZooUtil.digestAuth(zooKeeper, ZooKeeperTestingServer.SECRET); + ZKUtil.deleteRecursive(zooKeeper, Constants.ZROOT); verify(context, watcher); }