private void deleteServerNode(String serverNode) throws InterruptedException, KeeperException { try { context.getZooReaderWriter().delete(serverNode, -1); } catch (NotEmptyException | NoNodeException ex) { // race condition: tserver created the lock after our last check; we'll see it at the next // check } }
public void removeWalMarker(TServerInstance instance, UUID uuid) throws WalMarkerException { try { log.debug("Removing {}", uuid); String path = root() + "/" + instance + "/" + uuid; zoo.delete(path, -1); } catch (InterruptedException | KeeperException e) { throw new WalMarkerException(e); } }
/** * Remove the given {@link AuthenticationKey} from ZooKeeper. If the node for the provided * {@code key} doesn't exist in ZooKeeper, a warning is printed but an error is not thrown. Since * there is only a single process managing ZooKeeper at one time, any inconsistencies should be * client error. * * @param key * The key to remove from ZooKeeper */ public synchronized void remove(AuthenticationKey key) throws KeeperException, InterruptedException { checkState(initialized.get(), "Not initialized"); requireNonNull(key); String path = qualifyPath(key); if (!zk.exists(path)) { log.warn("AuthenticationKey with ID '{}' doesn't exist in ZooKeeper", key.getKeyId()); return; } log.debug("Removing AuthenticationKey with keyId {} from ZooKeeper at {}", key.getKeyId(), path); // Delete the node, any version zk.delete(path, -1); }
zoo.delete(path, -1); } catch (KeeperException e) {