private boolean zkPathExists ( String path ) throws IOException { try { return zk . exists ( path , false ) != null ; } catch ( KeeperException e ) { keeperException ( "Unrecoverable ZooKeeper error checking if " + path + " exists" , e ) ; } catch ( InterruptedException e ) { interruptedException ( "Interrupted checking if ZooKeeper path " + path + " exists" , e ) ; } return false ; // Should never be reached }
Check if a path exists in ZooKeeper