diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java index cb8f9e5ec39..64af0dbfce0 100644 --- a/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java +++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java @@ -334,11 +334,6 @@ public ClientContext(ClientInfo info, AccumuloConfiguration serverConf, }); zkLockChecker = memoize(() -> { - // make this use its own ZooSession and ZooCache, because this is used by the - // tablet location cache, which is a static singleton reused by multiple clients - // so, it can't rely on being able to continue to use the same client's ZooCache, - // because that client could be closed, and its ZooSession also closed - // this needs to be fixed; TODO https://github.com/apache/accumulo/issues/2301 var zk = info.getZooKeeperSupplier(ZookeeperLockChecker.class.getSimpleName(), ZooUtil.getRoot(getInstanceID())).get(); return new ZookeeperLockChecker(new ZooCache(zk, Set.of(Constants.ZTSERVERS))); diff --git a/core/src/main/java/org/apache/accumulo/core/spi/balancer/util/ThrottledBalancerProblemReporter.java b/core/src/main/java/org/apache/accumulo/core/spi/balancer/util/ThrottledBalancerProblemReporter.java index 41dd35f52c0..3bc14cd6663 100644 --- a/core/src/main/java/org/apache/accumulo/core/spi/balancer/util/ThrottledBalancerProblemReporter.java +++ b/core/src/main/java/org/apache/accumulo/core/spi/balancer/util/ThrottledBalancerProblemReporter.java @@ -25,6 +25,7 @@ import java.util.stream.Collectors; import org.apache.accumulo.core.data.TabletId; +import org.apache.accumulo.core.dataImpl.KeyExtent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,13 +78,12 @@ public void setMigrations(Set migrations) { @Override public void report() { log.warn("Not balancing due to {} outstanding migrations.", migrations.size()); - /* - * TODO ACCUMULO-2938 redact key extents in this output to avoid leaking protected - * information. - */ if (log.isDebugEnabled()) { + // convert each tabletId in migrations to keyExtent for redacting log.debug("Sample up to 10 outstanding migrations: {}", - migrations.stream().limit(10).map(String::valueOf).collect(Collectors.joining(", "))); + migrations.stream().limit(10) + .map(tabletId -> KeyExtent.fromTabletId(tabletId).obscured()) + .collect(Collectors.joining(", "))); } // Now that we've reported, clear out the migrations list so we don't hold it in memory. migrations = Collections.emptySet();