You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/09/17 21:23:30 UTC
[GitHub] [accumulo] cshannon opened a new pull request, #2937: Combine CleanZookeeper and DeleteZooInstance utilities
cshannon opened a new pull request, #2937:
URL: https://github.com/apache/accumulo/pull/2937
Combine the CleanZookeeper utility, which will delete all old instances, and the DeleteZooInstance utility, which deletes a single instance, into one utility class and use a flag to determine which action to take.
This is a follow on to #2807 and replaces PR #2925
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] cshannon commented on pull request #2937: Combine CleanZookeeper and DeleteZooInstance utilities
Posted by GitBox <gi...@apache.org>.
cshannon commented on PR #2937:
URL: https://github.com/apache/accumulo/pull/2937#issuecomment-1252201146
> small nit
Thanks for catching that, fixed it now.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] dlmarion merged pull request #2937: Combine CleanZookeeper and DeleteZooInstance utilities
Posted by GitBox <gi...@apache.org>.
dlmarion merged PR #2937:
URL: https://github.com/apache/accumulo/pull/2937
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] dlmarion commented on a diff in pull request #2937: Combine CleanZookeeper and DeleteZooInstance utilities
Posted by GitBox <gi...@apache.org>.
dlmarion commented on code in PR #2937:
URL: https://github.com/apache/accumulo/pull/2937#discussion_r975201742
##########
server/base/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java:
##########
@@ -21,53 +21,112 @@
import static java.nio.charset.StandardCharsets.UTF_8;
import java.util.HashSet;
+import java.util.List;
import java.util.Objects;
import java.util.Set;
import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.core.conf.SiteConfiguration;
import org.apache.accumulo.fate.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.fate.zookeeper.ZooUtil;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
+import org.apache.accumulo.server.ServerContext;
import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DeleteZooInstance {
- static void deleteRetry(ZooReaderWriter zk, String path) throws Exception {
- for (int i = 0; i < 10; i++) {
- try {
- zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
- return;
- } catch (KeeperException.NotEmptyException ex) {
- // ignored
- } catch (Exception ex) {
- throw ex;
+ private static final Logger log = LoggerFactory.getLogger(DeleteZooInstance.class);
+
+ public static void execute(final ServerContext context, final boolean clean,
+ final String instance, final String auth) throws InterruptedException, KeeperException {
+
+ final ZooReaderWriter zk = context.getZooReaderWriter();
+ if (auth != null) {
+ ZooUtil.digestAuth(zk.getZooKeeper(), auth);
+ }
+
+ if (clean) {
+ // If clean is set to true thenn a specific instance should not be set
Review Comment:
```suggestion
// If clean is set to true then a specific instance should not be set
```
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org