@Override public Object execute() throws KeeperException, InterruptedException { zk.delete(lockId, -1); return null; } });
@Override public Integer execute() throws KeeperException, InterruptedException { zk.delete(indexerProcessId, -1); return 0; } });
@Override public Object execute() throws KeeperException, InterruptedException { zk.delete(lockId, -1); return null; } });
@Override public Object execute() throws KeeperException, InterruptedException { try { zk.delete(childPath, -1); } catch (KeeperException.NoNodeException e) { // ignore } return null; } });
@Override public Integer execute() throws KeeperException, InterruptedException { zk.delete(indexerProcessId, -1); return 0; } });
@Override public Object execute() throws KeeperException, InterruptedException { try { zk.delete(childPath, -1); } catch (KeeperException.NoNodeException e) { // ignore } return null; } });
@Override public Boolean execute() throws KeeperException, InterruptedException { Stat stat = zk.exists(path, false); if (stat != null) { try { zk.delete(path, stat.getVersion()); } catch (KeeperException.NoNodeException nne) { // This is ok, the node is already gone } // We don't catch BadVersion or NotEmpty as these are probably signs that there is something // unexpected going on with the node that is to be deleted } return true; } });
public void stop() { Closer.close(zkWatcher); if (running) { running = false; Closer.close(rpcServer); try { // This ZK node will likely already be gone if the index has been removed // from ZK, but we'll try to remove it here to be sure zk.delete(zkNodePath, -1); } catch (Exception e) { log.debug("Exception while removing zookeeper node", e); if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } } } sepMetrics.shutdown(); for (ThreadPoolExecutor executor : executors) { executor.shutdown(); } }
@Override public Boolean execute() throws KeeperException, InterruptedException { Stat stat = zk.exists(path, false); if (stat != null) { try { zk.delete(path, stat.getVersion()); } catch (KeeperException.NoNodeException nne) { // This is ok, the node is already gone } // We don't catch BadVersion or NotEmpty as these are probably signs that there is something // unexpected going on with the node that is to be deleted } return true; } });
public void stop() { Closer.close(zkWatcher); if (running) { running = false; Closer.close(rpcServer); try { // This ZK node will likely already be gone if the index has been removed // from ZK, but we'll try to remove it here to be sure zk.delete(zkNodePath, -1); } catch (Exception e) { log.debug("Exception while removing zookeeper node", e); if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } } } sepMetrics.shutdown(); for (ThreadPoolExecutor executor : executors) { executor.shutdown(); } }