dlmarion commented on code in PR #4861:
URL: https://github.com/apache/accumulo/pull/4861#discussion_r1761264553
##########
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java:
##########
@@ -347,4 +350,27 @@ private void handlePartialSplits(ServerContext context,
String table) {
throw new IllegalStateException(e);
}
}
+
+ private void validateEmptyZKWorkerServerPaths(ServerContext context) {
+ // #4861 added the resource group to the compactor, sserver, tserver
+ // and dead tserver zookeeper paths. Make sure that the these paths
+ // are empty. This means that for the Accumulo 4.0 upgrade, the Manager
+ // should be started first before any other process.
+ final String zkRoot = ZooUtil.getRoot(context.getInstanceID());
+ final ZooReader zr = context.getZooReader();
+ for (String serverPath : new String[] {Constants.ZCOMPACTORS,
Constants.ZSSERVERS,
+ Constants.ZTSERVERS, Constants.ZDEADTSERVERS}) {
+ try {
+ List<String> children = zr.getChildren(zkRoot + serverPath);
+ for (String child : children) {
+ if (child.contains(":")) {
Review Comment:
I don't think we have any limits on the RG name content. However, a '/'
would likely be a problem.
--
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]