@Override public void nodeChildrenChanged(String path) { if (path.equals(ZooKeeperAdmin.PG_SERVER_NODE)) { try { List<String> servers = ZKUtil.listChildrenAndWatchThem(watcher, ZooKeeperAdmin.PG_SERVER_NODE); add(servers); } catch (IOException e) { abortable.abort("Unexpected zk exception getting server nodes", e); } catch (KeeperException e) { abortable.abort("Unexpected zk exception getting server nodes", e); } } }
protected void abortServer(final String coprocessorName, final Throwable e) { String message = "The coprocessor " + coprocessorName + " threw " + e.toString(); LOG.error(message, e); if (abortable != null) { abortable.abort(message, e); } else { LOG.warn("No available Abortable, process was not aborted"); } }