dlmarion commented on code in PR #4845:
URL: https://github.com/apache/accumulo/pull/4845#discussion_r1735057230
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java:
##########
@@ -273,24 +283,35 @@ public boolean testClassLoad(final String className,
final String asTypeName)
@Override
public List<ActiveCompaction> getActiveCompactions(String tserver)
throws AccumuloException, AccumuloSecurityException {
- final var parsedTserver = HostAndPort.fromString(tserver);
- Client client = null;
- try {
- client = getClient(ThriftClientTypes.TABLET_SERVER, parsedTserver,
context);
+ final var serverHostAndPort = HostAndPort.fromString(tserver);
- List<ActiveCompaction> as = new ArrayList<>();
- for (var tac : client.getActiveCompactions(TraceUtil.traceInfo(),
context.rpcCreds())) {
- as.add(new ActiveCompactionImpl(context, tac, parsedTserver,
CompactionHost.Type.TSERVER));
+ final List<ActiveCompaction> as = new ArrayList<>();
+ try {
+ if (getTabletServers().contains(tserver)) {
Review Comment:
Found some code that I could reuse. I added it to ZookeeperLockChecker and
wired it up to ClientContext. Please take a look at TabletLocator changes as
this would re-use the existing ZookeeperLockChecker instance instead of
creating a new one each time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]