ddanielr commented on code in PR #6166:
URL: https://github.com/apache/accumulo/pull/6166#discussion_r2886030661
##########
server/base/src/main/java/org/apache/accumulo/server/util/Admin.java:
##########
@@ -589,20 +590,28 @@ private static void stopServers(final ServerContext
context, List<String> server
var iid = context.getInstanceID();
String tserversPath = Constants.ZROOT + "/" + iid +
Constants.ZTSERVERS;
- ZooZap.removeLocks(zk, tserversPath, hostAndPort::contains, opts);
+ ServiceLock.deleteLocks(zk, tserversPath, hostAndPort::contains,
log::debug, false);
String compactorsBasepath = Constants.ZROOT + "/" + iid +
Constants.ZCOMPACTORS;
ZooZap.removeCompactorGroupedLocks(zk, compactorsBasepath, rg -> true,
hostAndPort::contains, opts);
String sserversPath = Constants.ZROOT + "/" + iid +
Constants.ZSSERVERS;
- ZooZap.removeScanServerGroupLocks(zk, sserversPath,
hostAndPort::contains, rg -> true,
- opts);
+ try {
+ ZooZap.removeScanServerGroupLocks(zk, sserversPath,
hostAndPort::contains, rg -> true,
+ opts);
+ } catch (IllegalStateException e) {
+ log.debug("No Scan Server locks currently exist", e);
+ }
String managerLockPath = Constants.ZROOT + "/" + iid +
Constants.ZMANAGER_LOCK;
ZooZap.removeSingletonLock(zk, managerLockPath, hostAndPort::contains,
opts);
String gcLockPath = Constants.ZROOT + "/" + iid + Constants.ZGC_LOCK;
- ZooZap.removeSingletonLock(zk, gcLockPath, hostAndPort::contains,
opts);
+ ServiceLock.deleteLock(zk, gcLockPath,
ServerServices.Service.GC_CLIENT,
+ hostAndPort::contains, log::debug, opts.dryRun);
Review Comment:
I don't believe so.
All of the accumulo scripts should use the log4j2.properties file which has
a root logger level of info and does not have any logger entries for the
`org.apache.accumulo` package.
The only way to change that is to modify accumulo-env.sh and set different
settings for `shell` or `admin` commands.
I had to add the following logger for these messages to show up
```
logger.shell.name = org.apache.accumulo.server.util.Admin
logger.shell.level = debug
```
Interestingly, the accumulo-cluster uses the `-verbose` flag when it calls
ZooZap so it should always print it's actions
https://github.com/apache/accumulo/blob/7277daedd31979b72d26d8e5a797e0a9af2e0ca0/assemble/bin/accumulo-cluster#L718-L722
--
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]