public void delete(String path) { path = "/" + path; try { _curator.delete().forPath(path); } catch (Exception e) { throw new RuntimeException(e); } }
public void deleteNode(CuratorFramework zk, String path) throws Exception { zk.delete().forPath(PathUtils.normalize_path(path)); }
@Override public Void call() throws Exception { try { zk.delete().forPath(buildZookeeperPath(pathSuffix)); return null; } catch (KeeperException.NoNodeException e) { // likely deleted by another task return null; } } });
private void checkDeleteOurPath(boolean shouldExist) throws Exception { if ( shouldExist ) { client.delete().forPath(ourPath); } }
public Void call() throws Exception { String memberpath = new StringBuffer(groupname) .append(FWD_SLASH).append(membername) .toString(); transport.getZKHandle().delete().forPath(memberpath); return null; } });
/** * Utility to remove the barrier node * * @throws Exception errors */ public synchronized void removeBarrier() throws Exception { try { client.delete().forPath(barrierPath); } catch ( KeeperException.NoNodeException ignore ) { // ignore } }
/** * Attempt to delete the lock node so that sequence numbers get reset * * @throws Exception errors */ public void clean() throws Exception { try { client.delete().forPath(basePath); } catch ( KeeperException.BadVersionException ignore ) { // ignore - another thread/process got the lock } catch ( KeeperException.NotEmptyException ignore ) { // ignore - other threads/processes are waiting } }
public Void call() throws Exception { if (subgroup!= null && subgroup.contains(groupname)) { String grouptoLeave = new StringBuffer(subgroup) .append(FWD_SLASH).append(membername) .toString(); transport.getZKHandle().delete().forPath(grouptoLeave); } else { leave(); } return null; } });
public void delete(String path) { try { if (!exists(path)) return; m_curator.delete().forPath(path); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } } }
client.delete().forPath(holder.path); log.info("Reaping path: " + holder.path); if ( holder.mode == Mode.REAP_UNTIL_DELETE || holder.mode == Mode.REAP_UNTIL_GONE )
client.delete().forPath(readyPath);
if ( removeIt ) client.delete().forPath(thisPath);
client.delete().forPath(itemPath);