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 ab70060 Use port search for compaction coordinator in ITs (#2454)
ab70060 is described below
commit ab70060bc01c78c2136a1d33091c2cce81b17545
Author: Christopher Tubbs <[email protected]>
AuthorDate: Wed Feb 2 10:41:48 2022 -0500
Use port search for compaction coordinator in ITs (#2454)
Stabilize some external compaction ITs by ensuring the compaction
coordinator is using port search when it starts up, in case the
requested port is not available.
---
.../src/main/java/org/apache/accumulo/compactor/Compactor.java | 7 ++-----
.../accumulo/test/compaction/ExternalCompactionTestUtils.java | 1 +
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git
a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
index 5838777..133360b 100644
---
a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
+++
b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
@@ -155,7 +155,7 @@ public class Compactor extends AbstractServer implements
MetricsProducer, Compac
private ServerAddress compactorAddress = null;
// Exposed for tests
- protected volatile Boolean shutdown = false;
+ protected volatile boolean shutdown = false;
private final AtomicBoolean compactionRunning = new AtomicBoolean(false);
@@ -626,10 +626,7 @@ public class Compactor extends AbstractServer implements
MetricsProducer, Compac
}
protected Supplier<UUID> getNextId() {
- Supplier<UUID> supplier = () -> {
- return UUID.randomUUID();
- };
- return supplier;
+ return UUID::randomUUID;
}
protected long getWaitTimeBetweenCompactionChecks() {
diff --git
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTestUtils.java
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTestUtils.java
index 509704e..57f6b5c 100644
---
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTestUtils.java
+++
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTestUtils.java
@@ -223,6 +223,7 @@ public class ExternalCompactionTestUtils {
cfg.setProperty(Property.COMPACTION_COORDINATOR_FINALIZER_COMPLETION_CHECK_INTERVAL,
"5s");
cfg.setProperty(Property.COMPACTION_COORDINATOR_DEAD_COMPACTOR_CHECK_INTERVAL,
"5s");
cfg.setProperty(Property.COMPACTION_COORDINATOR_TSERVER_COMPACTION_CHECK_INTERVAL,
"3s");
+ cfg.setProperty(Property.COMPACTION_COORDINATOR_THRIFTCLIENT_PORTSEARCH,
"true");
cfg.setProperty(Property.COMPACTOR_PORTSEARCH, "true");
cfg.setProperty(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE, "10");
cfg.setProperty(Property.MANAGER_FATE_THREADPOOL_SIZE, "10");