Skip to content

Commit

Permalink
Merge branch 'main' into zc-recursive-watchers
Browse files Browse the repository at this point in the history
  • Loading branch information
ctubbsii committed Jan 22, 2025
2 parents 19591de + 51ea14e commit f2d5e57
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 26 deletions.
11 changes: 0 additions & 11 deletions core/src/main/java/org/apache/accumulo/core/fate/AdminUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,6 @@
public class AdminUtil<T> {
private static final Logger log = LoggerFactory.getLogger(AdminUtil.class);

private final boolean exitOnError;

/**
* Constructor
*
* @param exitOnError <code>System.exit(1)</code> on error if true
*/
public AdminUtil(boolean exitOnError) {
this.exitOnError = exitOnError;
}

/**
* FATE transaction status, including lock information.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ private void executeFateOpsCommand(ServerContext context, FateOpsCommand fateOps

validateFateUserInput(fateOpsCommand);

AdminUtil<Admin> admin = new AdminUtil<>(true);
AdminUtil<Admin> admin = new AdminUtil<>();
final String zkRoot = context.getZooKeeperRoot();
var zTableLocksPath = context.getServerPaths().createTableLocksPath();
String fateZkPath = zkRoot + Constants.ZFATE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Admin.CheckCommand.Check getCheck() {
private static Admin.CheckCommand.CheckStatus checkTableLocks(ServerContext context,
Admin.CheckCommand.CheckStatus status)
throws InterruptedException, KeeperException, AccumuloException, AccumuloSecurityException {
final AdminUtil<Admin> admin = new AdminUtil<>(true);
final AdminUtil<Admin> admin = new AdminUtil<>();
final String zkRoot = context.getZooKeeperRoot();
final var zTableLocksPath = context.getServerPaths().createTableLocksPath();
final String fateZkPath = zkRoot + Constants.ZFATE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1138,14 +1138,11 @@ private void cleanUpEmptyCompactorPathInZK() {
queue.clearIfInactive(Duration.ofMinutes(10));
}
} else {
int aliveCompactorsForGroup = 0;
for (String compactor : compactors) {
String cpath = compactorQueuesPath + "/" + group + "/" + compactor;
var lockNodes = zoorw.getChildren(compactorQueuesPath + "/" + group + "/" + compactor);
if (lockNodes.isEmpty()) {
deleteEmpty(zoorw, cpath);
} else {
aliveCompactorsForGroup++;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Map<String,Long> getOpTypeCounters() {
protected static <T extends AbstractBuilder<T,U>,U extends FateMetricValues> T
getFateMetrics(final ReadOnlyFateStore<FateMetrics<U>> fateStore, T builder) {

AdminUtil<FateMetrics<U>> admin = new AdminUtil<>(false);
AdminUtil<FateMetrics<U>> admin = new AdminUtil<>();

List<AdminUtil.TransactionStatus> currFates =
admin.getTransactionStatus(Map.of(fateStore.type(), fateStore), null, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.apache.accumulo.manager.tableOps.create;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.manager.tableOps.Utils.getSortedSplitsFromFile;

import java.io.IOException;
import java.util.SortedMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
package org.apache.accumulo.manager.tableOps.create;

import static org.apache.accumulo.manager.tableOps.Utils.getSortedSplitsFromFile;

import java.util.AbstractMap.SimpleImmutableEntry;
import java.util.HashMap;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.apache.accumulo.core.fate.Repo;
import org.apache.accumulo.harness.SharedMiniClusterBase;
import org.apache.accumulo.server.ServerContext;
import org.apache.accumulo.test.fate.FateTestRunner.TestEnv;
import org.apache.accumulo.test.util.Wait;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -161,7 +160,7 @@ public String getReturn() {
}
}

public static class PoolResizeTestEnv extends TestEnv {
public static class PoolResizeTestEnv extends FateTestRunner.TestEnv {
private final AtomicInteger numWorkers = new AtomicInteger(0);
private final CountDownLatch isReadyLatch = new CountDownLatch(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void getFateStatus() {

int maxRetries = 3;

AdminUtil<String> admin = new AdminUtil<>(false);
AdminUtil<String> admin = new AdminUtil<>();

while (maxRetries > 0) {

Expand Down Expand Up @@ -343,7 +343,7 @@ public void getFateStatus() {
*/
private boolean lookupFateInZookeeper(final String tableName) throws KeeperException {

AdminUtil<String> admin = new AdminUtil<>(false);
AdminUtil<String> admin = new AdminUtil<>();

try {

Expand Down Expand Up @@ -377,7 +377,7 @@ private boolean lookupFateInZookeeper(final String tableName) throws KeeperExcep
}

private boolean lookupFateInAccumulo(final String tableName) throws KeeperException {
AdminUtil<String> admin = new AdminUtil<>(false);
AdminUtil<String> admin = new AdminUtil<>();

try {
TableId tableId = context.getTableId(tableName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public static void assertNoDanglingFateLocks(AccumuloCluster cluster) {

private static FateStatus getFateStatus(AccumuloCluster cluster) {
try {
AdminUtil<String> admin = new AdminUtil<>(false);
AdminUtil<String> admin = new AdminUtil<>();
ServerContext context = cluster.getServerContext();
var zk = context.getZooSession();
MetaFateStore<String> readOnlyMFS =
Expand Down

0 comments on commit f2d5e57

Please sign in to comment.