This is an automated email from the ASF dual-hosted git repository.

dlmarion pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 0e21e0ea8801a46cd6afe3a177f2798998df5ab1
Merge: a514131192 a3c9bf7800
Author: Dave Marion <dlmar...@apache.org>
AuthorDate: Fri Oct 4 14:21:58 2024 +0000

    Merge remote-tracking branch 'upstream/main'

 .../accumulo/core/clientImpl/ClientContext.java    |   2 +-
 .../core/clientImpl/InstanceOperationsImpl.java    |   3 +-
 .../core/clientImpl/ZookeeperLockChecker.java      |  15 +--
 .../accumulo/core/lock/ServiceLockPaths.java       |  55 +++++-----
 .../core/metadata/schema/TabletMetadata.java       |   4 +-
 .../accumulo/core/rpc/clients/TServerClient.java   |  20 ++--
 .../util/compaction/ExternalCompactionUtil.java    |   4 +-
 .../accumulo/core/lock/ServiceLockPathsTest.java   | 116 ++++++++++-----------
 .../miniclusterImpl/MiniAccumuloClusterImpl.java   |   7 +-
 .../accumulo/server/manager/LiveTServerSet.java    |  14 ++-
 .../server/manager/state/DeadServerList.java       |   3 +-
 .../accumulo/server/util/AccumuloStatus.java       |   3 +-
 .../org/apache/accumulo/server/util/Admin.java     |   5 +-
 .../accumulo/server/util/ServiceStatusCmd.java     |   7 +-
 .../accumulo/server/util/TabletServerLocks.java    |   7 +-
 .../org/apache/accumulo/server/util/ZooZap.java    |   7 +-
 .../java/org/apache/accumulo/manager/Manager.java  |   4 +-
 .../test/ScanServerConcurrentTabletScanIT.java     |   3 +-
 .../test/ScanServerGroupConfigurationIT.java       |   7 +-
 .../org/apache/accumulo/test/ScanServerIT.java     |   3 +-
 .../accumulo/test/ScanServerMetadataEntriesIT.java |   3 +-
 .../accumulo/test/ScanServerMultipleScansIT.java   |   3 +-
 .../apache/accumulo/test/ScanServerShutdownIT.java |   5 +-
 .../test/functional/MemoryStarvedScanIT.java       |   2 +-
 .../functional/TabletManagementIteratorIT.java     |   5 +-
 .../functional/TabletResourceGroupBalanceIT.java   |   3 +-
 .../accumulo/test/lock/ServiceLockPathsIT.java     |  47 ++++-----
 27 files changed, 178 insertions(+), 179 deletions(-)

diff --cc 
core/src/main/java/org/apache/accumulo/core/rpc/clients/TServerClient.java
index c99250d2b8,20436898fe..e875536ff2
--- a/core/src/main/java/org/apache/accumulo/core/rpc/clients/TServerClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/clients/TServerClient.java
@@@ -80,34 -74,17 +80,34 @@@ public interface TServerClient<C extend
      final long rpcTimeout = context.getClientTimeoutInMillis();
      final ZooCache zc = context.getZooCache();
      final List<ServiceLockPath> serverPaths = new ArrayList<>();
 -    serverPaths.addAll(context.getServerPaths().getCompactor(rg -> true, addr 
-> true, true));
 -    serverPaths.addAll(context.getServerPaths().getScanServer(rg -> true, 
addr -> true, true));
 -    serverPaths.addAll(context.getServerPaths().getTabletServer(rg -> true, 
addr -> true, true));
 -    if (serverPaths.isEmpty()) {
 -      if (warned.compareAndSet(false, true)) {
 -        LOG.warn(
 -            "There are no servers serving the {} api: check that zookeeper 
and accumulo are running.",
 -            type);
 +    if (type == ThriftClientTypes.CLIENT && debugHost != null) {
 +      // add all three paths to the set even though they may not be correct.
 +      // The entire set will be checked in the code below to validate
 +      // that the path is correct and the lock is held and will return the
 +      // correct one.
-       Optional<HostAndPort> hp = 
Optional.of(HostAndPort.fromString(debugHost));
-       
serverPaths.addAll(context.getServerPaths().getCompactor(Optional.empty(), hp, 
true));
-       
serverPaths.addAll(context.getServerPaths().getScanServer(Optional.empty(), hp, 
true));
-       
serverPaths.addAll(context.getServerPaths().getTabletServer(Optional.empty(), 
hp, true));
-     } else {
++      HostAndPort hp = HostAndPort.fromString(debugHost);
++      serverPaths
++          .addAll(context.getServerPaths().getCompactor(rg -> true, addr -> 
addr.equals(hp), true));
++      serverPaths.addAll(
++          context.getServerPaths().getScanServer(rg -> true, addr -> 
addr.equals(hp), true));
 +      serverPaths.addAll(
-           context.getServerPaths().getTabletServer(Optional.empty(), 
Optional.empty(), true));
++          context.getServerPaths().getTabletServer(rg -> true, addr -> 
addr.equals(hp), true));
++    } else {
++      serverPaths.addAll(context.getServerPaths().getTabletServer(rg -> true, 
addr -> true, true));
 +      if (type == ThriftClientTypes.CLIENT) {
-         serverPaths.addAll(
-             context.getServerPaths().getCompactor(Optional.empty(), 
Optional.empty(), true));
-         serverPaths.addAll(
-             context.getServerPaths().getScanServer(Optional.empty(), 
Optional.empty(), true));
++        serverPaths.addAll(context.getServerPaths().getCompactor(rg -> true, 
addr -> true, true));
++        serverPaths.addAll(context.getServerPaths().getScanServer(rg -> true, 
addr -> true, true));
 +      }
 +      if (serverPaths.isEmpty()) {
 +        if (warned.compareAndSet(false, true)) {
 +          LOG.warn(
 +              "There are no servers serving the {} api: check that zookeeper 
and accumulo are running.",
 +              type);
 +        }
 +        throw new TTransportException("There are no servers for type: " + 
type);
        }
 -      throw new TTransportException("There are no servers for type: " + type);
      }
 +
      Collections.shuffle(serverPaths, RANDOM.get());
  
      for (ServiceLockPath path : serverPaths) {

Reply via email to