public static boolean removeJoinNodeIndicatorForHost ( ZooKeeper zk , int hostId ) { try { Stat stat = new Stat ( ) ; String path = ZKUtil . joinZKPath ( readyjoininghosts , Integer . toString ( hostId ) ) ; zk . getData ( path , false , stat ) ; zk . delete ( path , stat . getVersion ( ) ) ; return true ; } catch ( KeeperException e ) { if ( e . code ( ) == KeeperException . Code . NONODE || e . code ( ) == KeeperException . Code . BADVERSION ) { // Okay if the join indicator for the given hostId is already gone. return true ; } } catch ( InterruptedException e ) { return false ; } return false ; }
Removes the join indicator for the given host ID .